id
int64 0
877k
| file_name
stringlengths 3
109
| file_path
stringlengths 13
185
| content
stringlengths 31
9.38M
| size
int64 31
9.38M
| language
stringclasses 1
value | extension
stringclasses 11
values | total_lines
int64 1
340k
| avg_line_length
float64 2.18
149k
| max_line_length
int64 7
2.22M
| alphanum_fraction
float64 0
1
| repo_name
stringlengths 6
66
| repo_stars
int64 94
47.3k
| repo_forks
int64 0
12k
| repo_open_issues
int64 0
3.4k
| repo_license
stringclasses 11
values | repo_extraction_date
stringclasses 197
values | exact_duplicates_redpajama
bool 2
classes | near_duplicates_redpajama
bool 2
classes | exact_duplicates_githubcode
bool 2
classes | exact_duplicates_stackv2
bool 1
class | exact_duplicates_stackv1
bool 2
classes | near_duplicates_githubcode
bool 2
classes | near_duplicates_stackv1
bool 2
classes | near_duplicates_stackv2
bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,542,323
|
mquicontrollersimple.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mquicontrollersimple.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MQUICONTROLLERSIMPLE_H
#define MQUICONTROLLERSIMPLE_H
#include "d2list.h"
#include "d2set.h"
#include "mquicontroller.h"
namespace game {
template <typename T>
struct UiEventData
{
int eventId;
SmartPtr<T> callback;
};
assert_size(UiEventData<void>, 12);
struct UiMessageEventData
{
unsigned int messageId;
int eventId;
SmartPtr<UiMessageCallback> callback;
};
assert_size(UiMessageEventData, 16);
struct CallbackPointerPair
{
bool unknown;
char padding[3];
void* begin;
void* end;
};
assert_size(CallbackPointerPair, 12);
struct CMqUIControllerSimpleData
{
int freeEventId;
Set<UiEventData<UiTimerCallback>> timerCallbacks;
List<UiEventData<UiUpdateCallback>> updateCallbacks;
Set<UiEventData<UiPaintCallback>> paintCallbacks;
Set<UiEventData<UiVisibilityCallback>> visibilityCallbacks;
Set<UiEventData<UiKeypressCallback>> keypressCallbacks;
Set<UiEventData<UiMousePressCallback>> mousePressCallbacks;
Set<UiEventData<UiMouseMoveCallback>> mouseMoveCallbacks;
Set<UiEventData<UiCloseCallback>> closeCallbacks;
Set<UiMessageEventData> messageCallbacks;
CallbackPointerPair unknown;
CallbackPointerPair unknown2;
CallbackPointerPair unknown3;
CallbackPointerPair unknown4;
CallbackPointerPair unknown5;
CallbackPointerPair unknown6;
CallbackPointerPair unknown7;
CallbackPointerPair unknown8;
};
assert_size(CMqUIControllerSimpleData, 340);
struct CMqUIControllerSimple : public IMqUIController
{
CMqUIControllerSimpleData* data;
};
assert_size(CMqUIControllerSimple, 8);
} // namespace game
#endif // MQUICONTROLLERSIMPLE_H
| 2,472
|
C++
|
.h
| 75
| 30.04
| 72
| 0.790932
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,324
|
fortcategory.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/fortcategory.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FORTCATEGORY_H
#define FORTCATEGORY_H
#include "categories.h"
namespace game {
struct LFortCategoryTable : public CEnumConstantTable<FortId>
{ };
struct LFortCategory : public Category<FortId>
{ };
namespace FortCategories {
struct Categories
{
LFortCategory* capital;
LFortCategory* village;
};
Categories& get();
} // namespace FortCategories
} // namespace game
#endif // FORTCATEGORY_H
| 1,229
|
C++
|
.h
| 36
| 32.138889
| 72
| 0.771574
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,325
|
managestkinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/managestkinterf.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MANAGESTKINTERF_H
#define MANAGESTKINTERF_H
#include "d2string.h"
#include "d2vector.h"
#include "middatacache.h"
#include "middragdropinterf.h"
#include "midgardid.h"
#include "mqrect.h"
#include "resetstackext.h"
#include "smartptr.h"
namespace game {
struct CDDStackGroup;
struct CDDStackInventoryDisplay;
struct CPaperdollChildInterf;
struct CMidDropAction;
struct ITask;
struct CPhaseGame;
struct IMqImage2;
struct CAudioRegionHolder
{
CPhaseGame* phaseGame;
};
assert_size(CAudioRegionHolder, 4);
struct CManageStkInterfData
{
CMidgardID stackId;
CDDStackGroup* ddStackGroup;
CDDStackInventoryDisplay* ddStackInventoryDisplay;
CPaperdollChildInterf* paperdollChildInterf;
CMqRect paperdollArea;
CMidDropAction* dismissUnitAction;
CMidDropAction* dynLevelUnitAction;
ITask* taskOpenInterf;
CPhaseGame* phaseGame;
Vector<SmartPtr<IMqImage2>> leaderAbilityIcons;
Vector<String> leaderAbilityNames;
CMqRect slot1Area;
CAudioRegionHolder* audioRegionHolder;
bool isImportLeader;
char padding[3];
};
assert_size(CManageStkInterfData, 104);
struct CManageStkInterf
: public CMidDataCache2::INotify
, public IResetStackExt
, public CMidDragDropInterf
{
CManageStkInterfData* manageStkInterfData;
};
assert_size(CManageStkInterf, 40);
namespace CManageStkInterfApi {
struct Vftable
{
const CMidDataCache2::INotifyVftable* notify;
const IResetStackExtVftable* resetStackExt;
const CInterfaceVftable* dragDropInterf;
const ITaskManagerHolderVftable* taskManagerHolder;
const IMidDropManagerVftable* dropManager;
};
Vftable& vftable();
} // namespace CManageStkInterfApi
} // namespace game
#endif // MANAGESTKINTERF_H
| 2,550
|
C++
|
.h
| 81
| 28.839506
| 72
| 0.796983
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,326
|
quickstring.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/quickstring.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QUICKSTRING_H
#define QUICKSTRING_H
#include <cstddef>
namespace game {
template <std::size_t Size>
struct quick_string
{
// + 1 for null terminator
char string[Size + 1u];
};
} // namespace game
#endif // QUICKSTRING_H
| 1,054
|
C++
|
.h
| 30
| 33.1
| 72
| 0.75442
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,327
|
imgpackerloader.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/imgpackerloader.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IMGPACKERLOADER_H
#define IMGPACKERLOADER_H
#include "d2assert.h"
namespace game {
struct CImgPackerLoaderWeakDup;
struct ImgPackerLoader
{
CImgPackerLoaderWeakDup* imgPackerLoader;
void* memPool;
char unordered_map[44];
};
assert_size(ImgPackerLoader, 52);
struct ImgPackerLoaderWrapper
{
ImgPackerLoader* data;
};
assert_size(ImgPackerLoaderWrapper, 4);
} // namespace game
#endif // IMGPACKERLOADER_H
| 1,250
|
C++
|
.h
| 37
| 31.621622
| 72
| 0.777224
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,328
|
tilevariation.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/tilevariation.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TILEVARIATION_H
#define TILEVARIATION_H
#include "d2assert.h"
#include "groundcat.h"
#include "terraincat.h"
#include <cstddef>
#include <cstdint>
namespace game {
struct TileVariationRecord
{
LTerrainCategory terrain;
LGroundCategory ground;
int index; /** < Read from NDX column. */
int quantity; /** < Read from QTY column. */
int hash; /**< Computed as: index + ((ground.id + 16 * terrain.id) << 8) */
TileVariationRecord* next;
};
assert_size(TileVariationRecord, 40);
assert_offset(TileVariationRecord, quantity, 28);
struct CTileVariationData
{
char unknown;
char padding[3];
std::uint32_t recordsTotal;
TileVariationRecord** records;
std::uint32_t recordsAllocated;
std::uint32_t reallocationTreshold;
int unknown3;
char unknown4;
char unknown5;
char unknown6;
char unknown7;
char unknown8;
char padding2[3];
int unknown9;
int unknown10;
void* allocator;
};
assert_size(CTileVariationData, 44);
assert_offset(CTileVariationData, reallocationTreshold, 16);
/** Holds tile information read from GTileDBI.dbf. */
struct CTileVariation
{
void* vftable;
CTileVariationData* data;
};
assert_size(CTileVariation, 8);
struct TileVariationIterator
{
char unknown;
char padding[3];
TileVariationRecord** records;
TileVariationRecord* record;
std::uint32_t recordsTotal;
bool found;
char padding2[3];
};
assert_size(TileVariationIterator, 20);
namespace CTileVariationApi {
struct Api
{
/** Checks correctness of all tile variation data records. */
using CheckData = void(__stdcall*)(const CTileVariationData* data);
CheckData checkData;
/**
* Checks correctness of specific tile variation data records.
* @returns true if tile variation has no more than 'maxIndex' of records
* with specified terrain and ground and each record has non zero quantity.
*/
using CheckRecordsCorrect = bool(__stdcall*)(const CTileVariationData* data,
const LTerrainCategory* terrain,
const LGroundCategory* ground,
int maxIndex);
CheckRecordsCorrect checkRecordsCorrect;
};
Api& get();
} // namespace CTileVariationApi
} // namespace game
#endif // TILEVARIATION_H
| 3,203
|
C++
|
.h
| 97
| 28.412371
| 83
| 0.709197
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,329
|
canselect.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/canselect.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CANSELECT_H
#define CANSELECT_H
#include "d2assert.h"
namespace game {
struct CMqPoint;
struct ICanSelectVftable;
struct ICanSelect
{
ICanSelectVftable* vftable;
};
struct ICanSelectVftable
{
using Destructor = void(__thiscall*)(ICanSelect* thisptr, char flags);
Destructor destructor;
using CanSelect = bool(__thiscall*)(ICanSelect* thisptr, const CMqPoint* mapPosition);
CanSelect canSelect;
};
assert_vftable_size(ICanSelectVftable, 2);
} // namespace game
#endif // CANSELECT_H
| 1,332
|
C++
|
.h
| 38
| 32.815789
| 90
| 0.767913
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,330
|
menurandomscenario.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menurandomscenario.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MENURANDOMSCENARIO_H
#define MENURANDOMSCENARIO_H
#include "map.h"
#include "mapgenerator.h"
#include "maptemplate.h"
#include "menubase.h"
#include <array>
#include <thread>
#include <utility>
namespace game {
struct CButtonInterf;
struct CPopupDialogInterf;
} // namespace game
namespace hooks {
enum class GenerationStatus : int
{
NotStarted, /**< Random scenario generation has not started yet. */
InProcess, /**< Generation is in process, generator thread is running. */
Canceled, /**< Generation was canceled by player. */
Done, /**< Generation successfully done, scenario can be serialized. */
LimitExceeded, /**< Generation could not succeed in specified number of attempts. */
Error, /**< Generation was aborted with an error. */
};
/** Base menu for random scenario generation. */
struct CMenuRandomScenario : public game::CMenuBase
{
using StartScenario = void (*)(CMenuRandomScenario* menu);
CMenuRandomScenario(game::CMenuPhase* menuPhase,
StartScenario startScenario,
const char* dialogName);
~CMenuRandomScenario();
game::UiEvent uiEvent{};
std::thread generatorThread;
rsg::MapTemplate scenarioTemplate;
rsg::MapPtr scenario;
std::unique_ptr<rsg::MapGenerator> generator;
// Tracks which button shows which race image
using RaceIndices = std::array<std::pair<game::CButtonInterf*, int /* image index */>, 4>;
RaceIndices raceIndices;
game::CPopupDialogInterf* popup{};
GenerationStatus generationStatus{GenerationStatus::NotStarted};
StartScenario startScenario{};
bool cancelGeneration{false};
};
void prepareToStartRandomScenario(CMenuRandomScenario* menu, bool networkGame = false);
} // namespace hooks
#endif // MENURANDOMSCENARIO_H
| 2,648
|
C++
|
.h
| 65
| 37.246154
| 94
| 0.735019
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,331
|
pathinfolist.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/pathinfolist.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PATHINFOLIST_H
#define PATHINFOLIST_H
#include "d2list.h"
#include "mqpoint.h"
namespace game {
struct IMidgardObjectMap;
struct CMidStack;
/** Holds data about single point along the path. */
struct PathInfo
{
CMqPoint position; /**< Tile coordinates. */
int moveCostTotal; /**< Total cost to reach this point from the start of the path. */
int turnsToReach; /**< Number of turns the stack needs to reach this point. */
};
/** Used to show movement path hints to the player in strategic view. */
using PathInfoList = List<PathInfo>;
using PathInfoListNode = ListNode<PathInfo>;
namespace PathInfoListApi {
struct Api
{
using Constructor = PathInfoList*(__thiscall*)(PathInfoList* thisptr);
Constructor constructor;
/**
* Fills list with actual movement cost and turns information.
* @param[in] objectMap map where to search for objects.
* @param[in] stack stack for which to compute movement cost and turns information.
* @param[in] path movement path.
* @param[in] lastReachablePoint last point of the path that stack can reach in single turn.
* @param waterOnly treat stack leader as water only unit or not.
* @param[inout] pathInfo path information list to fill.
*/
using PopulateFromPath = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidStack* stack,
const List<CMqPoint>* path,
const CMqPoint* lastReachablePoint,
bool waterOnly,
PathInfoList* pathInfo);
PopulateFromPath populateFromPath;
using FreeNodes = void(__thiscall*)(PathInfoList* thisptr);
FreeNodes freeNodes;
using FreeNode = void(__thiscall*)(PathInfoList* thisptr, PathInfoListNode* node);
FreeNode freeNode;
};
Api& get();
} // namespace PathInfoListApi
} // namespace game
#endif // PATHINFOLIST_H
| 2,840
|
C++
|
.h
| 65
| 37.307692
| 96
| 0.688406
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,332
|
terraincountmap.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/terraincountmap.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TERRAINCOUNTMAP_H
#define TERRAINCOUNTMAP_H
#include "d2map.h"
#include "terraincat.h"
namespace game {
/** Maps tile count to terrain category. */
using TerrainCountMap = Map<LTerrainCategory, int>;
namespace TerrainCountMapApi {
struct Api
{
/** Map access operator. */
using Access = int*(__thiscall*)(TerrainCountMap* thisptr, const LTerrainCategory* key);
Access access;
};
Api& get();
} // namespace TerrainCountMapApi
} // namespace game
#endif // TERRAINCOUNTMAP_H
| 1,315
|
C++
|
.h
| 36
| 34.444444
| 92
| 0.759653
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,333
|
itemjewelry.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemjewelry.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMJEWELRY_H
#define ITEMJEWELRY_H
#include "itemequipment.h"
namespace game {
struct CItemJewelry : public CItemEquipment
{ };
assert_size(CItemJewelry, 24);
} // namespace game
#endif // ITEMJEWELRY_H
| 1,031
|
C++
|
.h
| 27
| 36.296296
| 72
| 0.768305
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,334
|
functordispatch1.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/functordispatch1.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FUNCTORDISPATCH1_H
#define FUNCTORDISPATCH1_H
#include "d2assert.h"
namespace game {
template <typename T>
struct CBFunctorDispatch1Vftable;
template <typename T>
struct CBFunctorDispatch1
{
CBFunctorDispatch1Vftable<T>* vftable;
};
template <typename T>
struct CBFunctorDispatch1Vftable
{
/** Calls functor-specific callback function, passing it T as a single parameter. */
using RunCallback = void(__thiscall*)(CBFunctorDispatch1<T>* thistr, T value);
RunCallback runCallback;
};
assert_vftable_size(CBFunctorDispatch1Vftable<void*>, 1);
template <typename T, typename U>
struct CBFunctorDispatch1wRetVftable;
template <typename T, typename U>
struct CBFunctorDispatch1wRet
{
CBFunctorDispatch1wRetVftable<T, U>* vftable;
};
template <typename T, typename U>
struct CBFunctorDispatch1wRetVftable
{
/**
* Calls functor-specific callback function that returns U, passing it T as a single parameter.
*/
using RunCallback = U(__thiscall*)(CBFunctorDispatch1wRet<T, U>* thisptr, T value);
RunCallback runCallback;
};
} // namespace game
#endif // FUNCTORDISPATCH1_H
| 1,937
|
C++
|
.h
| 55
| 32.927273
| 99
| 0.775401
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,335
|
uievent.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/uievent.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UIEVENT_H
#define UIEVENT_H
#include "d2assert.h"
#include "smartptr.h"
#include <cstdint>
namespace game {
struct CUIManager;
/**
* Ui related event types used in game.
* Determines callback signature.
*/
enum class UiEventType : int
{
/** Timer events, callback is called at the specified interval. */
Timer = 1,
/** Constant updates, callback is called within game message processing loop. */
Update = 2,
/**
* Paint events, callback is called after the BeginPaint call during WM_PAINT processing.
* No usages found in game. Supported in UiEvent destructor and game message loop,
*/
Paint = 3,
/** Game window visibility changes, callback is called when window loses or receives focus. */
VisibilityChange = 4,
/** Callback is called when key is pressed on the keyboard. */
KeyPress = 5,
/** Callback is called when mouse button is pressed. */
MousePress = 6,
/** Callback is called when mouse changes position. */
MouseMove = 7,
/** Callback is called when player attempts to close game window. */
Close = 8,
/**
* Callback is called when message previously created by RegisterWindowMessage is received.
*/
Message = 9,
};
/**
* Used for managing various ui related events in game.
* Identifiers are created and used solely by CUIManager.
*/
struct UiEvent
{
SmartPtr<CUIManager> uiManager;
UiEventType type;
std::uint32_t messageId; /**< Used when type == UiEventType::Message. */
int* eventId;
int* referenceCount;
};
assert_size(UiEvent, 24);
namespace UiEventApi {
struct Api
{
using CopyConstructor = UiEvent*(__thiscall*)(UiEvent* thisptr, const UiEvent* other);
CopyConstructor copy;
using Destructor = void(__thiscall*)(UiEvent* thisptr);
Destructor destructor;
};
Api& get();
} // namespace UiEventApi
} // namespace game
#endif // UIEVENT_H
| 2,736
|
C++
|
.h
| 80
| 30.975
| 98
| 0.722855
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,336
|
idset.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/idset.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDSET_H
#define IDSET_H
#include "d2pair.h"
#include "d2set.h"
#include "midgardid.h"
namespace game {
using IdSet = Set<CMidgardID>;
using IdSetIterator = SetIterator<CMidgardID>;
namespace IdSetApi {
struct Api
{
using Constructor = IdSet*(__thiscall*)(IdSet* thisptr);
Constructor constructor;
using Destructor = void(__thiscall*)(IdSet* thisptr);
Destructor destructor;
using Insert = Pair<IdSetIterator, bool>*(__thiscall*)(IdSet* thisptr,
Pair<IdSetIterator, bool>* result,
const CMidgardID* value);
Insert insert;
/**
* Searches for specified id.
* @returns iterator pointing to the found node or end node if nothing found.
*/
using Find = IdSetIterator*(__thiscall*)(const IdSet* thisptr,
IdSetIterator* iterator,
const CMidgardID* id);
Find find;
};
Api& get();
} // namespace IdSetApi
} // namespace game
#endif // IDSET_H
| 1,925
|
C++
|
.h
| 50
| 31.72
| 93
| 0.659506
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,337
|
netplayerinfo.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netplayerinfo.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETPLAYERINFO_H
#define NETPLAYERINFO_H
#include "lordcat.h"
#include "midgardid.h"
#include "racecategory.h"
#include "smartptr.h"
#include <cstdint>
namespace game {
/** Holds information about network or local game player. */
struct NetPlayerInfo
{
std::uint32_t playerNetId;
CMidgardID playerId;
/** Assumption: true if player controlled by human, not AI. */
bool controlledByHuman;
char padding[3];
int face;
LRaceCategory raceCategory;
LLordCategory lordCategory;
char name[65];
char unknown5[3];
SmartPtr<void> importLeaderStore;
bool leaderImportDisabled;
char unknown6[7];
};
assert_size(NetPlayerInfo, 124);
} // namespace game
#endif // NETPLAYERINFO_H
| 1,543
|
C++
|
.h
| 46
| 30.891304
| 72
| 0.753691
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,338
|
mqnetservice.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqnetservice.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MQNETSERVICE_H
#define MQNETSERVICE_H
#include "d2list.h"
#include <guiddef.h>
namespace game {
struct IMqNetSession;
struct IMqNetSessEnum;
struct IMqNetServiceVftable;
struct IMqNetService
{
IMqNetServiceVftable* vftable;
};
struct IMqNetServiceVftable
{
using Destructor = void(__thiscall*)(IMqNetService* thisptr, char flags);
Destructor destructor;
using HasSessions = bool(__thiscall*)(IMqNetService* thisptr);
HasSessions hasSessions;
/**
* Returns list of sessions.
* CNetDPlayService calls IDirectPlay4::EnumSessions here.
* @param allSessions if set adds all found sessions to the list, otherwise available only.
* DPENUMSESSIONS_ALL or DPENUMSESSIONS_AVAILABLE in case of CNetDPlayService.
*/
using GetSessions = void(__thiscall*)(IMqNetService* thisptr,
List<IMqNetSessEnum*>* sessions,
const GUID* appGuid,
const char* ipAddress,
bool allSessions,
bool requirePassword);
GetSessions getSessions;
/**
* Creates session with specified guid, name and password.
* CNetDPlayService calls IDirectPlay4::Open with DPOPEN_CREATE here.
*/
using CreateSession = void(__thiscall*)(IMqNetService* thisptr,
IMqNetSession** netSession,
const GUID* appGuid,
const char* sessionName,
const char* password);
CreateSession createSession;
/**
* Joins session specified by netSessionEnum.
* CNetDPlayService calls IDirectPlay4::Open with DPOPEN_JOIN here.
*/
using JoinSession = void(__thiscall*)(IMqNetService* thisptr,
IMqNetSession** netSession,
IMqNetSessEnum* netSessionEnum,
const char* password);
JoinSession joinSession;
};
assert_vftable_size(IMqNetServiceVftable, 5);
} // namespace game
#endif // MQNETSERVICE_H
| 3,072
|
C++
|
.h
| 72
| 32.597222
| 95
| 0.633746
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,339
|
leadercategory.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/leadercategory.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LEADERCATEGORY_H
#define LEADERCATEGORY_H
#include "categories.h"
namespace game {
struct LLeaderCategoryTable : public CEnumConstantTable<LeaderId>
{ };
struct LLeaderCategory : public Category<LeaderId>
{ };
} // namespace game
#endif // LEADERCATEGORY_H
| 1,084
|
C++
|
.h
| 28
| 36.857143
| 72
| 0.773117
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,340
|
imgstore2loader.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/imgstore2loader.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IMGSTORE2LOADER_H
#define IMGSTORE2LOADER_H
#include "d2pair.h"
#include "d2unorderedmap.h"
#include "imgstore2.h"
#include "smartptr.h"
#include <cstdint>
namespace game {
struct CMqPresentationManager;
struct CImgStore2LoaderWeakDup;
struct TextureHandle;
struct ImgStore2LoaderUnordMapData
{
int refCount;
std::uint32_t ffImageClassSize;
TextureHandle* textureHandle;
int unknown4;
int unknown5;
int unknown6;
CImgStore2::Image* ffImage;
int imageId;
};
assert_size(ImgStore2LoaderUnordMapData, 32);
using ImageIdFlippedFlagPair = Pair<int /* imageId */, bool /* Assumption: flipped image flag */>;
using ImgStore2LoaderUnordMapRecord = UnorderedMapBucket<ImageIdFlippedFlagPair,
ImgStore2LoaderUnordMapData>;
assert_size(ImgStore2LoaderUnordMapRecord, 48);
struct ImgStore2LoaderUnordMapIterator
{
bool unknown;
char padding[3];
ImgStore2LoaderUnordMapRecord** records;
ImgStore2LoaderUnordMapRecord* record;
std::uint32_t recordsTotal;
bool valid;
char padding2[3];
};
assert_size(ImgStore2LoaderUnordMapIterator, 20);
struct ImgStore2Loader
{
SmartPtr<CMqPresentationManager> presentationManager;
void* memPool;
CImgStore2LoaderWeakDup* store2Loader;
UnorderedMap<ImageIdFlippedFlagPair, ImgStore2LoaderUnordMapData> unordered_map;
int unknown; /**< Maybe part of unordered_map */
};
assert_size(ImgStore2Loader, 60);
struct ImgStore2LoaderWrapper
{
ImgStore2Loader* data;
};
assert_size(ImgStore2LoaderWrapper, 4);
} // namespace game
#endif // IMGSTORE2LOADER_H
| 2,448
|
C++
|
.h
| 72
| 30.569444
| 98
| 0.76897
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,341
|
unitsforhire.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/unitsforhire.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UNITSFORHIRE_H
#define UNITSFORHIRE_H
#include <filesystem>
#include <vector>
namespace game {
struct CMidgardID;
}; // namespace game
namespace hooks {
using IdsArray = std::vector<game::CMidgardID>;
/**
* Each race has an array of units for hire.
* Race indices are RaceId values.
* Neutrals has empty array.
*/
using UnitsForHire = std::vector<IdsArray>;
/**
* Tries to load new units for hire in cities.
* Searches Grace.dbf for new columns 'SOLDIER_N', starting from N = 6.
* New units can be accessed using unitsForHire().
* @returns false in case of database access error.
*/
bool loadUnitsForHire();
const UnitsForHire& unitsForHire();
} // namespace hooks
#endif // UNITSFORHIRE_H
| 1,529
|
C++
|
.h
| 43
| 33.72093
| 72
| 0.758808
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,342
|
buildingbranch.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/buildingbranch.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BUILDINGBRANCH_H
#define BUILDINGBRANCH_H
#include "d2map.h"
#include "d2string.h"
#include "racecategory.h"
namespace game {
struct TBuildingUnitUpgType;
struct TBuildingType;
struct CPhaseGame;
/**
* Each node stores pair of building id type indices.
* First element in pair is a id type index of TBuildingType::buildingId.
* Second element in pair is a id type index of TBuildingTypeData::requiredId.
*/
using BuildingBranchMap = Map<int, int>;
/** Correspond to separate capital building tabs. */
enum class BuildingBranchNumber : int
{
Fighter = 0,
Mage,
Archer,
Other,
Special,
};
struct CBuildingBranchData
{
BuildingBranchMap map;
BuildingBranchNumber branchNumber;
LRaceCategory raceCategory;
String branchDialogName;
};
assert_size(CBuildingBranchData, 60);
struct CBuildingBranch
{
const void* vftable;
CBuildingBranchData* data;
};
namespace CBuildingBranchApi {
struct Api
{
/** Creates CBuildingBranch for specified branchNumber. */
using Constructor = CBuildingBranch*(__thiscall*)(CBuildingBranch* thisptr,
int phaseGame,
BuildingBranchNumber* branchNumber);
Constructor constructor;
/** Initializes CBuildingBranchData with default values. */
using InitData = CBuildingBranchData*(__thiscall*)(CBuildingBranchData* thisptr);
InitData initData;
using InitBranchMap = void*(__thiscall*)(BuildingBranchMap* map);
InitBranchMap initBranchMap;
/**
* Adds sideshow unit building to building branch.
* @param[in] unknown pointer to CBuildingBranch::data->unk1.
* @param[in] building sideshow unit building to add.
*/
using AddSideshowUnitBuilding = void(__stdcall*)(BuildingBranchMap* map,
const TBuildingUnitUpgType* building);
AddSideshowUnitBuilding addSideshowUnitBuilding;
/**
* Adds unit building to building branch.
* @param[in] phaseGame
* @param[in] data pointer to building branch data.
* @param[in] building unit building to add.
*/
using AddUnitBuilding = void(__stdcall*)(CPhaseGame* phaseGame,
BuildingBranchMap* map,
const TBuildingUnitUpgType* building);
AddUnitBuilding addUnitBuilding;
/**
* Adds building to building branch.
* @param[in] phaseGame
* @param[in] data pointer to building branch data.
* @param[in] building building to add.
*/
using AddBuilding = void(__stdcall*)(CPhaseGame* phaseGame,
BuildingBranchMap* map,
const TBuildingType* building);
AddBuilding addBuilding;
using CreateDialogName = char*(__thiscall*)(CBuildingBranch* thisptr);
CreateDialogName createDialogName;
};
Api& get();
const void* vftable();
} // namespace CBuildingBranchApi
} // namespace game
#endif // BUILDINGBRANCH_H
| 3,905
|
C++
|
.h
| 104
| 31.105769
| 91
| 0.687483
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,343
|
itemarmor.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemarmor.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMARMOR_H
#define ITEMARMOR_H
#include "itemequipment.h"
namespace game {
struct CItemArmor : public CItemEquipment
{ };
assert_size(CItemArmor, 24);
} // namespace game
#endif // ITEMARMOR_H
| 1,021
|
C++
|
.h
| 27
| 35.925926
| 72
| 0.765957
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,344
|
midruin.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midruin.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDRUIN_H
#define MIDRUIN_H
#include "aipriority.h"
#include "currency.h"
#include "mapelement.h"
#include "midgardid.h"
#include "midscenarioobject.h"
#include "midunitgroup.h"
#include "stringandid.h"
#include <cstddef>
namespace game {
struct CMidUnitGroupRuin : public CMidUnitGroup
{ };
struct CMidRuin : public IMidScenarioObject
{
IMapElement mapElement;
IAiPriority aiPriority;
CMidUnitGroupRuin group;
StringAndId title;
StringAndId description;
Bank cash;
CMidgardID itemId;
CMidgardID looterId;
char visitorData[28];
int imageIndex;
};
assert_size(CMidRuin, 164);
assert_offset(CMidRuin, group, 36);
assert_offset(CMidRuin, description, 100);
assert_offset(CMidRuin, looterId, 128);
} // namespace game
#endif // MIDRUIN_H
| 1,602
|
C++
|
.h
| 50
| 29.74
| 72
| 0.767487
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,345
|
umunithooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/umunithooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UMUNITHOOKS_H
#define UMUNITHOOKS_H
namespace game {
struct CMidgardID;
struct GlobalData;
struct CDBTable;
struct IAttack;
struct IUsSoldier;
struct CUmUnit;
} // namespace game
namespace hooks {
game::CUmUnit* __fastcall umUnitCtorHooked(game::CUmUnit* thisptr,
int /*%edx*/,
const game::CMidgardID* modifierId,
game::CDBTable* dbTable,
const game::GlobalData** globalData);
game::CUmUnit* __fastcall umUnitCopyCtorHooked(game::CUmUnit* thisptr,
int /*%edx*/,
const game::CUmUnit* src);
int* __fastcall umUnitGetRegenHooked(const game::IUsSoldier* thisptr, int /*%edx*/);
} // namespace hooks
#endif // UMUNITHOOKS_H
| 1,714
|
C++
|
.h
| 40
| 34.575
| 84
| 0.64886
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,346
|
attackclasscat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/attackclasscat.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ATTACKCLASSCAT_H
#define ATTACKCLASSCAT_H
#include "categories.h"
namespace game {
struct LAttackClassTable : public CEnumConstantTable<AttackClassId>
{ };
struct LAttackClass : public Category<AttackClassId>
{ };
namespace AttackClassCategories {
struct Categories
{
LAttackClass* paralyze;
LAttackClass* petrify;
LAttackClass* damage;
LAttackClass* drain;
LAttackClass* heal;
LAttackClass* fear;
LAttackClass* boostDamage;
LAttackClass* lowerDamage;
LAttackClass* lowerInitiative;
LAttackClass* poison;
LAttackClass* frostbite;
LAttackClass* revive;
LAttackClass* drainOverflow;
LAttackClass* cure;
LAttackClass* summon;
LAttackClass* drainLevel;
LAttackClass* giveAttack;
LAttackClass* doppelganger;
LAttackClass* transformSelf;
LAttackClass* transformOther;
LAttackClass* blister;
LAttackClass* bestowWards;
LAttackClass* shatter;
};
Categories& get();
/** Returns address of LAttackClass::vftable used in game. */
const void* vftable();
} // namespace AttackClassCategories
namespace LAttackClassTableApi {
using Api = CategoryTableApi::Api<LAttackClassTable, LAttackClass>;
Api& get();
/** Returns address of LAttackClassTable::vftable used in game. */
const void* vftable();
} // namespace LAttackClassTableApi
} // namespace game
#endif // ATTACKCLASSCAT_H
| 2,194
|
C++
|
.h
| 65
| 30.815385
| 72
| 0.769886
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,347
|
midunitgroupadapter.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midunitgroupadapter.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDUNITGROUPADAPTER_H
#define MIDUNITGROUPADAPTER_H
#include "idvector.h"
#include "smartptr.h"
#include "unitgroup.h"
namespace game {
struct IMidgardObjectMap;
struct GroupAdapterUnitData
{
bool unknown;
bool unknown2;
bool unknown3;
char padding;
int highLevel;
bool boostApplied;
bool lowerApplied;
bool potionApplied;
bool canLevelUp;
};
assert_size(GroupAdapterUnitData, 12);
struct CMidUnitGroupAdapterData
{
IMidgardObjectMap* objectMap;
Vector<SmartPointer> array;
Vector<SmartPointer> array2;
IdVector idArray;
int unknown2;
CMidgardID groupId;
CMidgardID playerId;
GroupAdapterUnitData unitData[6];
char unknown3[8];
};
assert_size(CMidUnitGroupAdapterData, 144);
struct CMidUnitGroupAdapter : public IUnitGroup
{
CMidUnitGroupAdapterData* data;
};
assert_size(CMidUnitGroupAdapter, 8);
} // namespace game
#endif // MIDUNITGROUPADAPTER_H
| 1,758
|
C++
|
.h
| 58
| 27.5
| 72
| 0.771327
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,348
|
ussoldierimpl.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/ussoldierimpl.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef USSOLDIERIMPL_H
#define USSOLDIERIMPL_H
#include "currency.h"
#include "d2pair.h"
#include "deathanimcat.h"
#include "midgardid.h"
#include "mq_c_s.h"
#include "subracecat.h"
#include "textandid.h"
#include "unitbranchcat.h"
#include "ussoldier.h"
#include <cstddef>
namespace game {
using AttackSourceImmuneMap = mq_c_s<Pair<LAttackSource, LImmuneCat>>;
using AttackClassImmuneMap = mq_c_s<Pair<LAttackClass, LImmuneCat>>;
struct TUsSoldierImplData
{
CMidgardID unitId;
TextAndId name;
TextAndId description;
int level;
int hitPoints;
int armor;
CMidgardID baseUnitImplId;
LDeathAnimCategory deathAnimation;
int xpNext;
int xpKilled;
int regen;
Bank enrollCost;
Bank reviveCost;
Bank healCost;
Bank trainingCost;
CMidgardID raceId;
LSubRaceCategory subrace;
CMidgardID attackId;
CMidgardID attack2Id;
LUnitBranch branch;
AttackSourceImmuneMap attackSourceImmuneMap;
AttackClassImmuneMap attackClassImmuneMap;
bool sizeSmall;
bool sexM;
bool attackTwice;
char padding;
int dynUpg1;
int dynUpgLvl;
int dynUpg2;
bool waterOnly;
char padding2[3];
};
assert_size(TUsSoldierImplData, 204);
assert_offset(TUsSoldierImplData, sizeSmall, 184);
/** Base class for all unit types, holds data read from GUnits.dbf. */
struct TUsSoldierImpl : public IUsSoldier
{
TUsSoldierImplData* data;
};
namespace TUsSoldierImplApi {
const IUsSoldierVftable* vftable();
} // namespace TUsSoldierImplApi
} // namespace game
#endif // USSOLDIERIMPL_H
| 2,385
|
C++
|
.h
| 79
| 27.202532
| 72
| 0.76286
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,349
|
categories.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/categories.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CATEGORIES_H
#define CATEGORIES_H
#include "categoryids.h"
namespace game {
/** Category table record, contains data read from database. */
template <typename T>
struct TableRecord
{
T id;
char* name;
};
/** Base class for all category tables. */
template <typename T>
struct CEnumConstantTable
{
const void* vftable;
TableRecord<T>* bgn;
TableRecord<T>* end;
TableRecord<T>* allocatedMemEnd;
void* allocator;
};
/** Base class for all category types. */
template <typename T>
struct Category
{
const void* vftable;
CEnumConstantTable<T>* table;
T id;
};
struct LAttitudesCategoryTable : CEnumConstantTable<AiAttitudeId>
{ };
struct LAttitudesCategory : public Category<AiAttitudeId>
{ };
static const int emptyCategoryId = -1;
namespace CategoryTableApi {
template <typename Table, typename Category>
struct Api
{
/** Creates table and categories from contents of dbf file. */
using Constructor = Table*(__thiscall*)(Table* thisptr,
const char* globalsFolderPath,
void* codeBaseEnvProxy);
Constructor constructor;
/** Performs initialization before reading categories. */
using Init = void(__stdcall*)(Table* table,
void* codeBaseEnvProxy,
const char* globalsFolderPath,
const char* dbfFileName);
Init init;
/**
* Reads categories from dbf file using category name.
* Throws exception if category with specified name could not be found in dbf table.
* @param[inout] category category structure to store the result.
* @param[in] table initialized category table to search for id constants by name.
* @param[in] fieldName dbf table field name that represents category.
* @param[in] dbfFileName name of dbf table to read from.
* @returns pointer to category.
*/
using ReadCategory = Category*(__stdcall*)(Category* category,
Table* table,
const char* fieldName,
const char* dbfFileName);
ReadCategory readCategory;
/** Performs necessary cleanup after categories was read. */
using InitDone = void*(__thiscall*)(Table* table);
InitDone initDone;
/** Looks for category with the specified id, otherwise initializes the value with null table
* and id = -1. */
using FindCategoryById = Category*(__thiscall*)(Table* thisptr,
Category* value,
const int* categoryId);
FindCategoryById findCategoryById;
};
} // namespace CategoryTableApi
} // namespace game
#endif // CATEGORIES_H
| 3,692
|
C++
|
.h
| 94
| 31.734043
| 97
| 0.654749
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,350
|
batattackdrainlevel.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattackdrainlevel.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BATATTACKDRAINLEVEL_H
#define BATATTACKDRAINLEVEL_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
struct IAttack;
struct CBatAttackDrainLevel : public CBatAttackBase
{
CMidgardID unitId;
CMidgardID unitOrItemId;
int attackNumber;
IAttack* attack;
int unknown;
};
assert_size(CBatAttackDrainLevel, 24);
namespace CBatAttackDrainLevelApi {
IBatAttackVftable* vftable();
} // namespace CBatAttackDrainLevelApi
} // namespace game
#endif // BATATTACKDRAINLEVEL_H
| 1,328
|
C++
|
.h
| 38
| 32.684211
| 72
| 0.779515
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,351
|
itemweapon.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemweapon.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMWEAPON_H
#define ITEMWEAPON_H
#include "itemequipment.h"
namespace game {
struct CItemWeapon : public CItemEquipment
{ };
assert_size(CItemWeapon, 24);
} // namespace game
#endif // ITEMWEAPON_H
| 1,026
|
C++
|
.h
| 27
| 36.111111
| 72
| 0.767137
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,352
|
netdplaysession.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netdplaysession.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETDPLAYSESSION_H
#define NETDPLAYSESSION_H
#include "d2list.h"
#include "mqnetsession.h"
#include <guiddef.h>
namespace game {
struct CNetDPlayService;
struct CNetDPlayPlayerServer;
struct CNetDPlayPlayerClient;
/** DirectPlay implementation of net session. */
struct CNetDPlaySession : public IMqNetSession
{
CNetDPlayService* service;
GUID sessionGuid;
GUID appGuid;
CNetDPlayPlayerServer* server;
List<CNetDPlayPlayerClient*> clients;
bool host;
char padding[3];
};
assert_size(CNetDPlaySession, 64);
} // namespace game
#endif // NETDPLAYSESSION_H
| 1,409
|
C++
|
.h
| 41
| 32.073171
| 72
| 0.774265
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,353
|
targetslistutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/targetslistutils.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TARGETSLISTUTILS_H
#define TARGETSLISTUTILS_H
#include "midgardid.h"
namespace game {
struct CMidUnitGroup;
} // namespace game
namespace hooks {
game::CMidgardID getTargetUnitId(int unitPosition,
const game::CMidUnitGroup* targetGroup,
const game::CMidUnitGroup* otherGroup);
} // namespace hooks
#endif // TARGETSLISTUTILS_H
| 1,221
|
C++
|
.h
| 30
| 36.7
| 72
| 0.736486
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,354
|
taskmapchange.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/taskmapchange.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TASKMAPCHANGE_H
#define TASKMAPCHANGE_H
#include "taskbase.h"
namespace game {
struct CTaskManager;
namespace editor {
struct CMapInterf;
enum class BrushSize : int
{
Brush1x1,
Brush3x3,
Brush5x5
};
struct CTaskMapChangeData
{
CTaskManager* taskManager;
CMapInterf* mapInterface;
BrushSize brushSize;
int unknown;
int unknown2;
SmartPointer ptr;
SmartPointer ptr2;
SmartPointer ptr3;
};
assert_size(CTaskMapChangeData, 44);
/** Base class for map changing tools logic. */
struct CTaskMapChange : CTaskBase
{
CTaskMapChangeData* mapChangeData;
};
} // namespace editor
} // namespace game
#endif // TASKMAPCHANGE_H
| 1,494
|
C++
|
.h
| 51
| 26.784314
| 72
| 0.763103
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,355
|
unitpositionpair.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/unitpositionpair.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UNITPOSITIONPAIR_H
#define UNITPOSITIONPAIR_H
#include "d2assert.h"
#include "d2pair.h"
namespace game {
/**
* Unit position (0-5) to mark during single battle turn.
* The second component determines if the position is in attack's target list
* (IBatAttack::FillTargetsList; position has frame highlight on group panel).
*/
using UnitPositionPair = Pair<int, bool>;
assert_size(UnitPositionPair, 8);
} // namespace game
#endif // UNITPOSITIONPAIR_H
| 1,281
|
C++
|
.h
| 32
| 38.15625
| 78
| 0.768116
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,356
|
sitemerchantinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/sitemerchantinterf.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SITEMERCHANTINTERF_H
#define SITEMERCHANTINTERF_H
#include "middatacache.h"
#include "middragdropinterf.h"
#include "resetstackext.h"
#include "smartptr.h"
namespace game {
struct CSiteMerchantInterfData
{
CMidgardID stackId;
int unknown;
int unknown2;
CMidgardID merchantId;
char unknown3[60];
};
assert_size(CSiteMerchantInterfData, 76);
/**
* Shows merchant trade window.
* Represents DLG_MERCHANT from Interf.dlg.
*/
struct CSiteMerchantInterf : public CMidDataCache2::INotify
{
IResetStackExt resetStackExt;
CMidDragDropInterf dragDropInterf;
CSiteMerchantInterfData* data;
};
assert_size(CSiteMerchantInterf, 40);
namespace CSiteMerchantInterfApi {
struct Api
{
using Constructor = CSiteMerchantInterf*(__thiscall*)(CSiteMerchantInterf* thisptr,
void* taskOpenInterf,
CPhaseGame* phaseGame,
CMidgardID* stackId,
CMidgardID* merchantId);
Constructor constructor;
struct ButtonCallback
{
using Callback = void(__thiscall*)(CSiteMerchantInterf* thisptr);
Callback callback;
int unknown;
};
using CreateButtonFunctor = SmartPointer*(__stdcall*)(SmartPointer* functor,
int a2,
CSiteMerchantInterf* merchantInterf,
ButtonCallback* callback);
CreateButtonFunctor createButtonFunctor;
};
Api& get();
struct Vftable
{
const CMidDataCache2::INotifyVftable* notify;
const IResetStackExtVftable* resetStackExt;
const CInterfaceVftable* dragDropInterf;
const ITaskManagerHolderVftable* taskManagerHolder;
const IMidDropManagerVftable* dropManager;
};
Vftable& vftable();
} // namespace CSiteMerchantInterfApi
} // namespace game
#endif // SITEMERCHANTINTERF_H
| 2,904
|
C++
|
.h
| 79
| 28.822785
| 94
| 0.667617
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,357
|
racecategory.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/racecategory.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RACECATEGORY_H
#define RACECATEGORY_H
#include "categories.h"
namespace game {
struct LRaceCategoryTable : public CEnumConstantTable<RaceId>
{ };
struct LRaceCategory : public Category<RaceId>
{ };
namespace RaceCategories {
struct Categories
{
LRaceCategory* human;
LRaceCategory* dwarf;
LRaceCategory* heretic;
LRaceCategory* undead;
LRaceCategory* neutral;
LRaceCategory* elf;
};
Categories& get();
/** Returns address of LRaceCategory::vftable used in game. */
const void* vftable();
} // namespace RaceCategories
namespace LRaceCategoryTableApi {
using Api = CategoryTableApi::Api<LRaceCategoryTable, LRaceCategory>;
Api& get();
/** Returns address of LRaceCategoryTable::vftable used in game. */
const void* vftable();
} // namespace LRaceCategoryTableApi
} // namespace game
#endif // RACECATEGORY_H
| 1,668
|
C++
|
.h
| 48
| 32.541667
| 72
| 0.771054
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,358
|
mquikernelsimple.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mquikernelsimple.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MQUIKERNELSIMPLE_H
#define MQUIKERNELSIMPLE_H
#include "d2list.h"
#include "d2pair.h"
#include "mqpoint.h"
#include "mqrect.h"
#include "mquikernel.h"
namespace game {
struct TimerData
{
std::uint32_t timerId;
int creationTime;
std::uint32_t timeoutMs;
};
assert_size(TimerData, 12);
struct CMqUIKernelSimpleData
{
int unknown;
Pair<HWND, bool>* childWndHandle;
WNDPROC oldWndProc;
HINSTANCE instance;
HINSTANCE instanceCopy;
char* windowTitle;
bool hasFocus;
bool minimized;
char padding[2];
List<TimerData> timers;
std::uint32_t lastTimerId;
int systemTime;
CMqPoint mousePosClient;
CMqPoint mousePosScreen;
CMqRect clientArea;
bool unknown17;
char padding2[3];
IMqUIController* uiController;
};
assert_size(CMqUIKernelSimpleData, 92);
struct CMqUIKernelSimple : public IMqUIKernel
{
CMqUIKernelSimpleData* data;
};
assert_size(CMqUIKernelSimple, 8);
} // namespace game
#endif // MQUIKERNELSIMPLE_H
| 1,821
|
C++
|
.h
| 62
| 26.5
| 72
| 0.756865
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,359
|
midserverbuilder.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midserverbuilder.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDSERVERBUILDER_H
#define MIDSERVERBUILDER_H
#include "midgardid.h"
namespace game {
struct IMidServerBuilderVftable;
struct CMidServerLogic;
struct CMidServer;
struct IMidServerBuilder
{
IMidServerBuilderVftable* vftable;
};
struct IMidServerBuilderVftable
{
using Destructor = void(__thiscall*)(IMidServerBuilder* thisptr, char flags);
Destructor destructor;
using CreateServerLogic = CMidServerLogic*(__thiscall*)(IMidServerBuilder* thisptr,
CMidServer* server);
CreateServerLogic createServerLogic;
using LoadScenario = void(__thiscall*)(IMidServerBuilder* thisptr,
CMidServer* midServer,
CMidServerLogic* serverLogic);
LoadScenario loadScenario;
using IsMultiplayerGame = bool(__thiscall*)(const IMidServerBuilder* thisptr);
IsMultiplayerGame isMultiplayerGame;
/**
* Assumption: returns number of players in loaded scenario.
* @returns CMidServerBuilderFull::unknown.
*/
using GetPlayerCount = int(__thiscall*)(IMidServerBuilder* thisptr);
GetPlayerCount getPlayerCount;
};
assert_vftable_size(IMidServerBuilderVftable, 5);
struct CMidServerBuilderFull : public IMidServerBuilder
{
int unknown;
char unknown2;
bool useRandom;
bool multiplayerGame;
bool hotseatGame;
int value3; /**< Always set to 3 in constructor. */
int gameVersion;
CMidgardID id;
CMidgardID campaignId;
char scenarioFilePath[261];
};
assert_size(CMidServerBuilderFull, 292);
} // namespace game
#endif // MIDSERVERBUILDER_H
| 2,485
|
C++
|
.h
| 66
| 32.393939
| 87
| 0.726705
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,360
|
networkpeer.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/networkpeer.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETWORKPEER_H
#define NETWORKPEER_H
#include "uievent.h"
#include <MessageIdentifiers.h>
#include <RakPeerInterface.h>
#include <memory>
#include <vector>
namespace hooks {
class NetworkPeerCallbacks
{
public:
virtual ~NetworkPeerCallbacks() = default;
virtual void onPacketReceived(DefaultMessageIDTypes type,
SLNet::RakPeerInterface* peer,
const SLNet::Packet* packet) = 0;
};
/**
* Wraps SLikeNet peer interface and game timer event for network packets processing.
* Allows users to subscribe to peer packet events.
*/
struct NetworkPeer
{
struct PeerDeleter
{
void operator()(SLNet::RakPeerInterface* peer)
{
peer->Shutdown(100);
SLNet::RakPeerInterface::DestroyInstance(peer);
}
};
using PeerPtr = std::unique_ptr<SLNet::RakPeerInterface, PeerDeleter>;
NetworkPeer(PeerPtr&& peer);
~NetworkPeer();
void addCallback(NetworkPeerCallbacks* callback);
void removeCallback(NetworkPeerCallbacks* callback);
game::UiEvent packetEvent{};
std::vector<NetworkPeerCallbacks*> callbacks;
std::vector<NetworkPeerCallbacks*> removeCallbacks;
PeerPtr peer;
};
} // namespace hooks
#endif // NETWORKPEER_H
| 2,102
|
C++
|
.h
| 60
| 30.633333
| 85
| 0.724138
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,361
|
isocbscroll.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/isocbscroll.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ISOCBSCROLL_H
#define ISOCBSCROLL_H
namespace game {
struct IIsoCBScrollVftable;
struct IIsoCBScroll
{
IIsoCBScrollVftable* vftable;
};
// Virtual table does not contain destructor
struct IIsoCBScrollVftable
{
using Method1 = void(__thiscall*)(IIsoCBScroll* thisptr, int a2, int a3);
Method1 method1;
};
} // namespace game
#endif // ISOCBSCROLL_H
| 1,187
|
C++
|
.h
| 34
| 32.852941
| 77
| 0.767888
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,362
|
wavstore.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/wavstore.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef WAVSTORE_H
#define WAVSTORE_H
#include "d2map.h"
#include "d2set.h"
#include "smartptr.h"
namespace game {
struct CSoundSystemSample;
struct Wdb;
/** Sound effects from midgard.wdb. */
enum class SoundEffect : int
{
Appear, /**< APPEAR */
Boat, /**< BOATSND */
EnterSite, /**< ENTRSITE */
EnterRuin, /**< ENTRRUIN */
EnterCity, /**< ENTRCITY */
ExitCity, /**< EXITCITY */
Occupy, /**< OCCUPY */
SpellDis, /**< SPELLDIS */
LootRuin, /**< LOOTRUIN */
Enroll, /**< ENROLL */
Occupy2, /**< OCCUPY */
Beep, /**< BEEP */
Botreprt, /**< BOTREPRT */
Seebat, /**< SEEBAT */
Sbattle, /**< SBATTLE */
Snoble, /**< SNOBLE */
Stolen, /**< STOLEN */
Building, /**< BUILDING */
Openbook, /**< OPENBOOK */
Closbook, /**< CLOSBOOK */
Bkpopup, /**< BKPOPUP */
Openintr, /**< OPENINTR */
Closintr, /**< CLOSINTR */
Potionboost, /**< PBOOST */
Potionheal, /**< PHEAL */
Potionrevive, /**< PREVIVE */
UseItem, /**< USEITEM */
BuyItem, /**< BUYITEM */
CityGrow, /**< CITYGROW */
TakeBag, /**< TAKEBAG */
SpinRock, /**< SPINROCK */
ChangeFace, /**< CHNGFACE */
SoundFx, /**< SOUNDFX */
GiveGold, /**< GIVEGOLD */
TradeSpell, /**< TRADSPEL */
Reftrspe, /**< REFTRSPE */
TradeItem, /**< TRADITEM */
Reftritm, /**< REFTRITM */
Alliance, /**< ALLIANCE */
Refallia, /**< REFALLIA */
Brkallia, /**< BRKALLIA */
AiChat, /**< AICHAT */
Aunn7778, /**< AUNN7778 */
Aunn7788, /**< AUNN7788 */
EndRiot, /**< ENDRIOT */
CreateStack, /**< CREATSTK */
};
struct SoundEffectInfo
{
void* data; /** < Mqrc data from .wdb file. */
std::uint32_t size; /**< Data size in bytes. */
std::uint32_t startTime; /**< Time when effect started playing. */
};
assert_size(SoundEffectInfo, 12);
struct CWavStoreData
{
SmartPtr<CSoundSystemSample> soundSystemSample;
SmartPointer memPool;
SmartPtr<Wdb> wdb;
Map<char[16] /* name */, SoundEffectInfo> effectCache;
Set<int> list2;
};
assert_size(CWavStoreData, 80);
struct CWavStore
{
CWavStoreData* data;
};
assert_size(CWavStore, 4);
} // namespace game
#endif // WAVSTORE_H
| 3,235
|
C++
|
.h
| 99
| 29.151515
| 72
| 0.596542
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,363
|
midlocation.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midlocation.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDLOCATION_H
#define MIDLOCATION_H
#include "mapelement.h"
#include "midgardid.h"
#include "midscenarioobject.h"
#include "stringandid.h"
#include <cstddef>
namespace game {
/** Holds location related data in scenario file and game. */
struct CMidLocation
: public IMapElement
, public IMidScenarioObject
{
StringAndId name;
int radius;
};
assert_size(CMidLocation, 44);
assert_offset(CMidLocation, CMidLocation::IMapElement::vftable, 0);
assert_offset(CMidLocation, CMidLocation::IMidScenarioObject::vftable, 20);
} // namespace game
#endif // MIDLOCATION_H
| 1,403
|
C++
|
.h
| 39
| 33.948718
| 75
| 0.770818
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,364
|
enclayoutstackhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/enclayoutstackhooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ENCLAYOUTSTACKHOOKS_H
#define ENCLAYOUTSTACKHOOKS_H
namespace game {
struct IMidgardObjectMap;
struct CDialogInterf;
struct CMidStack;
struct CEncLayoutStack;
} // namespace game
namespace hooks {
void __fastcall encLayoutStackUpdateHooked(game::CEncLayoutStack* thisptr,
int /*%edx*/,
const game::IMidgardObjectMap* objectMap,
const game::CMidStack* stack,
game::CDialogInterf* dialog);
} // namespace hooks
#endif // ENCLAYOUTSTACKHOOKS_H
| 1,440
|
C++
|
.h
| 34
| 35.617647
| 84
| 0.689286
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,365
|
mainview2.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mainview2.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAINVIEW2_H
#define MAINVIEW2_H
#include "fullscreeninterf.h"
#include "middatacache.h"
#include "mqpoint.h"
#include "smartptr.h"
namespace game {
struct CPhaseGame;
struct CZoomInterface;
struct CDialogInterf;
struct IMqImage2;
struct CToggleButton;
struct CMainView2
: public CFullScreenInterf
, public CMidDataCache2::INotify
{
CPhaseGame* phaseGame;
CInterface* popupDialog;
CMqRect imgPaletteArea;
CInterface* dlgIso;
CZoomInterface* zoomInterface;
CMqRect imgMainArea;
CDialogInterf* resourcePopup;
char unknown14;
char padding[3];
int unknown15;
CDialogInterf* dialogInterf;
CMqRect imgResourceArea;
CMqPoint bgndFillSize;
CMqRect dlgIsoArea;
void* notify1;
IMqImage2* isoOutline;
char unknown29;
char padding2[3];
IMqImage2* isoPalFill;
CMqPoint imgPaletteTopLeftXBottomRightY;
IMqImage2* isoBlackbar;
int unknown34;
int unknown35;
bool unknown36;
bool unknown37;
char padding3[2];
CMqRect dlgIsoArea2;
CMqPoint dlgIsoTopLeft;
};
assert_size(CMainView2, 188);
namespace CMainView2Api {
struct Api
{
using ShowIsoDialog = void(__thiscall*)(CMainView2* thisptr);
ShowIsoDialog showIsoDialog;
/**
* Creates and shows dialog on minimap and options buttons area.
* When dialogName is nullptr, shows DLG_ISO_LAND or DLG_ISO_PAL.
* @param[in] dialogName name of the dialog to show instead of minimap or land capture.
*/
using ShowDialog = void(__thiscall*)(CMainView2* thisptr, const char* dialogName);
ShowDialog showDialog;
struct ToggleButtonCallback
{
using Callback = void(__thiscall*)(CMainView2* thisptr, bool, CToggleButton*);
Callback callback;
int unknown;
};
using CreateToggleButtonFunctor = SmartPointer*(__stdcall*)(SmartPointer* functor,
int a2,
CMainView2* mainView,
ToggleButtonCallback* callback);
CreateToggleButtonFunctor createToggleButtonFunctor;
};
Api& get();
} // namespace CMainView2Api
} // namespace game
#endif // MAINVIEW2_H
| 3,089
|
C++
|
.h
| 92
| 27.913043
| 96
| 0.70312
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,366
|
battleutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/battleutils.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BATTLEUTILS_H
#define BATTLEUTILS_H
namespace game {
struct CMidUnit;
struct BattleMsgData;
} // namespace game
namespace hooks {
int adjustUnitXpReceived(const game::BattleMsgData* battleMsgData,
const game::CMidUnit* unit,
int value);
} // namespace hooks
#endif // BATTLEUTILS_H
| 1,159
|
C++
|
.h
| 30
| 35.2
| 72
| 0.740873
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,367
|
enclayoutruin.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/enclayoutruin.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ENCLAYOUTRUIN_H
#define ENCLAYOUTRUIN_H
#include "enclayout.h"
namespace game {
struct CEncLayoutRuinData;
struct IMidgardObjectMap;
struct CMidRuin;
struct CEncLayoutRuin : public IEncLayout
{
CEncLayoutRuinData* data;
};
assert_size(CEncLayoutRuin, 16);
struct CEncLayoutRuinData
{
const IMidgardObjectMap* objectMap;
char unknown[200];
};
assert_size(CEncLayoutRuinData, 204);
namespace CEncLayoutRuinApi {
struct Api
{
using Update = void(__stdcall*)(const CEncLayoutRuinData* data,
const CMidRuin* ruin,
CDialogInterf* dialog);
Update update;
};
Api& get();
IEncLayoutVftable* vftable();
} // namespace CEncLayoutRuinApi
} // namespace game
#endif // ENCLAYOUTRUIN_H
| 1,600
|
C++
|
.h
| 49
| 29.122449
| 72
| 0.742188
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,368
|
bestowwardshooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/bestowwardshooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BESTOWWARDSHOOKS_H
#define BESTOWWARDSHOOKS_H
namespace game {
struct CBatAttackBestowWards;
struct IMidgardObjectMap;
struct BattleMsgData;
struct CMidgardID;
struct BattleAttackInfo;
} // namespace game
namespace hooks {
bool __fastcall bestowWardsAttackCanPerformHooked(game::CBatAttackBestowWards* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* targetUnitId);
void __fastcall bestowWardsAttackOnHitHooked(game::CBatAttackBestowWards* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* targetUnitId,
game::BattleAttackInfo** attackInfo);
bool __fastcall bestowWardsMethod15Hooked(game::CBatAttackBestowWards* thisptr,
int /*%edx*/,
game::BattleMsgData* battleMsgData);
} // namespace hooks
#endif // BESTOWWARDSHOOKS_H
| 2,188
|
C++
|
.h
| 44
| 36.590909
| 87
| 0.609551
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,369
|
itemtransferhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemtransferhooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMTRANSFERHOOKS_H
#define ITEMTRANSFERHOOKS_H
namespace game {
struct CMidgardID;
struct CCityStackInterf;
struct CPhaseGame;
struct CExchangeInterf;
struct CPickUpDropInterf;
struct CSiteMerchantInterf;
} // namespace game
namespace hooks {
game::CCityStackInterf* __fastcall cityStackInterfCtorHooked(game::CCityStackInterf* thisptr,
int /*%edx*/,
void* taskOpenInterf,
game::CPhaseGame* phaseGame,
game::CMidgardID* cityId);
game::CExchangeInterf* __fastcall exchangeInterfCtorHooked(game::CExchangeInterf* thisptr,
int /*%edx*/,
void* taskOpenInterf,
game::CPhaseGame* phaseGame,
game::CMidgardID* stackLeftSide,
game::CMidgardID* stackRightSide);
game::CPickUpDropInterf* __fastcall pickupDropInterfCtorHooked(game::CPickUpDropInterf* thisptr,
int /*%edx*/,
void* taskOpenInterf,
game::CPhaseGame* phaseGame,
game::CMidgardID* stackId,
game::CMidgardID* bagId);
game::CSiteMerchantInterf* __fastcall siteMerchantInterfCtorHooked(
game::CSiteMerchantInterf* thisptr,
int /*%edx*/,
void* taskOpenInterf,
game::CPhaseGame* phaseGame,
game::CMidgardID* stackId,
game::CMidgardID* merchantId);
} // namespace hooks
#endif // ITEMTRANSFERHOOKS_H
| 2,854
|
C++
|
.h
| 55
| 34.454545
| 96
| 0.548029
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,370
|
usracialnoble.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/usracialnoble.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef USRACIALNOBLE_H
#define USRACIALNOBLE_H
#include "usglobal.h"
#include "usleaderimpl.h"
#include "usnoble.h"
#include "ussoldierimpl.h"
#include "usstackleaderimpl.h"
#include "usunitimpl.h"
#include <cstddef>
namespace game {
/**
* Represents noble (thief) unit template.
* Noble unit in scenario is represented by CMidUnit
* which accesses noble template data via CMidUnit::unitImpl pointer.
* Noble units used for spying and various thief operations.
*/
struct TUsRacialNoble
: public IUsNoble
, public IUsGlobal
, public TUsUnitImpl
, public TUsSoldierImpl
, public TUsStackLeaderImpl
, public TUsLeaderImpl
{ };
assert_size(TUsRacialNoble, 52);
assert_offset(TUsRacialNoble, TUsRacialNoble::IUsNoble::vftable, 0);
assert_offset(TUsRacialNoble, TUsRacialNoble::IUsGlobal::vftable, 4);
assert_offset(TUsRacialNoble, TUsRacialNoble::TUsUnitImpl::vftable, 8);
assert_offset(TUsRacialNoble, TUsRacialNoble::TUsSoldierImpl::vftable, 28);
assert_offset(TUsRacialNoble, TUsRacialNoble::TUsStackLeaderImpl::vftable, 36);
assert_offset(TUsRacialNoble, TUsRacialNoble::TUsLeaderImpl::vftable, 44);
} // namespace game
#endif // USRACIALNOBLE_H
| 1,994
|
C++
|
.h
| 51
| 37.058824
| 79
| 0.782541
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,371
|
midobjectlock.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midobjectlock.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDOBJECTLOCK_H
#define MIDOBJECTLOCK_H
#include "functordispatch0.h"
#include "midcommandqueue2.h"
#include "middatacache.h"
namespace game {
struct CMidObjectLock : public CMidDataCache2::INotify
{
struct Notify1 : public CMidCommandQueue2::INotifyCQ
{
CMidCommandQueue2* commandQueue;
/** Increments CMidObjectLock::pendingLocalUpdates */
SmartPtr<CBFunctorDispatch0> notifyCallback;
};
struct Notify2 : public CMidCommandQueue2::INotifyCQ
{
CMidCommandQueue2* commandQueue;
/** Decrements CMidObjectLock::pendingLocalUpdates */
SmartPtr<CBFunctorDispatch0> notifyCallback;
};
CMidCommandQueue2* commandQueue;
CMidDataCache2* dataCache;
Notify1* notify1;
Notify2* notify2;
/**
* Assumption: incremented at the start of CMidCommandQueue2::notifyList processing
* and decremented at the end.
*/
int pendingLocalUpdates;
/**
* Incremented each time the client sends network message to a server.
* See calls of CPhaseGameIncrementNetworkUpdates
*/
int pendingNetworkUpdates;
/** True when CTaskAskExportLeader is in process. */
bool exportingLeader;
char padding[3];
};
assert_size(CMidObjectLock, 32);
assert_size(CMidObjectLock::Notify1, 16);
assert_size(CMidObjectLock::Notify2, 16);
} // namespace game
#endif // MIDOBJECTLOCK_H
| 2,207
|
C++
|
.h
| 61
| 32.360656
| 87
| 0.747309
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,372
|
netdplayplayerserver.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netdplayplayerserver.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETDPLAYPLAYERSERVER_H
#define NETDPLAYPLAYERSERVER_H
#include "mqnetplayerserver.h"
namespace game {
struct CNetDPlayPlayer;
/** Network player server implementation for DirectPlay. */
struct CNetDPlayPlayerServer : public IMqNetPlayerServer
{
CNetDPlayPlayer* player;
};
assert_size(CNetDPlayPlayerServer, 8);
} // namespace game
#endif // NETDPLAYPLAYERSERVER_H
| 1,197
|
C++
|
.h
| 31
| 36.677419
| 72
| 0.782383
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,373
|
itempotionboostperm.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itempotionboostperm.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMPOTIONBOOSTPERM_H
#define ITEMPOTIONBOOSTPERM_H
#include "itempotionboost.h"
namespace game {
/** Represents permanent boost potion. */
struct CItemPotionBoostPerm : public CItemPotionBoost
{ };
assert_size(CItemPotionBoostPerm, 20);
} // namespace game
#endif // ITEMPOTIONBOOSTPERM_H
| 1,117
|
C++
|
.h
| 28
| 38.035714
| 72
| 0.77634
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,374
|
enclayout.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/enclayout.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ENCLAYOUT_H
#define ENCLAYOUT_H
#include "interface.h"
namespace game {
struct IEncLayoutVftable;
struct CDialogInterf;
struct IMidObject;
struct IEncLayout : public CInterfaceT<IEncLayoutVftable>
{
CDialogInterf* dialog;
};
assert_size(IEncLayout, 12);
struct IEncLayoutVftable : public CInterfaceVftable
{
using OnObjectChanged = void(__thiscall*)(IEncLayout* thisptr, const IMidObject* obj);
OnObjectChanged onObjectChanged;
};
assert_vftable_size(IEncLayoutVftable, 35);
namespace IEncLayoutApi {
struct Api
{
using Constructor = IEncLayout*(__thiscall*)(IEncLayout* thisptr,
CInterface* parent,
const CMqRect* area);
Constructor constructor;
using Destructor = void(__thiscall*)(IEncLayout* thisptr);
Destructor destructor;
};
Api& get();
} // namespace IEncLayoutApi
} // namespace game
#endif // ENCLAYOUT_H
| 1,776
|
C++
|
.h
| 50
| 31.36
| 90
| 0.730567
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,375
|
displayddraw.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/displayddraw.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DISPLAYDDRAW_H
#define DISPLAYDDRAW_H
#include "d2pair.h"
#include "displaysettings.h"
#include "mqrasterizer.h"
#include <ddraw.h>
namespace game {
using DirectDrawSurfaceDescPair = Pair<IDirectDrawSurface7*, _DDSURFACEDESC2>;
struct CLogFile;
struct CDisplayDDraw : public IMqRasterizer
{
IDirectDraw7* directDraw;
IDirectDrawSurface7* directDrawSurface;
IDirectDrawSurface7* directDrawSurfaceScreen;
IDirectDrawSurface7* surface1152;
IDirectDrawSurface7* surfaceFromScreen;
bool alwaysTrue;
bool lowAlpha;
char padding[2];
DirectDrawSurfaceDescPair surfaceDescPair;
bool surfaceDescPairLocked;
char padding4[3];
DirectDrawSurfaceDescPair surfaceDescPair2;
bool surfaceDescPair2Locked;
char padding5[3];
int unk3;
char unknown[48];
DisplaySettings displayMode;
bool fullscreen;
char padding2[3];
int refreshRate;
HWND hWnd;
int screenSurfaceWidth;
int screenSurfaceHeight;
bool unk4;
char padding3[3];
int unk5;
CLogFile* logFile;
};
assert_size(CDisplayDDraw, 388);
namespace CDisplayDDrawApi {
const IMqRasterizerVftable* vftable();
}
} // namespace game
#endif // DISPLAYDDRAW_H
| 2,024
|
C++
|
.h
| 63
| 28.952381
| 78
| 0.770139
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,376
|
midtask.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midtask.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDTASK_H
#define MIDTASK_H
#include "task.h"
namespace game {
struct IMidTask : public ITask
{ };
} // namespace game
#endif // MIDTASK_H
| 965
|
C++
|
.h
| 26
| 35.230769
| 72
| 0.758842
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,377
|
imgpackerstoreloader.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/imgpackerstoreloader.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IMAGEPACKERSTORELOADER_H
#define IMAGEPACKERSTORELOADER_H
#include "d2assert.h"
namespace game {
struct CImgFactoryAnimLoaderWeakDup;
struct ImgStore2LoaderWrapper;
struct ImgPackerLoaderWrapper;
struct ImgPackerStoreLoader
{
CImgFactoryAnimLoaderWeakDup* animLoader;
ImgStore2LoaderWrapper* store2Loader;
ImgPackerLoaderWrapper* packerLoader;
};
assert_size(ImgPackerStoreLoader, 12);
struct ImgPackerStoreLoaderWrapper
{
ImgPackerStoreLoader* data;
};
assert_size(ImgPackerStoreLoaderWrapper, 4);
} // namespace game
#endif // IMAGEPACKERSTORELOADER_H
| 1,400
|
C++
|
.h
| 39
| 33.794872
| 72
| 0.800148
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,378
|
midevcondition.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midevcondition.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDEVCONDITION_H
#define MIDEVCONDITION_H
#include "d2set.h"
#include "eventconditioncat.h"
#include "midgardid.h"
namespace game {
struct CMidEvConditionVftable;
struct IMidgardObjectMap;
struct IMidgardStream;
struct String;
/** Base class for all event conditions. */
struct CMidEvCondition
{
CMidEvConditionVftable* vftable;
LEventCondCategory category;
};
struct CMidEvConditionVftable
{
using Destructor = void(__thiscall*)(CMidEvCondition* thisptr, char flags);
Destructor destructor;
/**
* Returns true if id used by event condition equals to the objectId specified.
* Used by CMidCondLocation, CMidCondEnterCity, CMidCondKillStack, CMidCondOwnItem etc.
*/
using IsIdsEqual = bool(__thiscall*)(const CMidEvCondition* thisptr,
const CMidgardID* objectId);
IsIdsEqual isIdsEqual;
/**
* Adds id used by event to the list.
* If event leads to player win or defeat, added ids are used to highlight scenario objectives.
* Used by CMidCondLocation, CMidCondEnterCity, CMidCondKillStack, CMidCondOwnItem etc.
*/
using AddToList = void(__thiscall*)(const CMidEvCondition* thisptr, Set<CMidgardID>* list);
AddToList addToList;
/** Returns true if condition is valid: refers to existing scenario objects. */
using IsValid = bool(__thiscall*)(const CMidEvCondition* thisptr,
const IMidgardObjectMap* objectMap);
IsValid isValid;
using Method4 = bool(__thiscall*)(const CMidEvCondition* thisptr, int a2);
Method4 method4;
/** Serializes event condition. */
using Stream = void(__thiscall*)(CMidEvCondition* thisptr, IMidgardStream** stream);
Stream stream;
};
assert_vftable_size(CMidEvConditionVftable, 6);
namespace CMidEvConditionApi {
struct Api
{
using CreateFromCategory = CMidEvCondition*(__stdcall*)(const LEventCondCategory* category);
CreateFromCategory createFromCategory;
/**
* Returns string with current condition settings to show in conditions list box.
* Used in Scenario Editor only.
*/
using GetInfoString = void(__stdcall*)(String* info,
const IMidgardObjectMap* objectMap,
const CMidEvCondition* eventCondition);
GetInfoString getInfoString;
using GetDescription = void(__stdcall*)(String* description,
const LEventCondCategory* category);
/**
* Returns brief condition description by specified category
* Used in Scenario Editor only.
*/
GetDescription getBrief;
/**
* Returns full condition description by specified category
* Used in Scenario Editor only.
*/
GetDescription getDescription;
};
Api& get();
} // namespace CMidEvConditionApi
} // namespace game
#endif // MIDEVCONDITION_H
| 3,747
|
C++
|
.h
| 93
| 34.55914
| 99
| 0.711454
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,379
|
umstack.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/umstack.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UMSTACK_H
#define UMSTACK_H
#include "groundcat.h"
#include "leaderabilitycat.h"
#include "smartptr.h"
#include "textandid.h"
#include "ummodifier.h"
#include "usstackleader.h"
#include "usunit.h"
namespace game {
struct CUmStackData;
struct CUmStack
{
IUsUnit usUnit;
IUsStackLeader usStackLeader;
CUmModifier umModifier;
CUmStackData* data;
};
assert_size(CUmStack, 24);
struct CUmStackData
{
ModifierValue moveAllowance;
ModifierValue scoutingRange;
ModifierValue leadership;
SmartPtr<LGroundCategory> moveAbility;
SmartPtr<LLeaderAbility> leaderAbility;
TextAndId desc;
bool fastRetreat;
char padding[3];
ModifierValue lowerCost;
};
assert_size(CUmStackData, 60);
namespace CUmStackApi {
struct Vftable
{
const IUsUnitVftable* usUnit;
const IUsStackLeaderVftable* usStackLeader;
const CUmModifierVftable* umModifier;
};
Vftable& vftable();
} // namespace CUmStackApi
} // namespace game
#endif // UMSTACK_H
| 1,809
|
C++
|
.h
| 61
| 27.098361
| 72
| 0.772203
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,380
|
menulord.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menulord.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MENULORD_H
#define MENULORD_H
#include "d2pair.h"
#include "difficultylevel.h"
#include "lordcat.h"
#include "menubase.h"
#include "mqimage2.h"
namespace game {
struct CMenuPhase;
struct LRaceCategory;
using ImagePtr = SmartPtr<IMqImage2>;
using ImagePtrPair = Pair<ImagePtr, ImagePtr>;
using ImagePtrPairs = Vector<ImagePtrPair>;
struct CMenuLordData
{
LLordCategory lordCategory;
LDifficultyLevel difficulty;
int selectedFace;
char unknown2[24];
ImagePtrPairs lordFaces;
int unknown3;
int unknown4;
int unknown5;
char unknown6[24];
int unknown7;
int unknown8;
IMqImage2* backgroundImage;
int unknown9;
int unknown10;
int unknown11;
int unknown12;
int unknown13;
int unknown14;
int unknown15;
};
assert_size(CMenuLordData, 144);
assert_offset(CMenuLordData, lordFaces, 52);
assert_offset(CMenuLordData, backgroundImage, 112);
/**
* Lord selection screen.
* Represents DLG_CHOOSE_LORD from Interf.dlg.
*/
struct CMenuLord : public CMenuBase
{
CMenuLordData* data;
};
assert_size(CMenuLord, 16);
namespace CMenuLordApi {
struct Api
{
using Constructor = CMenuLord*(__thiscall*)(CMenuLord* thisptr, CMenuPhase* menuPhase);
Constructor constructor;
/** Returns lord face images for specified race category. */
using GetLordFacesByRace = void(__stdcall*)(const LRaceCategory* raceCategory,
ImagePtrPairs* faceImages);
GetLordFacesByRace getLordFacesByRace;
/** Loads lord face images using specified image names array. */
using LoadLordFaceImages = void(__stdcall*)(const char** imageNames,
size_t imagesTotal,
ImagePtrPairs* faceImages);
LoadLordFaceImages loadLordFaceImages;
/** Returns lord animation for selected lord face. */
using GetLordAnimation = void(__stdcall*)(const CMenuPhase* menuPhase,
int selectedFace,
ImagePtrPair* animations);
GetLordAnimation getLordAnimation;
/** Loads lord portrait transition animation by name. */
using LoadLordAnimation = ImagePtr*(__stdcall*)(ImagePtr* animation, const char* animationName);
LoadLordAnimation loadLordAnimation;
};
Api& get();
} // namespace CMenuLordApi
} // namespace game
#endif // MENULORD_H
| 3,268
|
C++
|
.h
| 92
| 30.054348
| 100
| 0.705733
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,381
|
ddcarryoveritems.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/ddcarryoveritems.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DDCARRYOVERITEMS_H
#define DDCARRYOVERITEMS_H
namespace game {
/** Used to transfer player's items between scenarios in campaigns. */
struct CDDCarryOverItems;
struct IMidDropManager;
struct CListBoxInterf;
struct CPhaseGame;
namespace CDDCarryOverItemsApi {
struct Api
{
using Constructor = CDDCarryOverItems*(__thiscall*)(CDDCarryOverItems* thisptr,
IMidDropManager* dropManager,
CListBoxInterf* listBox,
CPhaseGame* phaseGame,
int carryOverItemsMax);
Constructor constructor;
};
Api& get();
} // namespace CDDCarryOverItemsApi
} // namespace game
#endif // DDCARRYOVERITEMS_H
| 1,640
|
C++
|
.h
| 40
| 33.55
| 85
| 0.676933
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,382
|
cmdbattlestartmsg.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/cmdbattlestartmsg.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CMDBATTLESTARTMSG_H
#define CMDBATTLESTARTMSG_H
#include "battlemsgdata.h"
#include "commandmsg.h"
namespace game {
struct CCmdBattleStartMsg
: public CCommandMsgTempl<CommandMsgId::BattleStart, CommandMsgParam::Value1>
{
int battleBackgroundIndex;
int unknown2;
BattleMsgData battleMsgData;
int unknown3;
int unknown4;
};
assert_size(CCmdBattleStartMsg, 3952);
assert_offset(CCmdBattleStartMsg, battleMsgData, 24);
namespace CCmdBattleStartMsgApi {
struct Api
{
using Destructor = void(__thiscall*)(CCmdBattleStartMsg* thisptr);
Destructor destructor;
};
Api& get();
CCommandMsgVftable* vftable();
} // namespace CCmdBattleStartMsgApi
} // namespace game
#endif // CMDBATTLESTARTMSG_H
| 1,551
|
C++
|
.h
| 45
| 32.111111
| 81
| 0.778447
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,383
|
generationresultinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/generationresultinterf.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GENERATIONRESULTINTERF_H
#define GENERATIONRESULTINTERF_H
#include "popupdialoginterf.h"
namespace hooks {
struct CMenuRandomScenario;
using OnGenerationResultAccepted = void (*)(CMenuRandomScenario* thisptr);
using OnGenerationResultRejected = void (*)(CMenuRandomScenario* thisptr);
using OnGenerationResultCanceled = void (*)(CMenuRandomScenario* thisptr);
struct CGenerationResultInterf : public game::CPopupDialogInterf
{
OnGenerationResultAccepted onAccept;
OnGenerationResultRejected onReject;
OnGenerationResultCanceled onCancel;
CMenuRandomScenario* menu;
};
CGenerationResultInterf* createGenerationResultInterf(CMenuRandomScenario* menu,
OnGenerationResultAccepted onAccept,
OnGenerationResultRejected onReject,
OnGenerationResultCanceled onCancel);
} // namespace hooks
#endif // GENERATIONRESULTINTERF_H
| 1,824
|
C++
|
.h
| 39
| 40.538462
| 91
| 0.73705
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,384
|
itemcategory.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemcategory.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMCATEGORY_H
#define ITEMCATEGORY_H
#include "categories.h"
namespace game {
struct LItemCategoryTable : public CEnumConstantTable<ItemId>
{ };
struct LItemCategory : public Category<ItemId>
{ };
namespace ItemCategories {
struct Categories
{
LItemCategory* armor;
LItemCategory* jewel;
LItemCategory* weapon;
LItemCategory* banner;
LItemCategory* potionBoost;
LItemCategory* potionHeal;
LItemCategory* potionRevive;
LItemCategory* potionPermanent;
LItemCategory* scroll;
LItemCategory* wand;
LItemCategory* valuable;
LItemCategory* orb;
LItemCategory* talisman;
LItemCategory* travelItem;
LItemCategory* special;
};
Categories& get();
} // namespace ItemCategories
} // namespace game
#endif // ITEMCATEGORY_H
| 1,604
|
C++
|
.h
| 49
| 29.938776
| 72
| 0.766192
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,385
|
itembanner.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itembanner.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMBANNER_H
#define ITEMBANNER_H
#include "itemequipment.h"
namespace game {
struct CItemBanner : public CItemEquipment
{ };
assert_size(CItemBanner, 24);
} // namespace game
#endif // ITEMBANNER_H
| 1,026
|
C++
|
.h
| 27
| 36.111111
| 72
| 0.767137
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,386
|
visitors.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/visitors.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VISITORS_H
#define VISITORS_H
namespace game {
struct CMidgardID;
struct IMidgardObjectMap;
struct CScenarioVisitorVftable;
/**
* Base for all visitor classes.
* Visitors are used to change scenario objects or rules.
*/
struct CScenarioVisitor
{
const CScenarioVisitorVftable* vftable;
IMidgardObjectMap* objectMap;
};
struct CScenarioVisitorVftable
{
void* destructor;
/** Returns true if visitor can be applied. */
using CanApply = bool(__thiscall*)(CScenarioVisitor* thisptr);
CanApply canApply;
/**
* Applies visitor.
* @returns true if visitor was applied successfully.
*/
using Apply = bool(__thiscall*)(CScenarioVisitor* thisptr);
Apply apply;
};
namespace VisitorApi {
struct Api
{
/**
* Changes unit hit points by specified amount.
* Uses CVisitorChangeUnitHP.
* Handles all necessary logic with min/max values as well as stack leader alive statuses.
* @param[in] unitId id of unit whose hit points to change.
* @param amount hit points change amount. Positive value heals unit, negative damages.
* @param[in] objectMap interface used for unit search.
* @param apply specifies whether changes should be applied.
* @returns true if hp was changed when apply was selected. If apply set to 0, returns whether
* visitor can be applied.
*/
using ChangeUnitHp = bool(__stdcall*)(const CMidgardID* unitId,
int amount,
IMidgardObjectMap* objectMap,
int apply);
ChangeUnitHp changeUnitHp;
using ChangeUnitXp = bool(__stdcall*)(const CMidgardID* unitId,
int amount,
IMidgardObjectMap* objectMap,
int apply);
ChangeUnitHp changeUnitXp;
using UpgradeUnit = bool(__stdcall*)(const CMidgardID* unitId,
const CMidgardID* upgradeUnitImplId,
const CMidgardID* groupId,
IMidgardObjectMap* objectMap,
int apply);
UpgradeUnit upgradeUnit;
/**
* Sets maximum allowed units count for a specific group.
* Uses CVisitorForceUnitMax.
* Changes CMidUnitGroup::maxUnitsAllowed value.
* @param[in] groupId id of group where unit will be summoned.
* @param maxUnitsAllowed maximum allowed units in group. Value of -1 disables the restriction.
* @param[in] objectMap interface used for group search.
* @param apply specifies whether visitor should be applied.
*/
using ForceUnitMax = bool(__stdcall*)(const CMidgardID* groupId,
int maxUnitsAllowed,
IMidgardObjectMap* objectMap,
int apply);
ForceUnitMax forceUnitMax;
/**
* Adds unit to the group.
* Uses CVisitorAddUnitToGroup.
* @param[in] unitId id of the exising unit to add.
* @param[in] groupId id of the group in stack, fortification or ruin to add unit to.
* @param position unit position in group.
* @param[in] creationTurn number of game turn when unit was created.
* @param a5 meaning unknown, summon attack logic sets it to 1.
* @param objectMap interface used for group search.
* @param apply specifies whether unit addition should be applied.
* @returns true if unit was added when apply set to 1. If apply set to 0, returns whether
* visitor can be applied.
*/
using AddUnitToGroup = bool(__stdcall*)(const CMidgardID* unitId,
const CMidgardID* groupId,
int position,
int* creationTurn,
char a5,
IMidgardObjectMap* objectMap,
int apply);
AddUnitToGroup addUnitToGroup;
/**
* Transfers item from one object with inventory (stack, bag or city) to another.
* Uses CVisitorExchangeItem.
* @param[in] fromObjectId id of the object with inventory to transfer from.
* @param[in] toObjectId id of the object with inventory to receive item.
* @param[in] itemId id of the item to transfer.
* @param objectMap interface used for objects search.
* @param apply specifies whether item transfer should be applied.
* @returns true if item was transfered when apply set to 1. If apply set to 0, returns whether
* visitor can be applied.
*/
using ExchangeItem = bool(__stdcall*)(const CMidgardID* fromObjectId,
const CMidgardID* toObjectId,
const CMidgardID* itemId,
IMidgardObjectMap* objectMap,
int apply);
ExchangeItem exchangeItem;
/**
* Transforms a unit to another.
* Uses CVisitorTransformUnit.
* @param[in] unitId id of the unit to be transformed.
* @param[in] toUnitImplId id of the unit impl to transform to.
* @param[in] keepHp specifies whether the transformed unit retains its original hp.
* @param objectMap interface used for objects search.
* @param apply specifies whether unit transformation should be applied.
* @returns true if unit was transformed when apply set to 1. If apply set to 0, returns whether
* visitor can be applied.
*/
using TransformUnit = bool(__stdcall*)(CMidgardID* unitId,
CMidgardID* toUnitImplId,
bool keepHp,
IMidgardObjectMap* objectMap,
int apply);
TransformUnit transformUnit;
/**
* Untransforms a unit.
* Uses CVisitorUndoTransformUnit.
* @param[in] unitId id of the unit to be untransformed.
* @param objectMap interface used for objects search.
* @param apply specifies whether unit transformation should be applied.
* @returns true if unit was untransformed when apply set to 1. If apply set to 0, returns
* whether visitor can be applied.
*/
using UndoTransformUnit = bool(__stdcall*)(CMidgardID* unitId,
IMidgardObjectMap* objectMap,
int apply);
UndoTransformUnit undoTransformUnit;
/**
* Extracts unit from group.
* Uses CVisitorExtractUnitFromGroup.
* @param[in] unitId id of unit to extract.
* @param[in] groupId id of group to extract from.
* @param[in] objectMap interface used for objects search.
* @param apply specifies whether unit extraction should be applied.
* @returns true if unit was extracted when apply set to 1. If apply set to 0, returns whether
* visitor can be applied.
*/
using ExtractUnitFromGroup = bool(__stdcall*)(const CMidgardID* unitId,
const CMidgardID* groupId,
IMidgardObjectMap* objectMap,
int apply);
ExtractUnitFromGroup extractUnitFromGroup;
};
Api& get();
} // namespace VisitorApi
} // namespace game
#endif // VISITORS_H
| 8,458
|
C++
|
.h
| 178
| 35.752809
| 100
| 0.61247
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,387
|
mqnetsession.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqnetsession.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MQNETSESSION_H
#define MQNETSESSION_H
#include "d2list.h"
namespace game {
struct String;
struct IMqNetPlayerEnum;
struct IMqNetPlayerClient;
struct IMqNetPlayerServer;
struct IMqNetReception;
struct IMqNetSystem;
struct IMqNetSessionVftable;
struct IMqNetSession
{
IMqNetSessionVftable* vftable;
};
struct IMqNetSessionVftable
{
using Destructor = void(__thiscall*)(IMqNetSession* thisptr, char flags);
Destructor destructor;
/** Returns session name. */
using GetName = String*(__thiscall*)(IMqNetSession* thisptr, String* sessionName);
GetName getName;
/** Returns current number of clients in a session. */
using GetClientsCount = int(__thiscall*)(IMqNetSession* thisptr);
GetClientsCount getClientsCount;
/** Returns the maximum allowed number of clients in a session. */
using GetMaxClients = int(__thiscall*)(IMqNetSession* thisptr);
GetMaxClients getMaxClients;
using GetPlayers = void(__thiscall*)(IMqNetSession* thisptr, List<IMqNetPlayerEnum*>* players);
GetPlayers getPlayers;
/**
* Creates client player.
* CNetDPlaySession calls IDirectPlay4::CreatePlayer with dwFlags = 0 here.
*/
using CreateClient = void(__thiscall*)(IMqNetSession* thisptr,
IMqNetPlayerClient** client,
IMqNetSystem* netSystem,
IMqNetReception* reception,
const char* clientName);
CreateClient createClient;
/**
* Creates server player.
* CNetDPlaySession calls IDirectPlay4::CreatePlayer with DPPLAYER_SERVERPLAYER here.
*/
using CreateServer = void(__thiscall*)(IMqNetSession* thisptr,
IMqNetPlayerServer** server,
IMqNetSystem* netSystem,
IMqNetReception* reception);
CreateServer createServer;
};
assert_vftable_size(IMqNetSessionVftable, 7);
} // namespace game
#endif // MQNETSESSION_H
| 2,923
|
C++
|
.h
| 71
| 33.929577
| 99
| 0.684173
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,388
|
condinterfhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/condinterfhooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONDINTERFHOOKS_H
#define CONDINTERFHOOKS_H
namespace game {
struct ITask;
struct CMidgardID;
struct LEventCondCategory;
namespace editor {
struct CCondInterf;
}
} // namespace game
namespace hooks {
game::editor::CCondInterf* __stdcall createCondInterfFromCategoryHooked(
game::ITask* task,
void* a2,
const game::CMidgardID* eventId,
const game::LEventCondCategory* category);
} // namespace hooks
#endif // CONDINTERFHOOKS_H
| 1,271
|
C++
|
.h
| 36
| 33.166667
| 72
| 0.772616
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,389
|
interfmanager.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/interfmanager.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INTERFMANAGER_H
#define INTERFMANAGER_H
#include "d2assert.h"
#include "d2list.h"
#include "functordispatch2.h"
#include "mqpresentationmanager.h"
#include "mqrect.h"
#include "smartptr.h"
#include <cstddef>
namespace game {
struct CInterfManager;
struct CInterface;
struct CTooltipImpl;
struct CCursorImpl;
struct IInterfBorderDisplay;
using GlobalKeyPressDispatch = CBFunctorDispatch2wRet<unsigned short, unsigned short, bool>;
using GlobalKeyPressDispatchPtr = SmartPtr<GlobalKeyPressDispatch>;
struct CInterfManagerVftable
{
using Destructor = void(__thiscall*)(CInterfManager* thisptr, char flags);
Destructor destructor;
using GetBool = bool(__thiscall*)(const CInterfManager* thisptr);
/** Returns true if interfaces list is empty. */
GetBool isInterfacesEmpty;
/** Returns topmost interface or nullptr if interfaces list is empty. */
using GetInterface = CInterface*(__thiscall*)(CInterfManager* thisptr);
GetInterface getInterface;
/**
* Returns next interface in list after specified one or nullptr.
* Assumption: returns interface that is below specified.
*/
using GetNextInterface = CInterface*(__thiscall*)(CInterfManager* thisptr, CInterface* interf);
GetNextInterface getNextInterface;
/** Shows interface as top element. */
using ShowInterface = bool(__thiscall*)(CInterfManager* thisptr, CInterface* interf);
ShowInterface showInterface;
/**
* Removes topmost interface from list and returns it.
* Second element in the list is chosen as the new top.
*/
GetInterface removeInterface;
/** Hides specified interface. */
using HideInterface = bool(__thiscall*)(CInterfManager* thisptr, CInterface* interf);
HideInterface hideInterface;
/** Clears the list deleting all interfaces. */
using ClearInterfaces = void(__thiscall*)(CInterfManager* thisptr);
ClearInterfaces clearInterfaces;
using SetBorderDisplay = void(__thiscall*)(CInterfManager* thisptr,
IInterfBorderDisplay* borderDisplay);
SetBorderDisplay setBorderDisplay;
using SetRememberedInterface = bool(__thiscall*)(CInterfManager* thisptr, CInterface* interf);
SetRememberedInterface setRememberedInterface;
using ClearRememberedInterface = void(__thiscall*)(CInterfManager* thisptr);
ClearRememberedInterface clearRememberedInterface;
GetInterface getRememberedInterface;
using SetMousePosition = void(__thiscall*)(CInterfManager* thisptr, const CMqPoint* position);
SetMousePosition setMousePosition;
using SetGlobalKeyHandler = void(__thiscall*)(CInterfManager* thisptr,
GlobalKeyPressDispatchPtr* handler);
SetGlobalKeyHandler setGlobalKeyHandler;
using SetInputAllowed = void(__thiscall*)(CInterfManager* thisptr, bool allowed);
SetInputAllowed setInputAllowed;
GetBool isInputAllowed;
/** Returns game window resolution. */
using GetResolution = const CMqRect*(__thiscall*)(const CInterfManager* thisptr);
GetResolution getResolution;
using SetResolution = void(__thiscall*)(CInterfManager* thisptr);
SetResolution setResolution;
using GetPaletteKey = std::uint32_t(__thiscall*)(const CInterfManager* thisptr);
GetPaletteKey getPaletteKey;
using GetTooltip = CTooltipImpl*(__thiscall*)(CInterfManager* thisptr);
GetTooltip getTooltip;
using GetCursor = CCursorImpl*(__thiscall*)(CInterfManager* thisptr);
GetCursor getCursor;
using ConvertPosition = CMqPoint*(__thiscall*)(CInterfManager* thisptr,
CMqPoint* result,
CMqPoint* point);
ConvertPosition method21;
ConvertPosition method22;
};
assert_vftable_size(CInterfManagerVftable, 23);
struct CInterfManager
{
const CInterfManagerVftable* vftable;
};
struct CInterfManagerImplData
{
SmartPtr<CMqPresentationManager> presentationMgr;
SmartPtr<CTooltipImpl> tooltipImpl;
SmartPtr<CCursorImpl> cursorImpl;
/** Topmost interface is always first in the list. */
List<CInterface*> interfaces;
UiEvent visibilityEvent;
UiEvent keypressEvent;
UiEvent mousePressEvent;
UiEvent mouseMoveEvent;
CInterface* rememberedInterface;
/**
* Called before processing handleKeyboard() of topmost interface.
* Used for checking special key combinations globally in the game.
*/
GlobalKeyPressDispatchPtr onKeyPressed;
bool inputAllowed;
char padding[3];
CMqRect resolution;
std::uint32_t paletteKey;
bool unknown5;
char padding2[3];
IInterfBorderDisplay* borderDisplay;
bool unknown3;
char padding3[3];
CMqRect area;
};
assert_size(CInterfManagerImplData, 200);
struct CInterfManagerImpl
: public CInterfManager
, public CMqPresentationManager::IPresentation
{
CInterfManagerImplData* data;
};
assert_size(CInterfManagerImpl, 12);
assert_offset(CInterfManagerImpl, CInterfManagerImpl::CInterfManager::vftable, 0);
assert_offset(CInterfManagerImpl, CInterfManagerImpl::IPresentation::vftable, 4);
using InterfManagerImplPtr = SmartPtr<CInterfManagerImpl>;
namespace CInterfManagerImplApi {
struct Api
{
/** Populates SmartPointer with CInterfManagerImpl object. */
using Get = InterfManagerImplPtr*(__stdcall*)(InterfManagerImplPtr* managerPtr);
Get get;
};
Api& get();
} // namespace CInterfManagerImplApi
} // namespace game
#endif // INTERFMANAGER_H
| 6,384
|
C++
|
.h
| 153
| 36.679739
| 99
| 0.747617
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,390
|
batnotify.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batnotify.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BATNOTIFY_H
#define BATNOTIFY_H
namespace game {
struct IBatNotifyVftable;
struct BattleMsgData;
struct CMidgardID;
enum class BattleAction : int;
struct IBatNotify
{
IBatNotifyVftable* vftable;
};
struct IBatNotifyVftable
{
using Destructor = void(__thiscall*)(IBatNotify* thisptr, char flags);
Destructor destructor;
/** Sends CStackBattleActionMsg from client to server. */
using NotifyBattleAction = void(__thiscall*)(IBatNotify* thisptr,
const BattleMsgData* battleMsgData,
BattleAction action,
const CMidgardID* attackerUnitId,
const CMidgardID* targetUnitId);
NotifyBattleAction notifyBattleAction;
/** Same as calling notifyBattleAction() with action == BattleAction::UseItem. */
using NotifyUseItem = void(__thiscall*)(IBatNotify* thisptr,
const BattleMsgData* battleMsgData,
const CMidgardID* attackerUnitId,
const CMidgardID* targetUnitId);
NotifyUseItem notifyUseItem;
/** Handles CCmdBattleResultMsg messages. */
using BattleResult = void(__thiscall*)(IBatNotify* thisptr);
BattleResult battleResult;
/** Closes battle window and shows stack management window if specified. */
using CloseBattleWindow = void(__thiscall*)(IBatNotify* thisptr, bool requestPaperdoll);
CloseBattleWindow closeBattleWindow;
/** Handles chat window during battle. */
using OpenChatWindow = void(__thiscall*)(IBatNotify* thisptr);
OpenChatWindow openChatWindow;
};
} // namespace game
#endif // BATNOTIFY_H
| 2,630
|
C++
|
.h
| 58
| 36.931034
| 92
| 0.673701
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,391
|
radiobuttoninterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/radiobuttoninterf.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RADIOBUTTONINTERF_H
#define RADIOBUTTONINTERF_H
#include "d2pair.h"
#include "functordispatch1.h"
#include "interface.h"
#include "smartptr.h"
namespace game {
struct CToggleButton;
struct CDialogInterf;
struct CRadioButtonInterfData
{
Vector<Pair<CToggleButton*, bool /* enabled */>> buttons;
bool enabled;
char padding[3];
int selectedButton;
SmartPtr<CBFunctorDispatch1<int>> onButtonPressed;
};
assert_size(CRadioButtonInterfData, 32);
/**
* Radio button ui element.
* Represents RADIO from Interf.dlg or ScenEdit.dlg files.
*/
struct CRadioButtonInterf : public CInterface
{
CRadioButtonInterfData* data;
};
assert_size(CRadioButtonInterf, 12);
namespace CRadioButtonInterfApi {
struct Api
{
/** Enables or disables radio button. */
using SetEnabled = void(__thiscall*)(CRadioButtonInterf* thisptr, bool enabled);
SetEnabled setEnabled;
/** Enables or disables toggle button with specified index. */
using SetButtonEnabled = void(__thiscall*)(CRadioButtonInterf* thisptr,
int buttonIndex,
bool enabled);
SetButtonEnabled setButtonEnabled;
/** Sets toggle button with specified index checked. */
using SetCheckedButton = void(__thiscall*)(CRadioButtonInterf* thisptr, int buttonIndex);
SetCheckedButton setCheckedButton;
/** Assigns callback that is called when one of the radio buttons is pressed. */
using SetOnButtonPressed = CRadioButtonInterf*(__stdcall*)(CDialogInterf* dialog,
const char* buttonName,
const char* dialogName,
SmartPointer* functor);
SetOnButtonPressed setOnButtonPressed;
};
Api& get();
} // namespace CRadioButtonInterfApi
} // namespace game
#endif // RADIOBUTTONINTERF_H
| 2,796
|
C++
|
.h
| 70
| 33.342857
| 93
| 0.69103
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,392
|
interfcursor.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/interfcursor.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INTERFCURSOR_H
#define INTERFCURSOR_H
#include "d2assert.h"
#include "smartptr.h"
namespace game {
struct IInterfCursorVftable;
struct CMqPoint;
struct CursorHandle;
struct IInterfCursor
{
IInterfCursorVftable* vftable;
};
// Virtual table does not contain destructor
struct IInterfCursorVftable
{
using GetHandle = void(__thiscall*)(IInterfCursor* thisptr,
SmartPtr<CursorHandle>* cursorHandle,
const CMqPoint* mousePosition);
GetHandle getHandle;
using SetUnknown = void(__thiscall*)(IInterfCursor* thisptr, bool value);
SetUnknown setUnknown;
using GetUnknown = bool(__thiscall*)(const IInterfCursor* thisptr);
GetUnknown getUnknown;
using SetHandle = SmartPtr<CursorHandle>*(__thiscall*)(IInterfCursor* thisptr,
SmartPtr<CursorHandle>* cursorHandle);
SetHandle setHandle;
};
assert_vftable_size(IInterfCursorVftable, 4);
} // namespace game
#endif // INTERFCURSOR_H
| 1,877
|
C++
|
.h
| 48
| 33.854167
| 97
| 0.717666
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,393
|
menuprotocolhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menuprotocolhooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MENUPROTOCOLHOOKS_H
#define MENUPROTOCOLHOOKS_H
namespace game {
struct CMenuProtocol;
struct CMenuPhase;
struct String;
} // namespace game
namespace hooks {
struct CMenuCustomProtocol;
void __fastcall menuProtocolDisplayCallbackHooked(game::CMenuProtocol* thisptr,
int /*%edx*/,
game::String* string,
bool a3,
int selectedIndex);
void __fastcall menuProtocolContinueHandlerHooked(CMenuCustomProtocol* thisptr, int /*%edx*/);
game::CMenuProtocol* __stdcall menuProtocolCreateMenuHooked(game::CMenuPhase* menuPhase);
} // namespace hooks
#endif // MENUPROTOCOLHOOKS_H
| 1,597
|
C++
|
.h
| 36
| 37.083333
| 94
| 0.686856
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,394
|
isoborder.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/isoborder.h
|
/* * This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ISOBORDER_H
#define ISOBORDER_H
#include "d2assert.h"
namespace game {
struct IIsoBorderVftable;
struct SurfaceDecompressData;
struct CMqPoint;
struct CMqRect;
struct IIsoBorder
{
IIsoBorderVftable* vftable;
};
assert_size(IIsoBorder, 4);
struct IIsoBorderVftable
{
using Destructor = void(__thiscall*)(IIsoBorder* thisptr, char flags);
Destructor destructor;
using Draw = void(__thiscall*)(IIsoBorder* thisptr,
SurfaceDecompressData* surfaceDecompress,
CMqPoint* dstPos,
CMqRect* area);
Draw draw;
/** Returns true if image has format of 8 bits per pixel. */
using Is8BppImage = bool(__thiscall*)(const IIsoBorder* thisptr);
Is8BppImage is8BppImage;
/** Return type assumed from usage in CIsoEngineGround::CGroundTexture::Draw. */
using GetWordData = const std::uint16_t*(__thiscall*)(const IIsoBorder* thisptr);
GetWordData getWordData;
/** Return type assumed from usage in CIsoEngineGround::CGroundTexture::Draw. */
using GetByteData = const std::uint8_t*(__thiscall*)(const IIsoBorder* thisptr);
GetByteData getByteData;
};
assert_vftable_size(IIsoBorderVftable, 5);
} // namespace game
#endif // ISOBORDER_H
| 2,108
|
C++
|
.h
| 52
| 35.865385
| 85
| 0.721841
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,395
|
testcondition.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/testcondition.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TESTCONDITION_H
#define TESTCONDITION_H
#include "d2assert.h"
namespace game {
struct IMidgardObjectMap;
struct CMidgardID;
struct CMidEvCondition;
struct ITestConditionVftable;
/** Event condition testing interface. */
struct ITestCondition
{
ITestConditionVftable* vftable;
};
struct ITestConditionVftable
{
using Destructor = void(__thiscall*)(ITestCondition* thisptr, char flags);
Destructor destructor;
/** Returns true if event condition meets for specified player. */
using Test = bool(__thiscall*)(const ITestCondition* thisptr,
const IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const CMidgardID* eventId);
Test test;
};
assert_vftable_size(ITestConditionVftable, 2);
namespace ITestConditionApi {
struct Api
{
/** Creates test condition object from specified event condition. */
using Create = ITestCondition*(__stdcall*)(CMidEvCondition* eventCondition,
bool samePlayer,
const CMidgardID* triggererStackId);
Create create;
};
Api& get();
} // namespace ITestConditionApi
} // namespace game
#endif // TESTCONDITION_H
| 2,110
|
C++
|
.h
| 56
| 31.928571
| 83
| 0.701961
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,396
|
unitgenerator.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/unitgenerator.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UNITGENERATOR_H
#define UNITGENERATOR_H
#include "d2assert.h"
namespace game {
struct CMidgardID;
struct CUnitGeneratorVftable;
/**
* Used to create unit implementations in game.
* By default, unit implementation objects are created from records of GUnits.dbf.
* For example, objects of types TUsUnitImpl or TUsSoldierImpl is a unit implementations.
* Creation, promotion or modification of units in groups (stacks, fortifications and ruins)
* is based on implementation data they refer to.
* Unit promotions and modifications create new implementations.
*/
struct CUnitGenerator
{
CUnitGeneratorVftable* vftable;
};
struct CUnitGeneratorVftable
{
void* destructor;
/**
* Generates new unit implementation id from specified unitImplId and level.
* @param[in] thisptr pointer to unit generator instance.
* @param[inout] resultUnitImplId pointer where new implementation id will be stored.
* @param[in] unitImplId unit implementation id.
*/
using GenerateUnitImplId = CMidgardID*(__thiscall*)(CUnitGenerator* thisptr,
CMidgardID* resultUnitImplId,
const CMidgardID* unitImplId,
int unitLevel);
GenerateUnitImplId generateUnitImplId;
/**
* Checks if unit implementation with specified id exists, if not creates a new implementation.
* @returns true if unit implementation exists or was successfully created.
*/
using GenerateUnitImpl = bool(__thiscall*)(CUnitGenerator* thisptr,
const CMidgardID* unitImplId);
GenerateUnitImpl generateUnitImpl;
/** Returns true if unit implementation id has IdType::UnitGenerated. */
using IsUnitGenerated = bool(__thiscall*)(CUnitGenerator* thisptr, CMidgardID* unitImplId);
IsUnitGenerated isUnitGenerated;
/**
* Used in doppelganger attack logic.
* Checks if a unit implementation with the specified id is global, if so - returns the id as
* is. Otherwise, if the id belongs to a generated unit, returns an id of the corresponding
* global unit. If the id is nor a global unit nor a generated unit, returns the empty id.
*/
using GetGlobalUnitImplId = CMidgardID*(__thiscall*)(CUnitGenerator* thisptr,
CMidgardID* resultUnitImplId,
const CMidgardID* unitImplId);
GetGlobalUnitImplId getGlobalUnitImplId;
using GetGeneratedUnitImplLevelMax = int(__thiscall*)(CUnitGenerator* thisptr);
GetGeneratedUnitImplLevelMax getGeneratedUnitImplLevelMax;
};
assert_vftable_size(CUnitGeneratorVftable, 6);
} // namespace game
#endif // UNITGENERATOR_H
| 3,672
|
C++
|
.h
| 76
| 40.789474
| 99
| 0.700447
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,397
|
d2pair.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/d2pair.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef D2PAIR_H
#define D2PAIR_H
namespace game {
/**
* Represents pair of elements.
* Assumption: implementation of std::pair used in game.
*/
template <typename T, typename U>
struct Pair
{
T first;
U second;
};
} // namespace game
#endif // D2PAIR_H
| 1,082
|
C++
|
.h
| 33
| 30.787879
| 72
| 0.750958
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,398
|
unitutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/unitutils.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UNITUTILS_H
#define UNITUTILS_H
#include "d2list.h"
namespace game {
struct CMidgardID;
struct CMidUnit;
struct IUsUnit;
struct IUsSoldier;
struct TUsUnitImpl;
struct TUsSoldierImpl;
struct LImmuneCat;
struct LAttackSource;
struct IAttack;
struct IMidgardObjectMap;
struct BattleMsgData;
struct CDynUpgrade;
struct IUsUnitExtension;
struct TypeDescriptor;
struct LLeaderAbility;
struct CMidPlayer;
} // namespace game
namespace hooks {
void generateUnitImplByAttackId(const game::CMidgardID* attackId);
game::IUsSoldier* castUnitImplToSoldierWithLogging(const game::IUsUnit* unitImpl);
void getSoldierAttackSourceImmunities(const game::LImmuneCat* immuneCat,
const game::IUsSoldier* soldier,
game::List<game::LAttackSource>* value);
bool isUnitSmall(const game::CMidUnit* unit);
game::CMidgardID getGlobalUnitImplId(const game::CMidgardID* unitImplId);
game::TUsUnitImpl* getGlobalUnitImpl(const game::CMidgardID* unitImplId);
game::TUsUnitImpl* generateUnitImpl(const game::CMidgardID* unitImplId, int level);
game::TUsUnitImpl* getUnitImpl(const game::CMidgardID* unitImplId);
game::TUsUnitImpl* getUnitImpl(const game::IUsUnit* unit);
game::TUsSoldierImpl* getSoldierImpl(const game::IUsUnit* unit);
game::TUsSoldierImpl* getSoldierImpl(const game::IUsSoldier* soldier);
game::IAttack* getAttack(const game::IUsUnit* unit, bool primary, bool checkAltAttack);
game::IAttack* getAltAttack(const game::IUsUnit* unit, bool primary);
int getArmor(const game::CMidgardID* unitId,
const game::IUsSoldier* soldier,
const game::BattleMsgData* battleMsgData,
bool includeShattered,
bool includeFortification);
const game::CDynUpgrade* getDynUpgrade(const game::IUsUnit* unit, int upgradeNumber);
/** Returns unit bonus armor from city, if he is inside one. */
int getCityProtection(const game::IMidgardObjectMap* objectMap, const game::CMidgardID* unitId);
/** Returns unit including bonus regen from lord, fort/ruin and terrain. */
int getUnitRegen(const game::IMidgardObjectMap* objectMap, const game::CMidgardID* unitId);
int getUnitHpMax(const game::CMidUnit* unit);
const char* getUnitName(const game::CMidUnit* unit);
/** Analogue of game::CastUnitImplTo* functions. */
game::IUsUnitExtension* castUnitImpl(const game::IUsUnit* unitImpl,
const game::TypeDescriptor* type);
int computeUnitEffectiveHpForAi(int hp, int armor);
int computeUnitEffectiveHp(int hp, int armor);
int computeShatterDamage(const game::CMidgardID* unitId,
const game::IUsSoldier* soldier,
const game::BattleMsgData* battleMsgData,
const game::IAttack* attack);
void updateAttackCountAfterTransformation(game::BattleMsgData* battleMsgData,
const game::CMidUnit* unit,
bool prevAttackTwice);
bool isStackLeaderAndAllowedToUseBattleItems(const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* unitId,
const game::BattleMsgData* battleMsgData);
bool hasLeaderAbility(const game::IUsUnit* unitImpl, const game::LLeaderAbility* ability);
bool hasCriticalHitLeaderAbility(const game::IUsUnit* unitImpl);
/** Returns true if the unit is changed during validation. */
bool validateUnit(game::CMidUnit* unit);
bool canUnitGainXp(const game::IUsUnit* unitImpl);
bool isNextUnitImpl(const game::IUsUnit* unitImpl, const game::IUsUnit* currImpl);
bool isNextTierUnitImpl(const game::IUsUnit* unitImpl, const game::IUsUnit* currImpl);
bool hasNextTierUnitImpl(const game::IUsUnit* unitImpl);
bool hasMaxTierUpgradeBuilding(const game::IMidgardObjectMap* objectMap,
const game::IUsUnit* unitImpl);
const game::TUsUnitImpl* getUpgradeUnitImpl(const game::IMidgardObjectMap* objectMap,
const game::CMidPlayer* player,
const game::CMidUnit* unit);
game::CMidgardID getUpgradeBuildingId(const game::IUsUnit* unitImpl);
int getGeneratedUnitImplLevelMax();
int addUnitXpNoUpgrade(game::IMidgardObjectMap* objectMap, game::CMidUnit* unit, int value);
} // namespace hooks
#endif // UNITUTILS_H
| 5,232
|
C++
|
.h
| 100
| 45.59
| 96
| 0.730476
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,399
|
mideventhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mideventhooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDEVENTHOOKS_H
#define MIDEVENTHOOKS_H
#include <vector>
namespace game {
struct CDialogInterf;
struct IMidgardObjectMap;
struct CMidgardID;
struct CMidEvent;
struct LEventCondCategory;
struct CMidEvCondition;
} // namespace game
namespace hooks {
void getConditionsOfType(const game::CMidEvent* event,
const game::LEventCondCategory* category,
std::vector<const game::CMidEvCondition*>& conditions);
bool __stdcall checkEventValidHooked(game::CDialogInterf* dialog,
const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* eventId);
} // namespace hooks
#endif // MIDEVENTHOOKS_H
| 1,543
|
C++
|
.h
| 38
| 35.684211
| 80
| 0.726787
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,400
|
animations.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/animations.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ANIMATIONS_H
#define ANIMATIONS_H
#include "d2assert.h"
#include "d2list.h"
#include "smartptr.h"
#include <cstdint>
namespace game {
struct IMqAnimation;
struct CUIManager;
struct AnimationLists
{
SmartPtr<CUIManager> uiManagerPtr;
List<IMqAnimation*> animationList;
ListIterator<IMqAnimation*> iterator;
List<IMqAnimation*> deferredAnimations;
std::uint32_t updateInterval;
std::uint32_t nextUpdateTime;
std::uint32_t updatesCount;
bool updateInProcess;
char padding[3];
};
assert_size(AnimationLists, 68);
struct AnimationsData
{
AnimationLists* slowAnimations; /**< Update interval 66ms, hence 'slow'. */
AnimationLists* fastAnimations; /**< Update interval 33ms, fast. */
};
assert_size(AnimationsData, 8);
struct Animations
{
AnimationsData* data;
};
assert_size(Animations, 4);
} // namespace game
#endif // ANIMATIONS_H
| 1,708
|
C++
|
.h
| 53
| 29.773585
| 79
| 0.761412
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,401
|
mqanimation.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqanimation.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MQANIMATION_H
#define MQANIMATION_H
#include "d2assert.h"
namespace game {
struct IMqAnimationVftable;
struct IMqAnimation
{
IMqAnimationVftable* vftable;
};
struct IMqAnimationVftable
{
using Destructor = void(__thiscall*)(IMqAnimation* thisptr, char flags);
Destructor destructor;
using Update = void(__stdcall*)(IMqAnimation* thisptr);
Update update;
};
assert_vftable_size(IMqAnimationVftable, 2);
} // namespace game
#endif // MQANIMATION_H
| 1,296
|
C++
|
.h
| 37
| 32.756757
| 76
| 0.767014
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,402
|
sitecategories.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/sitecategories.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SITECATEGORIES_H
#define SITECATEGORIES_H
#include "categories.h"
namespace game {
struct LSiteCategoryTable : public CEnumConstantTable<SiteId>
{ };
struct LSiteCategory : public Category<SiteId>
{ };
namespace SiteCategories {
struct Categories
{
LSiteCategory* merchant;
LSiteCategory* mageTower;
LSiteCategory* mercenaries;
LSiteCategory* trainer;
};
Categories& get();
/** Returns address of LSiteCategory::vftable used in game. */
const void* vftable();
} // namespace SiteCategories
namespace LSiteCategoryTableApi {
using Api = CategoryTableApi::Api<LSiteCategoryTable, LSiteCategory>;
Api& get();
/** Returns address of LSiteCategoryTable::vftable used in game. */
const void* vftable();
} // namespace LSiteCategoryTableApi
} // namespace game
#endif // SITECATEGORIES_H
| 1,634
|
C++
|
.h
| 46
| 33.434783
| 72
| 0.775302
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,403
|
batattacksummon.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattacksummon.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BATATTACKSUMMON_H
#define BATATTACKSUMMON_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
struct IAttack;
/** Represents attacks that summon units. */
struct CBatAttackSummon : public CBatAttackBase
{
CMidgardID unitId;
CMidgardID unitOrItemId;
int attackNumber;
IAttack* attack;
int unknown;
};
assert_size(CBatAttackSummon, 24);
namespace CBatAttackSummonApi {
IBatAttackVftable* vftable();
} // namespace CBatAttackSummonApi
} // namespace game
#endif // BATATTACKSUMMON_H
| 1,344
|
C++
|
.h
| 39
| 32.230769
| 72
| 0.772798
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,404
|
mapinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mapinterf.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAPINTERF_H
#define MAPINTERF_H
#include "isoview.h"
namespace game::editor {
struct CTaskMapChange;
/** Actions correspond to toggle buttons of RAD_TERRAIN, DLG_MAP in ScenEdit.dlg. */
enum class MapChangeAction : int
{
Erase, /**< TOG_ERASE */
ColorTerrainHeretic, /**< TOG_TER_HERETIC */
ColorTerrainDwarf, /**< TOG_TER_DWARF */
ColorTerrainHuman, /**< TOG_TER_HUMAN */
ColorTerrainUndead, /**< TOG_TER_UNDEAD */
PlaceNeutralTerrain, /**< TOG_TER_NEUTRAL */
AddMountains, /**< TOG_TER_MOUNT_NE */
AddTrees, /**< TOG_TREE */
PlaceWater, /**< TOG_TER_WATER */
ColorTerrainElf, /**< TOG_TER_ELF */
};
struct CMapInterfData
{
MapChangeAction selectedAction;
};
assert_size(CMapInterfData, 4);
/** Represents DLG_MAP from ScenEdit.dlg. */
struct CMapInterf : public CIsoView
{
CMapInterfData* data;
};
assert_size(CMapInterf, 24);
assert_offset(CMapInterf, taskManagerHolder, 8);
static inline CMapInterf* castTaskManagerToMapInterf(ITaskManagerHolder* taskManager)
{
return reinterpret_cast<CMapInterf*>((std::uintptr_t)taskManager
- offsetof(CMapInterf, taskManagerHolder));
}
namespace CMapInterfApi {
struct Api
{
/** Creates task for map editing depending on RAD_TERRAIN button selection. */
using CreateMapChangeTask = CTaskMapChange*(__thiscall*)(ITaskManagerHolder* thisptr);
CreateMapChangeTask createMapChangeTask;
using CreateTask = CTaskMapChange*(__stdcall*)(CMapInterf* mapInterf);
CreateTask createDelMapObjectTask;
CreateTask createAddMountainsTask;
CreateTask createAddTreesTask;
CreateTask createChangeHeightTask;
};
Api& get();
} // namespace CMapInterfApi
} // namespace game::editor
#endif // MAPINTERF_H
| 2,636
|
C++
|
.h
| 70
| 34.385714
| 90
| 0.725383
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,405
|
streamregister.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/streamregister.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2024 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef STREAMREGISTERBASE_H
#define STREAMREGISTERBASE_H
#include "d2assert.h"
namespace game {
struct CStreamRegisterBaseVftable;
struct IMidScenarioObject;
struct CMidgardID;
struct CStreamRegisterBase
{
CStreamRegisterBaseVftable* vftable;
};
assert_size(CStreamRegisterBase, 4);
struct CStreamRegisterBaseVftable
{
using Destructor = void(__thiscall*)(CStreamRegisterBase* thisptr, char flags);
Destructor destructor;
/** Creates scenario object with specified id. Object type depends on child class template argument. */
using Stream = IMidScenarioObject*(__thiscall*)(CStreamRegisterBase* thisptr, const CMidgardID* objectId);
Stream stream;
};
template<typename T>
struct CStreamRegister : public CStreamRegisterBase
{ };
}
#endif // STREAMREGISTERBASE_H
| 1,610
|
C++
|
.h
| 43
| 35.232558
| 110
| 0.78599
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,406
|
midunithooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midunithooks.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDUNITHOOKS_H
#define MIDUNITHOOKS_H
#include "idlist.h"
namespace game {
struct CMidgardID;
struct IMidgardObjectMap;
struct IMidgardStream;
struct IMidgardStreamEnv;
struct IUsUnit;
struct CMidUnit;
struct CScenarioVisitor;
} // namespace game
namespace hooks {
bool __fastcall addModifierHooked(game::CMidUnit* thisptr,
int /*%edx*/,
const game::CMidgardID* modifierId);
bool __fastcall removeModifierHooked(game::CMidUnit* thisptr,
int /*%edx*/,
const game::CMidgardID* modifierId);
bool __fastcall transformHooked(game::CMidUnit* thisptr,
int /*%edx*/,
const game::CScenarioVisitor* visitor,
const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* transformImplId,
bool keepHp);
bool __fastcall upgradeHooked(game::CMidUnit* thisptr,
int /*%edx*/,
const game::CScenarioVisitor* visitor,
const game::CMidgardID* upgradeImplId);
bool __fastcall initWithSoldierImplHooked(game::CMidUnit* thisptr,
int /*%edx*/,
const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* unitImplId,
const int* turn);
void __fastcall midUnitStreamHooked(game::CMidUnit* thisptr,
int /*%edx*/,
const game::IMidgardObjectMap* objectMap,
game::IMidgardStreamEnv* streamEnv);
bool __stdcall getModifiersHooked(game::IdList* value, const game::CMidUnit* unit);
bool __stdcall addModifiersHooked(const game::IdList* value,
game::CMidUnit* unit,
char* errorBuffer,
bool skipInapplicable);
bool __stdcall removeModifiersHooked(game::IUsUnit** unitImpl);
void __stdcall midUnitStreamImplIdAndLevelHooked(game::IMidgardStream** stream,
game::CMidgardID* unitImplId,
const char* idName,
const char* levelName);
} // namespace hooks
#endif // MIDUNITHOOKS_H
| 3,402
|
C++
|
.h
| 68
| 35.058824
| 83
| 0.574442
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,407
|
taskmanagerholder.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/taskmanagerholder.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TASKMANAGERHOLDER_H
#define TASKMANAGERHOLDER_H
#include "d2assert.h"
namespace game {
struct ITask;
struct CTaskManager;
struct ITaskManagerHolderVftable;
struct ITaskManagerHolder
{
ITaskManagerHolderVftable* vftable;
};
struct ITaskManagerHolderVftable
{
using Destructor = void(__thiscall*)(ITaskManagerHolder* thisptr, char flags);
Destructor destructor;
using GetTaskManager = CTaskManager*(__thiscall*)(ITaskManagerHolder* thisptr);
GetTaskManager getTaskManager;
using GetTask = ITask*(__thiscall*)(ITaskManagerHolder* thisptr);
GetTask getTask;
};
assert_vftable_size(ITaskManagerHolderVftable, 3);
} // namespace game
#endif // TASKMANAGERHOLDER_H
| 1,517
|
C++
|
.h
| 41
| 34.634146
| 83
| 0.780887
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,408
|
midscenarioobject.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midscenarioobject.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDSCENARIOOBJECT_H
#define MIDSCENARIOOBJECT_H
#include "midobject.h"
namespace game {
struct IMidScenarioObjectVftable;
struct IMidgardStreamEnv;
struct IMidgardObjectMap;
/** Base class for all objects in scenario. */
struct IMidScenarioObject : public IMidObjectT<IMidScenarioObjectVftable>
{ };
struct IMidScenarioObjectVftable : public IMidObjectVftable
{
/** Serializes object to/from .sg file, .dbf file or network. */
using Stream = void(__thiscall*)(IMidScenarioObject* thisptr,
const IMidgardObjectMap* objectMap,
IMidgardStreamEnv* streamEnv);
Stream stream;
/**
* Returns true if object has correct data.
* For example, called when Scenario Editor checks scenario for inconsistencies.
*/
using IsValid = bool(__thiscall*)(const IMidScenarioObject* thisptr,
const IMidgardObjectMap* objectMap);
IsValid isValid;
/** Meaning and usage cases unknown. */
using Method3 = bool(__thiscall*)(const IMidScenarioObject* thisptr, int a2);
Method3 method3;
};
assert_vftable_size(IMidScenarioObjectVftable, 4);
} // namespace game
#endif // MIDSCENARIOOBJECT_H
| 2,057
|
C++
|
.h
| 49
| 37.081633
| 84
| 0.725588
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,409
|
isoground2.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/isoground2.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2022 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IISOGROUND2_H
#define IISOGROUND2_H
#include "d2assert.h"
#include <cstdint>
namespace game {
struct IIsoGround2Vftable;
struct SurfaceDecompressData;
struct CMqPoint;
struct CMqRect;
struct IIsoGround2
{
IIsoGround2Vftable* vftable;
};
assert_size(IIsoGround2, 4);
struct IIsoGround2Vftable
{
using Destructor = void(__thiscall*)(IIsoGround2* thisptr, char flags);
Destructor destructor;
using Draw = void(__thiscall*)(IIsoGround2* thisptr,
SurfaceDecompressData* surfaceData,
CMqPoint* srcPos,
CMqPoint* dstPos,
CMqRect* area,
const std::uint32_t* blendMask,
const std::uint32_t* alphaMask);
Draw draw;
using Method2 = void(__thiscall*)(IIsoGround2* thisptr,
SurfaceDecompressData* surfaceData,
CMqPoint* dstPos,
CMqRect* textureArea);
Method2 method2;
};
assert_vftable_size(IIsoGround2Vftable, 3);
} // namespace game
#endif // IISOGROUND2_H
| 2,030
|
C++
|
.h
| 53
| 30.113208
| 75
| 0.648855
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,410
|
batattackgiveattack.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattackgiveattack.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BATATTACKGIVEATTACK_H
#define BATATTACKGIVEATTACK_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
/**
* Gives additional attacks to allies.
* Alchemist unit of Mountain Clans uses this attack.
*/
struct CBatAttackGiveAttack : public CBatAttackBase
{
CMidgardID unitId1;
CMidgardID unitId2;
int attackNumber; /**< 1 if this is a unit's primary attack, 2 for secondary. */
};
assert_size(CBatAttackGiveAttack, 16);
namespace CBatAttackGiveAttackApi {
IBatAttackVftable* vftable();
} // namespace CBatAttackGiveAttackApi
} // namespace game
#endif // BATATTACKGIVEATTACK_H
| 1,432
|
C++
|
.h
| 39
| 34.641026
| 84
| 0.772957
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,411
|
targetset.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/targetset.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TARGETSET_H
#define TARGETSET_H
#include "intset.h"
namespace game {
/**
* Set of targets to attack during single battle turn.
* Contains units positions in groups.
* Position values are positive for target group and negative for other group.
* Negative position computed as -(unitPosition + 1).
*/
using TargetSet = IntSet;
using TargetSetNode = IntSetNode;
using TargetSetIterator = IntSetIterator;
} // namespace game
#endif // TARGETSET_H
| 1,274
|
C++
|
.h
| 33
| 36.757576
| 78
| 0.768421
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,412
|
encparam.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/encparam.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ENCPARAM_H
#define ENCPARAM_H
namespace game {
/** Interface for ingame encyclopedia parameters. */
struct IEncParam
{
void* vftable;
};
} // namespace game
#endif // ENCPARAM_H
| 1,007
|
C++
|
.h
| 28
| 34.035714
| 72
| 0.759754
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,413
|
batimagesloader.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batimagesloader.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BATIMAGESLOADER_H
#define BATIMAGESLOADER_H
namespace game {
struct CMidgardID;
struct CBatImagesLoader;
struct IMqImage2;
/** Battle cursor types supported in game and their image names. */
enum class BattleCursorType : int
{
Default = 0, /**< CUDEFAULT */
Attack, /**< CUATTACK */
AttackN, /**< CUATTACKN */
Heal, /**< CUHEAL */
HealN, /**< CUHEALN */
Transf, /**< CUTRANSF */
TransfN, /**< CUTRANSFN */
};
namespace BatImagesLoaderApi {
struct Api
{
using LoadMarkImage = IMqImage2*(__thiscall*)(CBatImagesLoader* thisptr, bool large);
LoadMarkImage loadMarkImage;
using LoadUnitFaceImage = IMqImage2*(__thiscall*)(CBatImagesLoader* thisptr,
const CMidgardID* unitImplId,
bool left,
bool big);
LoadUnitFaceImage loadUnitFaceImage;
using LoadItemImage = IMqImage2*(__thiscall*)(CBatImagesLoader* thisptr,
const CMidgardID* globalItemId,
bool right);
LoadItemImage loadItemImage;
};
Api& get();
} // namespace BatImagesLoaderApi
} // namespace game
#endif // BATIMAGESLOADER_H
| 2,156
|
C++
|
.h
| 54
| 32.574074
| 89
| 0.643062
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,414
|
netsingleplayer.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netsingleplayer.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Stanislav Egorov.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETSINGLEPLAYER_H
#define NETSINGLEPLAYER_H
#include "d2string.h"
#include "idlist.h"
#include "mqnetplayer.h"
namespace game {
struct CNetSingleSession;
struct IMqNetReception;
/** Used by both CNetSinglePlayerServer and CNetSinglePlayerClient as internal instance. */
struct CNetSinglePlayer : public IMqNetPlayer
{
int unknown4;
IMqNetPlayer* owner; // CNetSinglePlayerServer or CNetSinglePlayerClient
CNetSingleSession* session;
int unknown16;
int unknown20;
IMqNetReception* reception;
int netId;
String playerName;
IdList unknown48;
IdList unknown64;
};
assert_size(CNetSinglePlayer, 80);
assert_offset(CNetSinglePlayer, unknown4, 4);
assert_offset(CNetSinglePlayer, unknown16, 16);
assert_offset(CNetSinglePlayer, unknown20, 20);
assert_offset(CNetSinglePlayer, netId, 28);
assert_offset(CNetSinglePlayer, playerName, 32);
assert_offset(CNetSinglePlayer, unknown48, 48);
assert_offset(CNetSinglePlayer, unknown64, 64);
namespace CNetSinglePlayerApi {
IMqNetPlayerVftable* vftable();
} // namespace CNetSinglePlayerApi
} // namespace game
#endif // NETSINGLEPLAYER_H
| 1,945
|
C++
|
.h
| 53
| 34.415094
| 91
| 0.787879
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,415
|
midcondgamemode.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midcondgamemode.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDCONDGAMEMODE_H
#define MIDCONDGAMEMODE_H
namespace game {
struct CMidEvCondition;
struct String;
struct IMidgardObjectMap;
struct LEventCondCategory;
struct ITask;
struct CMidgardID;
struct ITestCondition;
struct CDialogInterf;
namespace editor {
struct CCondInterf;
}
} // namespace game
namespace hooks {
game::CMidEvCondition* createMidCondGameMode();
void __stdcall midCondGameModeGetInfoString(game::String* info,
const game::IMidgardObjectMap* objectMap,
const game::CMidEvCondition* eventCondition);
game::editor::CCondInterf* createCondGameModeInterf(game::ITask* task,
void* a2,
const game::CMidgardID* eventId);
game::ITestCondition* createTestGameMode(game::CMidEvCondition* eventCondition);
bool checkGameModeConditionValid(game::CDialogInterf* dialog,
const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* eventId);
} // namespace hooks
#endif // MIDCONDGAMEMODE_H
| 1,983
|
C++
|
.h
| 47
| 35.085106
| 89
| 0.696985
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,416
|
menubaseeditor.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menubaseeditor.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MENUBASEEDITOR_H
#define MENUBASEEDITOR_H
#include "fullscreeninterf.h"
namespace game::editor {
/** Base class for all menus used in Scenario Editor. */
struct CMenuBase : public CFullScreenInterf
{
void* menuBaseData;
};
assert_size(CMenuBase, 20);
} // namespace game::editor
#endif // MENUBASEEDITOR_H
| 1,137
|
C++
|
.h
| 30
| 35.966667
| 72
| 0.766364
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,417
|
midevent.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midevent.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIDEVENT_H
#define MIDEVENT_H
#include "d2vector.h"
#include "midgardid.h"
#include "midscenarioobject.h"
#include "raceset.h"
#include "stringandid.h"
#include <cstddef>
namespace game {
struct CMidEvCondition;
struct CMidEvEffect;
struct CScenarioVisitor;
struct IMidgardObjectMap;
struct CDialogInterf;
/** Holds event related data in scenario file and game. */
struct CMidEvent : public IMidScenarioObject
{
StringAndId name;
RaceSet affectedRaces; /**< Races to which conditions and effects can apply. */
/** Races that can trigger event. 'Verified races' in game terms. */
RaceSet racesCanTrigger;
bool enabled;
bool occurOnce;
char padding[2];
int order; /**< Event evaluation order. */
int chance;
Vector<CMidEvCondition*> conditions;
Vector<CMidEvEffect*> effects;
};
assert_size(CMidEvent, 120);
assert_offset(CMidEvent, affectedRaces, 20);
assert_offset(CMidEvent, racesCanTrigger, 48);
assert_offset(CMidEvent, chance, 84);
namespace CMidEventApi {
struct Api
{
/**
* Adds event condition to the event.
* Used in Scenario Editor only.
* @param[in] visitor not used by the function and can be null.
* @returns true if condition was successfully added.
*/
using AddCondition = bool(__thiscall*)(CMidEvent* thisptr,
CScenarioVisitor* visitor,
CMidEvCondition* condition);
AddCondition addCondition;
/**
* Adds event effect to the event.
* Used in Scenario Editor only.
* @param[in] visitor not used by the function and can be null.
* @returns true if effect was successfully added.
*/
using AddEffect = bool(__thiscall*)(CMidEvent* thisptr,
CScenarioVisitor* visitor,
CMidEvEffect* effect);
AddEffect addEffect;
/**
* Checks correctness of event conditions and effects.
* Used in Scenario Editor only.
*/
using CheckValid = bool(__stdcall*)(CDialogInterf* dialog,
const IMidgardObjectMap* objectMap,
const CMidgardID* eventId);
CheckValid checkValid;
/** Returns true if event affects player with specified id. */
using AffectsPlayer = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const CMidgardID* eventId);
AffectsPlayer affectsPlayer;
};
Api& get();
} // namespace CMidEventApi
} // namespace game
#endif // MIDEVENT_H
| 3,491
|
C++
|
.h
| 92
| 31.282609
| 83
| 0.671986
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,418
|
itemexpotionboost.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemexpotionboost.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMEXPOTIONBOOST_H
#define ITEMEXPOTIONBOOST_H
#include "itemextension.h"
namespace game {
struct IItemExPotionBoostVftable;
struct CMidgardID;
struct IItemExPotionBoost : IItemExtensionT<IItemExPotionBoostVftable>
{ };
struct IItemExPotionBoostVftable : IItemExtensionVftable
{
using GetModifierId = const CMidgardID*(__thiscall*)(const IItemExPotionBoost* thisptr);
GetModifierId getModifierId;
};
assert_vftable_size(IItemExPotionBoostVftable, 2);
} // namespace game
#endif // ITEMEXPOTIONBOOST_H
| 1,339
|
C++
|
.h
| 34
| 37.382353
| 92
| 0.790895
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,419
|
menurandomscenariomulti.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menurandomscenariomulti.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2023 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MENURANDOMSCENARIOMULTI_H
#define MENURANDOMSCENARIOMULTI_H
namespace game {
struct CMenuBase;
struct CMenuPhase;
} // namespace game
namespace hooks {
game::CMenuBase* __stdcall createMenuRandomScenarioMulti(game::CMenuPhase* menuPhase);
}
#endif // MENURANDOMSCENARIOMULTI_H
| 1,103
|
C++
|
.h
| 28
| 37.571429
| 86
| 0.782039
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,420
|
itemscroll.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemscroll.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2021 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ITEMSCROLL_H
#define ITEMSCROLL_H
#include "itemspell.h"
namespace game {
struct CItemScroll : public CItemSpell
{ };
assert_size(CItemScroll, 20);
} // namespace game
#endif // ITEMSCROLL_H
| 1,018
|
C++
|
.h
| 27
| 35.814815
| 72
| 0.765244
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,421
|
battleattackinfo.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/battleattackinfo.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BATTLEATTACKINFO_H
#define BATTLEATTACKINFO_H
#include "d2assert.h"
#include "d2list.h"
#include "midgardid.h"
#include <cstddef>
namespace game {
/** Used by CBattleViewerInterf to show effects and play sounds. */
enum class AttackEffect : int
{
Damage, /**< Assumption: unit was damaged by common attack. */
Paralyze, /**< Unit paralyzed and passes its turn. Shows message with id 'X008TA0010'. */
Retreating, /**< Unit retreating. Unit image in battlefield flips horizontally. */
Retreated, /**< Unit retreated from battle. Unit disappears from battlefield. */
BreakParalyze, /**< Paralyze is over. Shows message with id 'X008TA0024'. */
BreakPetrify, /**< Petrify is over. Shows message with id 'X008TA0025'. */
Poison, /**< Unit takes damage from poison. Shows message with id 'X008TA0014'. */
Frostbite, /**< Unit takes damage from frostbite. Shows message with id 'X008TA0015'. */
Blister, /**< Unit takes damage from blister. Shows message with id 'X160TA0022'. */
Wait, /**< Unit is waiting. Shows message with id 'X008TA0020'. */
Defend, /**< Unit defending. Shows message with id 'X008TA0021'. */
Effect11,
Effect12, /**< Assumption: unit hit by attack or item used. */
Untransform, /**< Unit restores original form, except drain level. Message id 'X008TA0023'. */
Unsummon, /**< Summoned unit unsummoned. */
GroupUpgrade, /**< Unit gets promotion when battle won or gains experience.
* Message id 'X008TA0005'.
*/
LevelRestored, /**< Unit restores original form after drain level. Message id 'X008TA0029'. */
Effect17,
Effect18 /**< Set as default in BattleAttackInfo constructor. */
};
/** Information about attack results for a specific unit in battle. */
struct BattleAttackUnitInfo
{
CMidgardID unitId;
CMidgardID unitImplId;
bool attackMissed;
bool defend;
bool targetImmune;
char padding;
int damage;
int criticalDamage;
};
assert_size(BattleAttackUnitInfo, 20);
using AttackUnitInfoList = List<BattleAttackUnitInfo>;
/**
* Holds information about performed attack.
* Used to update battle ui.
*/
struct BattleAttackInfo
{
CMidgardID unitId;
bool attacker;
char padding[3];
AttackEffect effect;
int attackNumber;
CMidgardID id;
AttackUnitInfoList unitsInfo;
};
assert_size(BattleAttackInfo, 36);
assert_offset(BattleAttackInfo, unitsInfo, 20);
namespace BattleAttackInfoApi {
struct Api
{
/** Adds unit specific attack information to the list. */
using AddUnitInfo = void(__thiscall*)(AttackUnitInfoList* thisptr,
const BattleAttackUnitInfo* info);
AddUnitInfo addUnitInfo;
};
Api& get();
} // namespace BattleAttackInfoApi
} // namespace game
#endif // BATTLEATTACKINFO_H
| 3,725
|
C++
|
.h
| 92
| 36.608696
| 100
| 0.706468
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,422
|
textandid.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/textandid.h
|
/*
* This file is part of the modding toolset for Disciples 2.
* (https://github.com/VladimirMakeev/D2ModdingToolset)
* Copyright (C) 2020 Vladimir Makeev.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TEXTANDID_H
#define TEXTANDID_H
#include "d2assert.h"
#include "d2pair.h"
#include "midgardid.h"
#include "mq_c_s.h"
namespace game {
struct TextAndId
{
mq_c_s<Pair<CMidgardID, char*>>* texts;
CMidgardID id;
};
assert_size(TextAndId, 8);
} // namespace game
#endif // TEXTANDID_H
| 1,115
|
C++
|
.h
| 33
| 31.818182
| 72
| 0.753488
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.