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,523
|
categoryids.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/categoryids.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 CATEGORYIDS_H
#define CATEGORYIDS_H
namespace game {
/** Race ids from LRace.dbf. */
enum class RaceId : int
{
Human = 0,
Undead,
Heretic,
Dwarf,
Neutral,
Elf
};
/** Subrace ids from LSubRace.dbf. */
enum class SubRaceId : int
{
Custom,
Human,
Undead,
Heretic,
Dwarf,
Neutral,
NeutralHuman,
NeutralElf,
NeutralGreenSkin,
NeutralDragon,
NeutralMarsh,
NeutralWater,
NeutralBarbarian,
NeutralWolf,
Elf
};
/** Ai attitude ids from LaiAtt.dbf. */
enum class AiAttitudeId : int
{
Small = 0,
Medium,
Large,
Humongous
};
/** Unit branch ids from LunitB.dbf. */
enum class UnitBranchId : int
{
Fighter = 0,
Archer,
Mage,
Special,
Sideshow,
Hero,
Noble,
Summon
};
/** Building type ids from Lbuild.dbf. */
enum class BuildingId : int
{
Guild,
Heal,
Magic,
Unit
};
/** Difficulty level ids from LDiff.dbf. */
enum class DifficultyLevelId : int
{
Easy,
Average,
Hard,
VeryHard
};
/**
* Unit ids from LUnitC.dbf.
* LUnitC.dbf also defines neutral leader and neutral soldier but game does not use them.
*/
enum class UnitId : int
{
Soldier,
Noble,
Leader,
Summon = 4,
Illusion,
Guardian = 8
};
/** Attack reach ids from LAttR.dbf. */
enum class AttackReachId : int
{
All = 1,
Any,
Adjacent
};
/** Attack class ids from LAttC.dbf. */
enum class AttackClassId : int
{
Damage = 1,
Drain,
Paralyze,
Heal = 6,
Fear,
BoostDamage,
Petrify,
LowerDamage,
LowerInitiative,
Poison,
Frostbite,
Revive,
DrainOverflow,
Cure,
Summon,
DrainLevel,
GiveAttack,
Doppelganger,
TransformSelf,
TransformOther,
Blister,
BestowWards,
Shatter
};
/** Attack source ids from LAttS.dbf. */
enum class AttackSourceId : int
{
Weapon,
Mind,
Life,
Death,
Fire,
Water,
Earth,
Air
};
/** Death animation ids from LDthAnim.dbf. */
enum class DeathAnimationId : int
{
Human = 1,
Heretic,
Dwarf,
Undead,
Neutral,
Dragon,
Ghost,
Elf
};
/** Immune category ids from LImmune.dbf. */
enum class ImmuneId : int
{
Notimmune = 1,
Once,
Always
};
/** Lord category ids from LLord.dbf. */
enum class LordId : int
{
Mage,
Warrior,
Diplomat
};
/** Order ids from LOrder.dbf. */
enum class OrderId : int
{
Normal = 1,
Stand,
Guard,
AttackStack,
DefendStack,
SecureCity,
Roam,
MoveToLocation,
DefendLocation,
Bezerk,
Assist,
Steal = 13,
DefendCity
};
/** Items ids from LmagItm.dbf. */
enum class ItemId : int
{
Armor,
Jewel,
Weapon,
Banner,
PotionBoost,
PotionHeal,
PotionRevive,
PotionPermanent,
Scroll,
Wand,
Valuable,
Orb,
Talisman,
TravelItem,
Special
};
/** Fortification ids from LFort.dbf. */
enum class FortId : int
{
Capital = 2,
Village = 4
};
/** Site ids from LSite.dbf. */
enum class SiteId : int
{
Merchant = 2,
MageTower = 4,
Mercenaries,
Trainer
};
/** Modifier source ids from LModifS.dbf. */
enum class ModifierSourceId : int
{
Unit = 0,
Stack = 1,
Attack = 3,
};
/** Modifier element types from LmodifE.dbf. */
enum class ModifierElementType : int
{
QtyTarget = 0,
ScoutingRange = 1,
Leadership = 2,
Power = 3,
QtyDamage = 4,
Armor = 5,
Hp = 6,
MoveAllowance = 7,
Initiative = 9,
MoveAbility = 10,
LeaderAbility = 11,
Immunity = 12,
Regeneration = 13,
Immunityclass = 14,
AttackDrain = 15,
FastRetreat = 16,
LowerCost = 17,
};
/** Ground ids from Lground.dbf. */
enum class GroundId : int
{
Plain = 0,
Forest = 1,
Water = 3,
Mountain = 4,
};
/** Leader ability ids from LleadA.dbf. */
enum class LeaderAbilityId : int
{
Zealot = 1,
Incorruptible = 3,
WeaponMaster = 6,
WandScrollUse = 7,
WeaponArmorUse = 8,
BannerUse = 9,
JewelryUse = 10,
Rod = 13,
OrbUse = 14,
TalismanUse = 15,
TravelItemUse = 16,
CriticalHit = 17,
};
/** Terrain ids from LTerrain.dbf. */
enum class TerrainId : int
{
Human = 1,
Dwarf,
Heretic,
Undead,
Neutral,
Elf
};
/** Event condition ids from LEvCond.dbf. */
enum class EventConditionId : int
{
Frequency,
Location = 2,
EnterCity,
OwnCity,
KillStack,
OwnItem,
LeaderOwnItem,
Diplomacy,
Alliance,
LootRuin,
TransformLand,
VisitSite,
LeaderToZone = 14,
LeaderToCity,
ItemToLocation,
StackExists,
VariableInRange,
};
/** Event effect ids from LEvEffct.dbf. */
enum class EventEffectId : int
{
Win,
CreateStack,
CastSpell,
CastSpellMap,
ChangeOwner,
MoveBeside,
Battle,
EnableEvent,
GiveSpell,
GiveItem,
MoveStack,
Ally,
Diplomacy,
Unfog,
RemoveMountain,
RemoveLandmark,
ChangeObjective,
Popup,
ChangeOrder,
DestroyItem,
RemoveStack,
ChangeLandmark,
ChangeTerrain,
ModifyVariable,
};
/** Landmark ids from LLMCat.dbf. */
enum class LandmarkId : int
{
Misc,
Building,
Structure,
Terrain,
};
/** Leader ids from LLeadC.dbf. */
enum class LeaderId : int
{
Fighter = 1,
Explorer,
Mage,
Rod,
Noble,
};
/** Spell ids from LSpell.dbf. */
enum class SpellId : int
{
Attack,
Lower,
Heal,
Boost,
Summon,
Fog = 6,
Unfog,
RestoreMove,
Invisibility,
RemoveRod,
ChangeTerrain,
GiveWards,
};
/** AI spell ids from LAiSpell.dbf. */
enum class AiSpellId : int
{
All = 1,
None,
Human,
Undead,
Heretic,
Dwarf,
};
} // namespace game
#endif // CATEGORYIDS_H
| 6,627
|
C++
|
.h
| 377
| 13.904509
| 89
| 0.652943
|
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,524
|
roomclientjoin.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/roomclientjoin.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 ROOMCLIENTJOIN_H
#define ROOMCLIENTJOIN_H
namespace SLNet {
struct RakNetGUID;
}
namespace hooks {
struct CMenuCustomLobby;
void customLobbyProcessJoin(CMenuCustomLobby* menu,
const char* roomName,
const SLNet::RakNetGUID& serverGuid);
} // namespace hooks
#endif // ROOMCLIENTJOIN_H
| 1,167
|
C++
|
.h
| 30
| 35.233333
| 72
| 0.742478
|
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,525
|
batunitanim.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batunitanim.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 BATUNITANIM_H
#define BATUNITANIM_H
#include "battlemsgdata.h"
#include "batviewerutils.h"
#include "d2list.h"
#include "d2string.h"
#include "midgardid.h"
#include "mqanimation.h"
#include "mqrect.h"
#include "racecategory.h"
#include "smartptr.h"
#include <cstddef>
namespace game {
struct CMqPresentationManager;
struct IMidgardObjectMap;
struct CBatViewer2DEngine;
struct CBatImagesLoader;
struct CBatUnitAnimData
{
SmartPtr<CMqPresentationManager> presentationMgr;
IMidgardObjectMap* objectMap;
CMidgardID unitId;
CMidgardID baseUnitImplId;
LRaceCategory raceCategory;
bool retreated; /**< Set according to BattleStatus::Retreated. */
bool retreating; /**< Set according to BattleStatus::Retreat. */
bool hidden; /**< Set according to BattleStatus::Hidden. */
bool dead; /**< Set according to BattleStatus::Dead. */
char unknown;
bool bigUnit;
bool disabled; /**< Set according to BattleStatus::Paralyze or BattleStatus::Petrify. */
bool unknown2;
CMidgardID unknownId;
int unknown3;
BattleMsgData battleMsgData;
bool attacker;
bool unknown11;
char padding[2];
int unitPosition;
CBatViewer2DEngine* batViewer2dEngine;
CBatImagesLoader* imagesLoader;
CBatViewerUtils::CAnimCounter* animCounter;
CMqRect smallUnitImageArea;
CMqRect bigUnitImageArea1;
CMqRect bigUnitImageArea2;
SmartPointer ptr1;
SmartPointer ptr2;
SmartPointer ptr3;
char unknown4[12];
void* unknown5;
void* unknown6;
void* unknown7;
bool battleAnimations;
bool battleSpeedInstant;
char padding2[2];
String string1;
List<void*>* list; /**< Points to CBattleViewerInterfData2::list4. */
String string2;
char unknown10[12];
};
assert_size(CBatUnitAnimData, 4136);
assert_offset(CBatUnitAnimData, objectMap, 8);
assert_offset(CBatUnitAnimData, bigUnit, 37);
assert_offset(CBatUnitAnimData, unknownId, 40);
assert_offset(CBatUnitAnimData, battleMsgData, 48);
assert_offset(CBatUnitAnimData, smallUnitImageArea, 3988);
assert_offset(CBatUnitAnimData, ptr1, 4036);
assert_offset(CBatUnitAnimData, unknown5, 4072);
assert_offset(CBatUnitAnimData, string1, 4088);
assert_offset(CBatUnitAnimData, string2, 4108);
struct CBatUnitAnim : public IMqAnimation
{
CBatUnitAnimData* data;
};
assert_size(CBatUnitAnim, 8);
namespace BatUnitAnimApi {
struct Api
{
using Update = void(__thiscall*)(CBatUnitAnim* thisptr,
const BattleMsgData* battleMsgData,
bool a3);
Update update;
};
Api& get();
} // namespace BatUnitAnimApi
} // namespace game
#endif // BATUNITANIM_H
| 3,513
|
C++
|
.h
| 105
| 29.819048
| 92
| 0.746612
|
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,526
|
image2outline.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/image2outline.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 IMAGE2OUTLINE_H
#define IMAGE2OUTLINE_H
#include "d2color.h"
#include "mqimage2surface16.h"
namespace game {
/** Renders thin rectangle outline. */
struct CImage2Outline : public CMqImage2Surface16
{
Color color;
CMqPoint size2;
};
assert_size(CImage2Outline, 56);
namespace CImage2OutlineApi {
struct Api
{
using Constructor = CImage2Outline*(__thiscall*)(CImage2Outline* thisptr,
const CMqPoint* size,
const Color* color,
std::uint32_t opacity);
Constructor constructor;
};
Api& get();
} // namespace CImage2OutlineApi
} // namespace game
#endif // IMAGE2OUTLINE_H
| 1,573
|
C++
|
.h
| 43
| 30.860465
| 77
| 0.688611
|
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,527
|
midgardmapblock.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midgardmapblock.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 MIDGARDMAPBLOCK_H
#define MIDGARDMAPBLOCK_H
#include "categoryids.h"
#include "midgardid.h"
#include "midscenarioobject.h"
#include "mqpoint.h"
#include "terraincountmap.h"
#include <cstdint>
namespace game {
struct IMidgardObjectMap;
struct IMidgardStreamEnv;
struct LGroundCategory;
struct LTerrainCategory;
/*
Tile contents:
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| forest index 2 | forest index | | tile variation | ground |terrain |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
*/
/** Represents block of tiles in scenario file and game. */
struct CMidgardMapBlock : public IMidScenarioObject
{
std::uint32_t tiles[32]; /**< 8 tiles along the X axis by 4 tiles along the Y axis. */
CMqPoint position;
};
assert_size(CMidgardMapBlock, 144);
static constexpr inline TerrainId tileTerrain(std::uint32_t tile)
{
return static_cast<TerrainId>(tile & 7);
}
static constexpr inline GroundId tileGround(std::uint32_t tile)
{
return static_cast<GroundId>((tile >> 3) & 7);
}
static constexpr inline std::uint8_t tileForestIndex2(std::uint32_t tile)
{
return tile >> 26;
}
namespace CMidgardMapBlockApi {
struct Api
{
/** Allocates memory for map block object and calls constructor. */
using Allocate = CMidgardMapBlock*(__stdcall*)(const CMidgardID* blockId);
Allocate allocate;
using Constructor = CMidgardMapBlock*(__thiscall*)(CMidgardMapBlock* thisptr,
const CMidgardID* blockId);
Constructor constructor;
/** Counts number of tiles with plain ground and their terrain coverage for each race. */
using CountTerrainCoverage = bool(__thiscall*)(const CMidgardMapBlock* thisptr,
TerrainCountMap* terrainCoverage,
int* plainTiles);
CountTerrainCoverage countTerrainCoverage;
/** Sets terrain for tile at specified map position. */
using SetTerrain = bool(__thiscall*)(CMidgardMapBlock* thisptr,
const LTerrainCategory* terrain,
const CMqPoint* position);
SetTerrain setTerrain;
/** Returns terrain for tile at specified position. */
using GetTerrain = bool(__thiscall*)(const CMidgardMapBlock* thisptr,
LTerrainCategory* terrain,
const CMqPoint* position);
GetTerrain getTerrain;
/** Sets ground for tile at specified map position. */
using SetGround = bool(__thiscall*)(CMidgardMapBlock* thisptr,
const LGroundCategory* ground,
const CMqPoint* position);
SetGround setGround;
/** Returns ground for tile at specified position. */
using GetGround = bool(__thiscall*)(CMidgardMapBlock* thisptr,
LGroundCategory* ground,
const CMqPoint* position);
GetGround getGround;
};
Api& get();
IMidScenarioObjectVftable* vftable();
} // namespace CMidgardMapBlockApi
} // namespace game
#endif // MIDGARDMAPBLOCK_H
| 4,265
|
C++
|
.h
| 97
| 36.494845
| 98
| 0.630398
|
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,528
|
middragdropinterfhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/middragdropinterfhooks.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 MIDDRAGDROPINTERFHOOKS_H
#define MIDDRAGDROPINTERFHOOKS_H
namespace game {
struct CMidDragDropInterf;
} // namespace game
namespace hooks {
void midDragDropInterfResetCurrentSource(game::CMidDragDropInterf* dragDropInterf);
} // namespace hooks
#endif // MIDDRAGDROPINTERFHOOKS_H
| 1,107
|
C++
|
.h
| 27
| 39.148148
| 83
| 0.785847
|
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,529
|
usstackleader.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/usstackleader.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 USSTACKLEADER_H
#define USSTACKLEADER_H
#include "d2assert.h"
#include "usunitextension.h"
namespace game {
struct LGroundCategory;
struct LLeaderAbility;
struct GlobalData;
struct IUsStackLeaderVftable;
/** Stack leader interface. */
template <typename T = IUsStackLeaderVftable>
struct IUsStackLeaderT : public IUsUnitExtensionT<T>
{ };
struct IUsStackLeader : public IUsStackLeaderT<>
{ };
struct IUsStackLeaderVftable : public IUsUnitExtensionVftable
{
using GetInt = int(__thiscall*)(const IUsStackLeader* thisptr);
/** Returns maximum movement points stack leader can have. */
GetInt getMovement;
/** Returns leader ability name (ABIL_TXT in Gunits.dbf). */
using GetAbilityName = const char*(__thiscall*)(const IUsStackLeader* thisptr);
GetAbilityName getAbilityName;
/** Returns true if leader has movement bonus on specified ground. */
using HasMovementBonus = bool(__thiscall*)(const IUsStackLeader* thisptr,
const LGroundCategory* ground);
HasMovementBonus hasMovementBonus;
/** Returns scouting range. */
GetInt getScout;
GetInt getLeadership;
GetInt getNegotiate;
/** Returns true if leader has specified ability. */
using HasAbility = bool(__thiscall*)(const IUsStackLeader* thisptr,
const LLeaderAbility* ability);
HasAbility hasAbility;
using GetFastRetreat = bool(__thiscall*)(const IUsStackLeader* thisptr);
GetFastRetreat getFastRetreat;
GetInt getLowerCost;
};
assert_vftable_size(IUsStackLeaderVftable, 10);
namespace IUsStackLeaderApi {
const IUsStackLeaderVftable* vftable();
} // namespace IUsStackLeaderApi
} // namespace game
#endif // USSTACKLEADER_H
| 2,585
|
C++
|
.h
| 63
| 36.809524
| 83
| 0.7444
|
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,530
|
miditem.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/miditem.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 MIDITEM_H
#define MIDITEM_H
#include "midgardid.h"
#include "midscenarioobject.h"
namespace game {
struct Bank;
struct IMidgardObjectMap;
/** Holds item related data in scenario file and game. */
struct CMidItem : public IMidScenarioObject
{
CMidgardID globalItemId;
};
assert_size(CMidItem, 12);
namespace CMidItemApi {
struct Api
{
/**
* Computes item selling price according to game rules.
* Takes into account sell ratio from GVars.dbf and talisman charges count.
*/
using GetSellingPrice = Bank*(__stdcall*)(Bank* sellingPrice,
const IMidgardObjectMap* objectMap,
const CMidgardID* itemId);
GetSellingPrice getSellingPrice;
};
Api& get();
} // namespace CMidItemApi
} // namespace game
#endif // MIDITEM_H
| 1,666
|
C++
|
.h
| 47
| 31.212766
| 81
| 0.718731
|
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,531
|
settings.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/settings.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 SETTINGS_H
#define SETTINGS_H
#include <cstdint>
#include <filesystem>
#include <string>
#include <array>
namespace hooks {
struct Color
{
std::uint8_t r{};
std::uint8_t g{};
std::uint8_t b{};
};
struct Settings
{
int unitMaxDamage;
int unitMaxArmor;
int stackScoutRangeMax;
int shatteredArmorMax;
int shatterDamageMax;
int drainAttackHeal;
int drainOverflowHeal;
int carryOverItemsMax;
std::uint8_t criticalHitDamage;
std::uint8_t criticalHitChance;
std::uint8_t mageLeaderAttackPowerReduction;
std::uint8_t disableAllowedRoundMax;
std::uint8_t shatterDamageUpgradeRatio;
std::uint8_t splitDamageMultiplier;
struct AiAttackPowerBonus
{
std::int8_t easy;
std::int8_t average;
std::int8_t hard;
std::int8_t veryHard;
bool absolute;
} aiAttackPowerBonus;
bool showBanners;
bool showResources;
bool showLandConverted;
bool preserveCapitalBuildings;
bool buildTempleForWarriorLord;
bool allowShatterAttackToMiss;
bool doppelgangerRespectsEnemyImmunity;
bool doppelgangerRespectsAllyImmunity;
bool leveledDoppelgangerAttack;
bool leveledTransformSelfAttack;
bool leveledTransformOtherAttack;
bool leveledDrainLevelAttack;
bool leveledSummonAttack;
bool missChanceSingleRoll;
bool unrestrictedBestowWards;
bool freeTransformSelfAttack;
bool freeTransformSelfAttackInfinite;
bool fixEffectiveHpFormula;
struct AdditionalLordIncome
{
int warrior = 0;
int mage = 0;
int guildmaster = 0;
} additionalLordIncome;
struct UnitEncyclopedia
{
bool detailedUnitDescription;
bool detailedAttackDescription;
bool displayDynamicUpgradeValues;
bool displayBonusHp;
bool displayBonusXp;
bool displayInfiniteAttackIndicator;
bool displayCriticalHitTextInAttackName;
} unitEncyclopedia;
struct Modifiers
{
bool cumulativeUnitRegeneration;
bool notifyModifiersChanged;
bool validateUnitsOnGroupChanged;
} modifiers;
struct AllowBattleItems
{
bool onTransformOther;
bool onTransformSelf;
bool onDrainLevel;
bool onDoppelganger;
} allowBattleItems;
struct MovementCost
{
struct Water
{
int dflt;
int deadLeader;
int withBonus;
int waterOnly;
} water;
struct Forest
{
int dflt;
int deadLeader;
int withBonus;
} forest;
struct Plain
{
int dflt;
int deadLeader;
int onRoad;
} plain;
Color textColor{};
Color outlineColor{};
bool show{};
} movementCost;
struct Lobby
{
struct Server
{
std::string ip{"127.0.0.1"};
std::uint16_t port{61111};
} server;
struct Client
{
std::uint16_t port{1};
} client;
} lobby;
// Do not expose these settings in public 'settings.lua' template so poor souls won't suffer
// from their own ignorance
struct Debug
{
std::uint32_t sendObjectsChangesTreshold{0};
bool logSinglePlayerMessages{false};
} debug;
struct Engine
{
// This is needed to split single CRefreshInfo into several instances when loading large
// scenario, because it needs to fit to the network message buffer of 512 KB.
std::uint32_t sendRefreshInfoObjectCountLimit{0};
} engine;
struct Battle
{
bool allowRetreatedUnitsToUpgrade{false};
bool carryXpOverUpgrade{false};
bool allowMultiUpgrade{false};
} battle;
bool debugMode;
};
const Settings& baseSettings();
const Settings& defaultSettings();
const Settings& userSettings();
} // namespace hooks
#endif // SETTINGS_H
| 4,800
|
C++
|
.h
| 165
| 22.89697
| 96
| 0.683959
|
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,532
|
cmdbattleendmsg.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/cmdbattleendmsg.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 CMDBATTLEENDMSG_H
#define CMDBATTLEENDMSG_H
#include "battlemsgdata.h"
#include "commandmsg.h"
namespace game {
struct CCmdBattleEndMsg : public CCommandMsgTempl<CommandMsgId::BattleEnd, CommandMsgParam::Value2>
{
BattleMsgData battleMsgData;
int unknown2;
char padding[4];
};
assert_size(CCmdBattleEndMsg, 3944);
assert_offset(CCmdBattleEndMsg, battleMsgData, 16);
namespace CCmdBattleEndMsgApi {
struct Api
{
using Destructor = void(__thiscall*)(CCmdBattleEndMsg* thisptr);
Destructor destructor;
};
Api& get();
CCommandMsgVftable* vftable();
} // namespace CCmdBattleEndMsgApi
} // namespace game
#endif // CMDBATTLEENDMSG_H
| 1,481
|
C++
|
.h
| 42
| 33.095238
| 99
| 0.777155
|
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,533
|
chatinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/chatinterf.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 CHATINTERF_H
#define CHATINTERF_H
#include "imagepointlist.h"
#include "lovechat.h"
#include "midpopupinterf.h"
#include "notifyplayerlist.h"
#include "playerlistentry.h"
#include "textmessage.h"
namespace game {
struct CChatInterfData
{
Vector<TextMessage> chatMessages;
Vector<PlayerListEntry> playerListEntries;
int unknown9;
};
assert_size(CChatInterfData, 36);
/** Represents DLG_CHAT from Interf.dlg. */
struct CChatInterf
: public ILoveChat
, public INotifyPlayerList
, public CMidPopupInterf
{
CChatInterfData* chatData;
};
assert_size(CChatInterf, 44);
namespace CChatInterfApi {
struct Api
{
using ListBoxDisplayHandler = void(__thiscall*)(CChatInterf* thisptr,
ImagePointList* contents,
const CMqRect* lineArea,
int index,
bool selected);
ListBoxDisplayHandler listBoxDisplayHandler;
};
Api& get();
} // namespace CChatInterfApi
} // namespace game
#endif // CHATINTERF_H
| 1,960
|
C++
|
.h
| 57
| 28.578947
| 77
| 0.690476
|
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,534
|
condinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/condinterf.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 CONDINTERF_H
#define CONDINTERF_H
#include "popupinterf.h"
#include "smartptr.h"
namespace game {
struct CMidEvCondition;
struct CMidgardID;
struct LEventCondCategory;
struct IMidgardObjectMap;
struct String;
namespace editor {
struct CCondInterfHandler;
struct CCondInterfData
{
CCondInterfHandler* interfHandler;
};
/** Base class for all event conditions popup windows. */
struct CCondInterf : public CPopupInterf
{
CCondInterfData* condData;
};
assert_size(CCondInterf, 28);
struct CCondInterfVftable : public CInterfaceVftable
{
using SetEventCondition = bool(__thiscall*)(CCondInterf* thisptr,
CMidEvCondition* eventCondition);
SetEventCondition setEventCondition;
};
assert_vftable_size(CCondInterfVftable, 35);
namespace CCondInterfApi {
struct Api
{
using Constructor = CCondInterf*(__thiscall*)(CCondInterf* thisptr,
const char* dialogName,
ITask* task);
Constructor constructor;
/** Creates condtion interface from specified category. */
using CreateFromCategory = CCondInterf*(__stdcall*)(ITask* task,
void* a2,
const CMidgardID* eventId,
const LEventCondCategory* category);
CreateFromCategory createFromCategory;
struct ButtonCallback
{
using Callback = void(__thiscall*)(CCondInterf* thisptr);
Callback callback;
int unknown;
};
// This is a hack. There is no functor that operates on CCondInterf itself, only derived types.
// Instead of implementing custom functor for our needs we use button functor
// from CCondFrequencyInterf. Its safe because all functors for derived types
// share the same implementation and callbacks signatures.
// We could reuse functor of any other derived type.
using CreateButtonFunctor = SmartPointer*(__stdcall*)(SmartPointer* functor,
int a2,
CCondInterf* condInterf,
ButtonCallback* callback);
CreateButtonFunctor createButtonFunctor;
struct RadioButtonCallback
{
using Callback = void(__thiscall*)(CCondInterf* thisptr, int selectedButton);
Callback callback;
int unknown;
};
// Same hack as with button. Here we reusing logic from CCondStackExistsInterf.
using CreateRadioButtonFunctor = SmartPointer*(__stdcall*)(SmartPointer* functor,
int a2,
CCondInterf* condInterf,
RadioButtonCallback* callback);
CreateRadioButtonFunctor createRadioButtonFunctor;
struct ListBoxDisplayCallback
{
using Callback = void(__thiscall*)(CCondInterf* thisptr,
String* string,
bool,
int selectedIndex);
Callback callback;
int unknown;
};
// Reuse logic from CCondVarInRangeInterf
using CreateListBoxDisplayFunctor = SmartPointer*(__stdcall*)(SmartPointer* functor,
int a2,
CCondInterf* condInterf,
ListBoxDisplayCallback* callback);
CreateListBoxDisplayFunctor createListBoxDisplayFunctor;
using GetObjectMap = IMidgardObjectMap*(__thiscall*)(void* thisptr);
GetObjectMap getObjectMap;
};
Api& get();
} // namespace CCondInterfApi
} // namespace editor
} // namespace game
#endif // CONDINTERF_H
| 4,888
|
C++
|
.h
| 111
| 31.72973
| 100
| 0.607075
|
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,535
|
mqnetplayerenum.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqnetplayerenum.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 MQNETPLAYERENUM_H
#define MQNETPLAYERENUM_H
#include "d2assert.h"
namespace game {
struct String;
struct IMqNetPlayerEnumVftable;
/**
* Interface for thin wrappers that stores player info in session.
* Used to show in UI.
*/
struct IMqNetPlayerEnum
{
IMqNetPlayerEnumVftable* vftable;
};
struct IMqNetPlayerEnumVftable
{
using Destructor = void(__thiscall*)(IMqNetPlayerEnum* thisptr, char flags);
Destructor destructor;
/** Returns player name. */
using GetName = String*(__thiscall*)(const IMqNetPlayerEnum* thisptr, String* name);
GetName getName;
/** Returns player network id. */
using GetId = int(__thiscall*)(const IMqNetPlayerEnum* thisptr);
GetId getId;
};
assert_vftable_size(IMqNetPlayerEnumVftable, 3);
} // namespace game
#endif // MQNETPLAYERENUM_H
| 1,633
|
C++
|
.h
| 46
| 33.043478
| 88
| 0.758883
|
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,536
|
soundsystemstream.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/soundsystemstream.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 SOUNDSYSTEMSTREAM_H
#define SOUNDSYSTEMSTREAM_H
#include "d2list.h"
#include "uievent.h"
namespace game {
struct CSoundSystemImpl;
struct CSoundSystemStreamData
{
SmartPtr<CSoundSystemImpl> soundSystemImpl;
unsigned int mqCbStreamMsgId;
UiEvent streamEvent;
SmartPointer ptr2;
SmartPointer ptr3;
bool musicOn;
char padding[3];
int unknown3;
int fxVolume;
List<void*> list;
};
assert_size(CSoundSystemStreamData, 80);
struct CSoundSystemStream
{
CSoundSystemStreamData* data;
};
assert_size(CSoundSystemStream, 4);
} // namespace game
#endif // SOUNDSYSTEMSTREAM_H
| 1,438
|
C++
|
.h
| 45
| 29.377778
| 72
| 0.770065
|
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,537
|
usunit.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/usunit.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 USUNIT_H
#define USUNIT_H
#include "midobject.h"
#include "usunitextension.h"
namespace game {
struct IUsUnitVftable;
struct LUnitCategory;
struct IUsUnit : public IMidObjectT<IUsUnitVftable>
{ };
struct IUsUnitVftable : public IMidObjectVftable
{
/** Most of the time it works like dynamic_cast calculating offset of extension interface.
* However, if this is a unit modifier (CUmUnit, CUmAttack or CUmStack), an aggregate object can
* be returned instead (the method functions like queryInterface), so dynamic_cast is no fit.
*/
using Cast = IUsUnitExtension*(__thiscall*)(const IUsUnit* thisptr, const char* rawTypeName);
Cast cast;
using GetCategory = const LUnitCategory*(__thiscall*)(const IUsUnit* thisptr);
GetCategory getCategory;
};
} // namespace game
#endif // USUNIT_H
| 1,646
|
C++
|
.h
| 40
| 38.625
| 100
| 0.761428
|
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,538
|
middatacache.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/middatacache.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 MIDDATACACHE_H
#define MIDDATACACHE_H
#include "idlist.h"
#include "midgardobjectmap.h"
namespace game {
struct CMidgardScenarioMap;
struct IMidScenarioObject;
struct CMidDataCache2 : public IMidgardObjectMap
{
struct INotifyVftable;
struct INotify
{
INotifyVftable* vftable;
};
struct INotifyVftable
{
using OnObjectChanged = void(__thiscall*)(INotify* thisptr, IMidScenarioObject* obj);
OnObjectChanged onObjectChanged;
};
assert_vftable_size(INotifyVftable, 1);
CMidgardScenarioMap** scenarioMap;
IdList list;
char unknown;
char padding[3];
int* unknown2;
int unknown3;
};
assert_size(CMidDataCache2, 36);
} // namespace game
#endif // MIDDATACACHE_H
| 1,566
|
C++
|
.h
| 48
| 29.354167
| 93
| 0.750332
|
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,539
|
scenarioobjectstreams.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/scenarioobjectstreams.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 SCENARIOOBJECTSTREAMS_H
#define SCENARIOOBJECTSTREAMS_H
#include "d2assert.h"
#include "d2vector.h"
namespace game {
struct CStreamRegisterBase;
/** Holds stream registers with their raw names for scenario objects streaming. */
struct ScenarioObjectStreams
{
Vector<CStreamRegisterBase*> knownStreams;
/** Maps raw names of CStreamRegisterBase child classes to indices in knownStreams. */
void* rawNameIndicesMapping;
};
assert_size(ScenarioObjectStreams, 20);
namespace ScenarioObjectStreamsApi {
struct Api
{
/** Adds specified streamRegister to ScenarioObjectStreams. */
using AddStreamRegister = bool(__stdcall*)(CStreamRegisterBase* streamRegister,
const char* rawName);
AddStreamRegister addStreamRegister;
};
Api& get();
} // namespace ScenarioObjectStreamsApi
} // namespace game
#endif // SCENARIOOBJECTSTREAMS_H
| 1,725
|
C++
|
.h
| 44
| 35.931818
| 90
| 0.761534
|
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,540
|
landmarkcat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/landmarkcat.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 LANDMARKCAT_H
#define LANDMARKCAT_H
#include "categories.h"
namespace game {
struct LLandmarkCategoryTable : public CEnumConstantTable<LandmarkId>
{ };
struct LLandmarkCategory : public Category<LandmarkId>
{ };
} // namespace game
#endif // LANDMARKCAT_H
| 1,083
|
C++
|
.h
| 28
| 36.821429
| 72
| 0.772901
|
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,541
|
tileindices.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/tileindices.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 TILEINDICES_H
#define TILEINDICES_H
#include "d2assert.h"
#include "tileprefixes.h"
#include <cstdint>
namespace game {
struct LTerrainCategory;
struct LGroundCategory;
/**
* Indices of CIsoEngineGroundData::terrainTiles elements and their relations with tile images.
* Order of these indices determines drawing order for border tiles.
* Water tiles are drawn first staying at the bottom while ground tiles are drawn above.
* Snowy terrain of mountain clans always drawn last and stays on top of others.
*/
enum class TileArrayIndex : std::uint32_t
{
Black, /**< Black tiles drawn outside of map bounds. */
Water,
Neutral,
Heretic,
Undead,
Human,
Elf,
Dwarf,
};
/** Stores indices of CIsoEngineGroundData::terrainTiles for fast access. */
struct TileIndices
{
TileArrayIndex water;
TileArrayIndex neutral;
TileArrayIndex human;
TileArrayIndex heretic;
TileArrayIndex dwarf;
TileArrayIndex undead;
TileArrayIndex black;
TileArrayIndex elf;
};
assert_size(TileIndices, 32);
namespace TileIndicesApi {
struct Api
{
using Constructor = TileIndices*(__thiscall*)(TileIndices* thisptr);
Constructor constructor;
using CreateBorderTiles = void(__stdcall*)(TileArrayIndex tileIndex, TilePrefix tilePrefix);
CreateBorderTiles createBorderTiles;
using CreateTerrainTiles = void(__stdcall*)(TileArrayIndex tileIndex, TilePrefix tilePrefix);
CreateTerrainTiles createTerrainTiles;
using GetTileDataIndex = int(__thiscall*)(const TileIndices* thisptr,
const LGroundCategory* ground,
const LTerrainCategory* terrain);
GetTileDataIndex getTileDataIndex;
};
Api& get();
} // namespace TileIndicesApi
} // namespace game
#endif // TILEINDICES_H
| 2,657
|
C++
|
.h
| 74
| 31.851351
| 97
| 0.74328
|
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,542
|
factoryimage2.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/factoryimage2.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 FACTORYIMAGE2_H
#define FACTORYIMAGE2_H
#include "mqimage2.h"
#include "smartptr.h"
namespace game {
struct CMqPresentationManager;
struct TextureHandle;
struct ImgStore2LoaderWrapper;
struct FactoryImage2Data
{
int imageId;
bool flipped;
char padding[3];
TextureHandle* textureHandlePtr;
ImgStore2LoaderWrapper* imgStoreLoaderWrapper;
};
assert_size(FactoryImage2Data, 16);
struct FactoryImage2 : IMqImage2
{
SmartPtr<CMqPresentationManager> presentationMgr;
FactoryImage2Data data;
int unknown5;
};
assert_size(FactoryImage2, 32);
} // namespace game
#endif // FACTORYIMAGE2_H
| 1,441
|
C++
|
.h
| 44
| 30.409091
| 72
| 0.780822
|
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,543
|
enclayoutspell.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/enclayoutspell.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 ENCLAYOUTSPELL_H
#define ENCLAYOUTSPELL_H
namespace game {
struct CEncLayoutSpell;
struct IMidgardObjectMap;
struct CInterface;
struct CMidgardID;
struct CEncParamBase;
namespace CEncLayoutSpellApi {
struct Api
{
using Constructor = CEncLayoutSpell*(__thiscall*)(CEncLayoutSpell* thisptr,
IMidgardObjectMap* objectMap,
CInterface* interf,
void* a2,
CMidgardID* spellId,
CEncParamBase* encParam,
const CMidgardID* playerId);
Constructor constructor;
};
Api& get();
} // namespace CEncLayoutSpellApi
} // namespace game
#endif // ENCLAYOUTSPELL_H
| 1,706
|
C++
|
.h
| 42
| 31.095238
| 83
| 0.633233
|
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,544
|
batattack.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattack.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 BATATTACK_H
#define BATATTACK_H
#include "d2assert.h"
#include "targetset.h"
namespace game {
struct IMidgardObjectMap;
struct BattleMsgData;
struct CMidgardID;
struct LAttackClass;
struct IBatAttackVftable;
struct BattleAttackInfo;
/** Base class for attacks in battle. */
struct IBatAttack
{
const IBatAttackVftable* vftable;
};
struct CBatAttackBase : public IBatAttack
{ };
struct IBatAttackVftable
{
using Destructor = void(__thiscall*)(IBatAttack* thisptr, bool freeMemory);
Destructor destructor;
/** Returns true if unit with specified id can be attacked with this attack. */
using CanPerform = bool(__thiscall*)(IBatAttack* thisptr,
const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidgardID* targetUnitId);
CanPerform canPerform;
/** Returns id of group the attack can target: allies or enemies. */
using GetTargetGroupId = CMidgardID*(__thiscall*)(const IBatAttack* thisptr,
const CMidgardID* targetGroupId,
const BattleMsgData* battleMsgData);
GetTargetGroupId getTargetGroupId;
/** Fills attack targets list with positions of units in groups. */
using FillTargetsList = void(__thiscall*)(IBatAttack* thisptr,
const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
TargetSet* value);
FillTargetsList fillTargetsList;
FillTargetsList fillAltTargetsList;
using Method5 = bool(__thiscall*)(IBatAttack* thisptr,
IMidgardObjectMap* objectMap,
BattleMsgData* battleMsgData,
CMidgardID* unitId);
Method5 method5;
using CanMiss = bool(__thiscall*)(IBatAttack* thisptr,
BattleMsgData* battleMsgData,
CMidgardID* id);
CanMiss canMiss;
using Method7 = bool(__thiscall*)(IBatAttack* thisptr, int a2, int a3, int a4);
Method7 method7;
using IsImmune = bool(__thiscall*)(IBatAttack* thisptr,
IMidgardObjectMap* objectMap,
BattleMsgData* battleMsgData,
CMidgardID* unitId);
IsImmune isImmune;
/** Attack action logic. */
using OnAttack = void(__thiscall*)(IBatAttack* thisptr,
IMidgardObjectMap* objectMap,
BattleMsgData* battleMsgData,
CMidgardID* targetUnitId,
BattleAttackInfo** attackInfo);
/** Called when attack misses the target. */
OnAttack onMiss;
using GetAttackClass = bool(__thiscall*)(const IBatAttack* thisptr,
const CMidgardID* targetUnitId,
const BattleMsgData* battleMsgData,
LAttackClass* attackClass);
GetAttackClass getAttackClass;
GetAttackClass getUnderlyingAttackClass;
/** Called when attack hits the target. */
OnAttack onHit;
/**
* Called to determine if the attack can target dead units. Every known attack returns false,
* except CBatAttackUsePotion that returns true if the potion is Revive potion.
*/
using Method13 = bool(__thiscall*)(IBatAttack* thisptr,
BattleMsgData* battleMsgData,
IMidgardObjectMap* objectMap);
Method13 method13;
using UnknownMethod = bool(__thiscall*)(const IBatAttack* thisptr,
const BattleMsgData* battleMsgData);
/**
* Called to determine if the attack can target dead units. Every known attack returns false,
* except CBatAttackRevive.
*/
UnknownMethod method14;
/**
* Called to determine if the attack can target dead units. Every known attack returns false,
* except CBatAttackHeal that always returns true. It has additional checks for dead targets,
* which succeed if the secondary attack is Revive.
*/
UnknownMethod method15;
/**
* Called to determine if the attack can target dead units. Every known attack returns false,
* except CBatAttackDoppelganger that returns true if the unit is not transformed yet. It has
* additional check for dead targets (which seems to always fail though).
*/
UnknownMethod method16;
/**
* Called to determine if the attack can target dead and retreated units. Every known attack
* returns false, except CBatAttackSummon (because it can summon in slots with dead or
* retreated units).
*/
UnknownMethod method17;
};
assert_vftable_size(IBatAttackVftable, 18);
} // namespace game
#endif // BATATTACK_H
| 6,034
|
C++
|
.h
| 127
| 35.574803
| 97
| 0.620707
|
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,545
|
globalvariables.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/globalvariables.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 GLOBALVARIABLES_H
#define GLOBALVARIABLES_H
#include "currency.h"
#include "d2string.h"
#include <cstddef>
namespace game {
/** Holds global game settings read from GVars.dbf. */
struct GlobalVariables
{
/** 'MORALE_n' */
int morale[6];
/** Instructor skill bonus experience. 'WEAPN_MSTR' */
int weaponMaster;
/** Max additional initiative points that randomly added to unit ini in battle. 'BAT_INIT' */
int additionalBattleIni;
/** Max additional damage points that randomly added to unit damage in battle. 'BAT_DAMAGE' */
int additionalBattleDmg;
/** 'BAT_ROUND' */
int batRound;
/** Damage boost values. 'BATBOOSTDn' */
int battleBoostDamage[4];
/** Damage debuff values. 'BATLOWERDn' */
int battleLowerDamage[2];
/** Initiative debuff. 'BATLOWERI' */
int battleLowerIni;
/** 'BAT_BREAK' */
int batBreak;
/** 'BAT_BMODIF' */
int batBmodif;
/** Max abilities leader can learn. 'LDRMAXABIL' */
int maxLeaderAbilities;
/** Spy discovery change per turn. 'SPY_DISCOV' */
int spyDiscoveryChance;
/** 'POISON_S' */
int poisonStackDamage;
/** 'POISON_C' */
int poisonCityDamage;
/** 'BRIBE' */
int bribeMultiplier;
/** 'STEAL_RACE' */
int stealRace;
/** 'STEAL_NEUT' */
int stealNeut;
/** Minimal riot duration in days. 'RIOT_MIN' */
int riotDaysMin;
/** Maximal riot duration in days. 'RIOT_MAX' */
int riotDaysMax;
/** Percentage of riot damage. 'RIOT_DMG' */
int riotDamage;
/** Percentage of the original price of the items at sale. 'SELL_RATIO' */
int sellRatio;
/** Land transformation per turn by capital. 'T_CAPITAL' */
int landTransformCapital;
/** Land transformation per turn by cities of different tiers. 'T_CITYn' */
int landTransformCity[5];
/** Land transformation after city capture. 'T_CAPTURE' */
int landTransformCapture;
/** 'ROD_COST' */
Bank rodPlacementCost;
/** Range of land transformation by rod per turn. 'ROD_RANGE' */
int rodRange;
/** Profit per mana crystal or gold mine per turn. 'CRYSTAL_P' */
int crystalProfit;
/** 'CONST_UPG' */
int constUpg;
/** Change to get spells with capture of a capital. 'GAIN_SPELL' */
int gainSpellChance;
/** Bonus per day regeneration for units in ruins. 'REGEN_RUIN' */
int regenRuin;
/** Bonus per day regeneration for fighter leader. 'REGEN_LWAR' */
int fighterLeaderRegen;
/** Diplomacy level representing peace. 'D_PEACE' */
std::uint32_t diplomacyPeace;
/** Diplomacy level representing war. 'D_WAR' */
std::uint32_t diplomacyWar;
/** Diplomacy level representing neutrality. 'D_NEUTRAL' */
std::uint32_t diplomacyNeutral;
/** 'D_GOLD' */
int dGold;
/** 'D_MK_ALLY' */
int dMkAlly;
/** 'D_ATTACK_SC' */
int dAttackSc;
/** 'D_ATTACK_FO' */
int dAttackFo;
/** 'D_ATTACK_PC' */
int dAttackPc;
/** 'D_ROD' */
int dRod;
/** 'D_BK_ALLY' */
int dBkAlly;
/** 'D_REF_ALLY' */
int dRefAlly;
/** 'D_NOBLE' */
int dNoble;
/** 'D_BKA_CHANCE' */
int dBkaChance;
/** 'D_BKA_TURN' */
int dBkaTurn;
/** City protection values. 'PROT_n' */
int cityProtection[5];
/** Capital protection. 'PROT_CAP' */
int capitalProtection;
/** Additional gold on easy difficulty. 'BONUS_E' */
int bonusGoldEasy;
/** Additional gold on average difficulty. 'BONUS_A' */
int bonusGoldAverage;
/** Additional gold on hard difficulty. 'BONUS_H' */
int bonusGoldHard;
/** Additional gold on very hard difficulty. 'BONUS_V' */
int bonusGoldVeryHard;
/** 'PA_RANGE' */
int paRange;
/** 'LO_RANGE' */
int loRange;
/** 'GU_RANGE' */
int guRange;
/** Armor bonus when unit uses defend in battle. 'DFENDBONUS' */
int defendBonus;
/** 'TALIS_CHRG' */
int talismanCharges;
/** Income increase on easy difficulty. 'INCOME_E' */
int incomeEasy;
/** Income increase on average difficulty. 'INCOME_A' */
int incomeAverage;
/** Income increase on hard difficulty. 'INCOME_H' */
int incomeHard;
/** Income increase on very hard difficulty. 'INCOME_V' */
int incomeVeryHard;
/** 'SPLPWR_n' */
int spellPower[5];
/** Tutorial scenario file name. 'TUTORIAL' */
String tutorialName;
};
assert_size(GlobalVariables, 352);
assert_offset(GlobalVariables, rodPlacementCost, 148);
assert_offset(GlobalVariables, talismanCharges, 296);
} // namespace game
#endif // GLOBALVARIABLES_H
| 5,409
|
C++
|
.h
| 157
| 30.140127
| 98
| 0.663489
|
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,546
|
midunitdescriptorhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midunitdescriptorhooks.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 MIDUNITDESCRIPTORHOOKS_H
#define MIDUNITDESCRIPTORHOOKS_H
namespace game {
struct CMidUnitDescriptor;
struct IAttack;
} // namespace game
namespace hooks {
game::IAttack* __fastcall midUnitDescriptorGetAttackHooked(const game::CMidUnitDescriptor* thisptr,
int /*%edx*/);
int __fastcall midUnitDescriptorGetAttackInitiativeHooked(const game::CMidUnitDescriptor* thisptr,
int /*%edx*/);
bool __fastcall midUnitDescriptorIsUnitLeaderHooked(const game::CMidUnitDescriptor* thisptr,
int /*%edx*/);
} // namespace hooks
#endif // MIDUNITDESCRIPTORHOOKS_H
| 1,547
|
C++
|
.h
| 33
| 40
| 99
| 0.699203
|
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,547
|
itemorb.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemorb.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 ITEMORB_H
#define ITEMORB_H
#include "itembattle.h"
namespace game {
struct CItemOrb : public CItemBattle
{ };
assert_size(CItemOrb, 24);
} // namespace game
#endif // ITEMORB_H
| 1,005
|
C++
|
.h
| 27
| 35.333333
| 72
| 0.762101
|
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,548
|
aistackgeneric.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aistackgeneric.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 AISTACKGENERIC_H
#define AISTACKGENERIC_H
#include "aistack.h"
#include "d2assert.h"
namespace game {
struct IMidgardObjectMap;
struct IAiActionFilter;
struct CAiStackGeneric : IAiStack
{
IMidgardObjectMap* objectMap;
CMidgardID stackId;
CMidStack* stack;
bool waterOnly;
bool inCityUnderRiot;
char padding[2];
CAiAttitudes* attitudes;
bool unknown24;
char padding2[3];
IAiActionFilter* actionFilter;
};
assert_size(CAiStackGeneric, 32);
assert_offset(CAiStackGeneric, unknown24, 24);
} // namespace game
#endif // AISTACKGENERIC_H
| 1,401
|
C++
|
.h
| 42
| 30.809524
| 72
| 0.76758
|
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,549
|
sitemerchantinterfhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/sitemerchantinterfhooks.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 SITEMERCHANTINTERFHOOKS_H
#define SITEMERCHANTINTERFHOOKS_H
namespace game {
struct CSiteMerchantInterf;
struct IMidScenarioObject;
} // namespace game
namespace hooks {
void __fastcall siteMerchantInterfOnObjectChangedHooked(game::CSiteMerchantInterf* thisptr,
int /*%edx*/,
game::IMidScenarioObject* obj);
} // namespace hooks
#endif // SITEMERCHANTINTERFHOOKS_H
| 1,304
|
C++
|
.h
| 30
| 37.966667
| 91
| 0.716877
|
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,550
|
roompasswordinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/roompasswordinterf.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 ROOMPASSWORDINTERF_H
#define ROOMPASSWORDINTERF_H
namespace hooks {
struct CMenuCustomLobby;
using RoomPasswordHandler = void (*)(CMenuCustomLobby* menu);
void showRoomPasswordDialog(CMenuCustomLobby* menuLobby,
RoomPasswordHandler onSuccess,
RoomPasswordHandler onCancel);
} // namespace hooks
#endif // ROOMPASSWORDINTERF_H
| 1,209
|
C++
|
.h
| 28
| 39.321429
| 72
| 0.751278
|
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,551
|
batattackgroupupgrade.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattackgroupupgrade.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 BATATTACKGROUPUPGRADE_H
#define BATATTACKGROUPUPGRADE_H
namespace game {
struct CMidgardID;
struct IMidgardObjectMap;
struct BattleMsgData;
struct BattleAttackInfo;
namespace CBatAttackGroupUpgradeApi {
struct Api
{
using UpgradeGroup = void(__stdcall*)(game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
const game::CMidgardID* groupId,
game::BattleAttackInfo** attackInfo,
bool playableRaceAi);
UpgradeGroup upgradeGroup;
};
Api& get();
} // namespace CBatAttackGroupUpgradeApi
} // namespace game
#endif // BATATTACKGROUPUPGRADE_H
| 1,561
|
C++
|
.h
| 39
| 33.846154
| 78
| 0.702578
|
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,552
|
ffimg.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/ffimg.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 FFIMG_H
#define FFIMG_H
#include "imgstore2.h"
#include "smartptr.h"
namespace game {
struct MQDBDataWrapper;
struct FFImg : public CImgStore2::Image
{
MQDBDataWrapper* mqdb;
std::uint32_t mqdbRecordId;
SmartPointer ptr;
};
assert_size(FFImg, 20);
} // namespace game
#endif // FFIMG_H
| 1,126
|
C++
|
.h
| 33
| 32
| 72
| 0.759447
|
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,553
|
d2list.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/d2list.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 D2LIST_H
#define D2LIST_H
#include "d2assert.h"
#include <cstdint>
namespace game {
/** Implementation of std::list<T>::node used in game. */
template <typename T>
struct ListNode
{
ListNode<T>* next;
ListNode<T>* prev;
T data;
};
assert_size(ListNode<int>, 12);
/** Implementation of std::list<T>::const_iterator used in game.
* Inline methods exactly correspond to in-game implementation.
* T* ptr appear to always be nullptr, but no guarantees.
* Bet that this implementation might be shared with vector::iterator. */
template <typename T>
struct ConstListIterator
{
char unknown;
char padding[3];
ListNode<T>* node;
T* ptr;
bool operator==(const ConstListIterator<T>& value) const
{
return ptr ? ptr == value.ptr : node == value.node;
}
bool operator!=(const ConstListIterator<T>& value) const
{
return !(*this == value);
}
const T& operator*() const
{
return ptr ? *ptr : node->data;
}
const T* operator->() const
{
return ptr ? ptr : &node->data;
}
ConstListIterator<T>& operator++()
{
if (ptr)
ptr++;
else
node = node->next;
return *this;
}
ConstListIterator<T> operator++(int)
{
auto result = *this;
++*this;
return result;
}
};
assert_size(ConstListIterator<int>, 12);
/** Implementation of std::list<T>::iterator used in game.
* Inline methods exactly correspond to in-game implementation. */
template <typename T>
struct ListIterator : public ConstListIterator<T>
{
using Base = ConstListIterator<T>;
T& operator*() const
{
return ptr ? *ptr : node->data;
}
T* operator->() const
{
return ptr ? ptr : &node->data;
}
ListIterator<T>& operator++()
{
Base::operator++();
return *this;
}
ListIterator<T> operator++(int)
{
auto result = *this;
Base::operator++();
return result;
}
};
assert_size(ListIterator<int>, 12);
/** Implementation of std::list<T> used in game.
* Inline methods exactly correspond to in-game implementation. */
template <typename T>
struct List
{
std::uint32_t length;
ListNode<T>* head;
int unknown;
void* allocator;
ListIterator<T> begin()
{
return {0, {}, head->next, nullptr};
}
ConstListIterator<T> begin() const
{
return {0, {}, head->next, nullptr};
}
ListIterator<T> end()
{
return {0, {}, head, nullptr};
}
ConstListIterator<T> end() const
{
return {0, {}, head, nullptr};
}
};
assert_size(List<int>, 16);
} // namespace game
#endif // D2LIST_H
| 3,545
|
C++
|
.h
| 131
| 22.564885
| 73
| 0.648848
|
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,554
|
effectresulthooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/effectresulthooks.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 EFFECTRESULTHOOKS_H
#define EFFECTRESULTHOOKS_H
namespace game {
struct IEffectResult;
struct CMidEvEffect;
} // namespace game
namespace hooks {
game::IEffectResult* __stdcall createEffectResultHooked(const game::CMidEvEffect* eventEffect);
}
#endif // EFFECTRESULTHOOKS_H
| 1,100
|
C++
|
.h
| 28
| 37.464286
| 95
| 0.780488
|
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,555
|
musicfader.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/musicfader.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 MUSICFADER_H
#define MUSICFADER_H
#include "smartptr.h"
#include "uievent.h"
#include <cstddef>
namespace game {
struct CMusicFaderData
{
SmartPointer unknownPtr;
UiEvent uiEvent;
char unknown[12];
SmartPointer functor;
char unknown2[24];
};
assert_size(CMusicFaderData, 76);
assert_offset(CMusicFaderData, uiEvent, 8);
assert_offset(CMusicFaderData, functor, 44);
struct CMusicFader
{
const void* vftable;
CMusicFaderData* data;
};
assert_size(CMusicFader, 8);
namespace CMusicFaderApi {
struct Api
{
/** Gets singleton object. */
using Get = CMusicFader*(__stdcall*)();
Get get;
/** Checks that uiEvent::eventId is not null. */
using HasEventId = bool(__thiscall*)(CMusicFader* thisptr);
HasEventId hasEventId;
using Callback = bool(__thiscall*)(CMusicFader* thisptr);
Callback callback;
};
Api& get();
} // namespace CMusicFaderApi
} // namespace game
#endif // MUSICFADER_H
| 1,774
|
C++
|
.h
| 57
| 28.508772
| 72
| 0.746181
|
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,556
|
netmsgcallbacks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netmsgcallbacks.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 NETMSGCALLBACKS_H
#define NETMSGCALLBACKS_H
#include "d2list.h"
#include "d2set.h"
#include "smartptr.h"
namespace game {
struct CNetMsgMapEntry;
struct NetMsgCallbacks;
struct CMenuPhase;
struct NetMsgEntryNode
{
char name[37]; /**< Raw name of CNetMsg derived class. */
char padding[3];
SmartPtr<CNetMsgMapEntry> ptr;
};
using NetMsgEntrySet = Set<NetMsgEntryNode>;
struct NetMsgEntryData
{
NetMsgCallbacks** callbacks;
NetMsgEntrySet entries;
};
using NetMsgEntryDataList = List<NetMsgEntryData**>;
struct NetMsgCallbacks
{
NetMsgEntryDataList list;
bool unknown;
char padding[3];
void* node;
void* node2;
};
assert_size(NetMsgCallbacks, 28);
namespace NetMsgApi {
struct Api
{
using AllocateEntryData = bool(__thiscall*)(CMenuPhase* thisptr, NetMsgEntryData*** data);
AllocateEntryData allocateEntryData;
using FreeEntryData = void(__stdcall*)(NetMsgEntryData** data);
FreeEntryData freeEntryData;
using AddEntry = void(__thiscall*)(NetMsgEntryData** thisptr, CNetMsgMapEntry* entry);
AddEntry addEntry;
};
Api& get();
} // namespace NetMsgApi
} // namespace game
#endif // NETMSGCALLBACKS_H
| 1,998
|
C++
|
.h
| 63
| 29.142857
| 94
| 0.76265
|
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,557
|
netmsgutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netmsgutils.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 NETMSGUTILS_H
#define NETMSGUTILS_H
#include "netmsg.h"
namespace game {
struct BattleMsgData;
} // namespace game
namespace hooks {
void serializeMsgWithBattleMsgData(game::CNetMsg* msg,
game::BattleMsgData* battleMsgData,
game::CNetMsgVftable::Serialize method,
game::CMqStream* stream);
} // namespace hooks
#endif // NETMSGUTILS_H
| 1,268
|
C++
|
.h
| 31
| 35.741935
| 74
| 0.710569
|
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,558
|
modifgrouphooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/modifgrouphooks.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 MODIFGROUPHOOKS_H
#define MODIFGROUPHOOKS_H
namespace game {
struct LModifGroupTable;
} // namespace game
namespace hooks {
game::LModifGroupTable* __fastcall modifGroupTableCtorHooked(game::LModifGroupTable* thisptr,
int /*%edx*/,
const char* globalsFolderPath,
void* codeBaseEnvProxy);
} // namespace hooks
#endif // MODIFGROUPHOOKS_H
| 1,347
|
C++
|
.h
| 30
| 37.033333
| 93
| 0.669718
|
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,559
|
ddunitgroup.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/ddunitgroup.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 DDUNITGROUP_H
#define DDUNITGROUP_H
#include "idvector.h"
#include "middropmanager.h"
#include "middropsource.h"
#include "middroptarget.h"
#include "midunitext.h"
namespace game {
struct CMidUnitGroupAdapter;
struct CGroupAreaManagement;
struct IMidgardObjectMap;
struct CDDUnitGroupData
{
int unknown;
int unknown2;
int unknown3;
CMidgardID groupId;
CMidUnitGroupAdapter* unitGroupAdapter;
CMidgardID id2;
IMidgardObjectMap* objectMap;
IMidDropManager* dropManager;
int unknown7;
int unknown8;
int unknown9;
int unknown10;
IdVector idArray;
SmartPtr<CursorHandle> defaultCursorHandle;
SmartPtr<CursorHandle> noDragDropCursorHandle;
SmartPointer ptr;
IMqImage2* dragDropValidSmall;
IMqImage2* dragDropValidLarge;
IMqImage2* dragDropInvalidSmall;
IMqImage2* dragDropInvalidLarge;
int array[6];
char unknown16[12];
SmartPtr<IMqImage2> spellBoostIconPtr;
SmartPtr<IMqImage2> spellLowerIconPtr;
SmartPtr<IMqImage2> potionBoostIconPtr;
SmartPtr<IMqImage2> upgrageIconPtr;
SmartPtr<IMqImage2> highLevelIcons[3];
CGroupAreaManagement* areaManagement;
};
assert_size(CDDUnitGroupData, 200);
/** Implements drag and drop logic for unit group. */
struct CDDUnitGroup
: public IMidDropSource
, public IMidDropTarget
, public IMidUnitExt
{
CDDUnitGroupData* unitGroupData;
};
assert_size(CDDUnitGroup, 16);
} // namespace game
#endif // DDUNITGROUP_H
| 2,298
|
C++
|
.h
| 72
| 28.763889
| 72
| 0.773917
|
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,560
|
eventeffectcat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/eventeffectcat.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 EVENTEFFECTCAT_H
#define EVENTEFFECTCAT_H
#include "categories.h"
namespace game {
struct LEventEffectCategoryTable : public CEnumConstantTable<EventEffectId>
{ };
struct LEventEffectCategory : public Category<EventEffectId>
{ };
namespace EventEffectCategories {
struct Categories
{
LEventEffectCategory* win;
LEventEffectCategory* createStack;
LEventEffectCategory* castSpell;
LEventEffectCategory* castSpellMap;
LEventEffectCategory* changeOwner;
LEventEffectCategory* changeOrder;
LEventEffectCategory* moveBeside;
LEventEffectCategory* battle;
LEventEffectCategory* enableEvent;
LEventEffectCategory* giveSpell;
LEventEffectCategory* giveItem;
LEventEffectCategory* moveStack;
LEventEffectCategory* ally;
LEventEffectCategory* diplomacy;
LEventEffectCategory* unfog;
LEventEffectCategory* removeMountain;
LEventEffectCategory* removeLmark;
LEventEffectCategory* changeObjective;
LEventEffectCategory* popup;
LEventEffectCategory* destroyItem;
LEventEffectCategory* removeStack;
LEventEffectCategory* changeLandmark;
LEventEffectCategory* changeTerrain;
LEventEffectCategory* modifyVariable;
};
Categories& get();
/** Returns address of LEventEffectCategory::vftable used in game. */
const void* vftable();
} // namespace EventEffectCategories
namespace LEventEffectCategoryTableApi {
using Api = CategoryTableApi::Api<LEventEffectCategoryTable, LEventEffectCategory>;
Api& get();
/** Returns address of LEventEffectCategoryTable::vftable used in game. */
const void* vftable();
} // namespace LEventEffectCategoryTableApi
} // namespace game
#endif // EVENTEFFECTCAT_H
| 2,507
|
C++
|
.h
| 66
| 35.015152
| 83
| 0.796617
|
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,561
|
mqdbpackedimage.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqdbpackedimage.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 MQDBPACKEDIMAGE_H
#define MQDBPACKEDIMAGE_H
#include "d2string.h"
#include "d2vector.h"
#include "mqpoint.h"
#include <Windows.h>
#include <cstdint>
namespace game {
/**
* Describes part of a packed image.
* Packed images contain shuffled rectangular areas (parts).
* Each part is described by MQDBImagePart structure that can be found inside '-IMAGES.OPT'.
* Areas described as top-left corner and size.
*/
struct MQDBImagePart
{
std::uint32_t sourceX; /**< X coordinate of shuffled image part */
std::uint32_t sourceY; /**< Y coordinate of shuffled image part */
std::uint32_t targetX; /**< X coordinate of part in final image */
std::uint32_t targetY; /**< Y coordinate of part in final image */
std::uint32_t width; /**< Width of image part */
std::uint32_t height; /**< Height of image part */
};
assert_size(MQDBImagePart, 24);
struct MQDBImageFrame
{
String name;
std::uint32_t width;
std::uint32_t height;
Vector<MQDBImagePart> parts;
};
assert_size(MQDBImageFrame, 40);
/**
* Describes packed image or animation.
* Simple packed image will contain a single frame that describes its contents,
* whereas animation would contain multiple frames.
* All animation frames must have the same width and height to be read correctly by the game.
*/
struct MQDBPackedImage
{
::tagPALETTEENTRY palette[256];
CMqPoint size;
std::uint8_t transparentColor;
char padding;
std::uint16_t opacity;
Vector<MQDBImageFrame> frames;
bool flipped;
char padding2[3];
};
assert_size(MQDBPackedImage, 1056);
} // namespace game
#endif // MQDBPACKEDIMAGE_H
| 2,454
|
C++
|
.h
| 70
| 32.485714
| 93
| 0.741256
|
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,562
|
isoengineground.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/isoengineground.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 ISOENGINEGROUND_H
#define ISOENGINEGROUND_H
#include "d2map.h"
#include "d2vector.h"
#include "mqpoint.h"
#include "mqtexture.h"
#include "smartptr.h"
#include "texturehandle.h"
#include "tileindices.h"
#include <cstddef>
#include <cstdint>
namespace game {
struct CIsoEngineGroundVftable;
struct IMqRenderer2;
struct CMqRect;
struct IMqImage2;
struct CIsoStillBackground;
struct CMidIsoGroundIndexer;
struct CMqPresentationManager;
struct IsoGroundTextureData;
struct CBorderTile;
struct CTerrainTile;
using BorderTilePtr = SmartPtr<CBorderTile>;
using TerrainTilePtr = SmartPtr<CTerrainTile>;
/** Tile image size in pixels. */
constexpr int tileWidth{64};
constexpr int tileHeight{32};
constexpr int tileHalfWidth{tileWidth / 2};
constexpr int tileHalfHeight{tileHeight / 2};
/** Number of pixels in tile image. */
constexpr int tilePixelCount{tileWidth * tileHeight};
struct GroundTilesData
{
/** Tracks how many tile images we have for each tile type. */
Map<TilePrefix, std::uint32_t> tileTypes;
/**
* Tracks how many tile border images we have for each tile type.
* Counts border images count for each of 32 (assumed) borders.
*/
Map<TilePrefix, std::uint32_t[32]> tileBorders;
};
assert_size(GroundTilesData, 56);
struct GroundTiles
{
GroundTilesData* data;
};
assert_size(GroundTiles, 4);
/** Describes pair of tile border images for specific tile type. */
struct TileBorders
{
TileArrayIndex tileArrayIndex; /**< Tile type of these borders. */
std::uint32_t mainIndex; /**< Main border image index in GrBorder.ff [1 - 15]. */
int mainVariation; /**< Random value in range [0 : 2]. */
std::uint32_t additionalIndex; /**< Additional border image index in GrBorder.ff [17 - 31]. */
int additionalVariation; /**< Random value in range [0 : 2]. */
};
assert_size(TileBorders, 20);
/** Holds data about all borders of a single tile. */
struct TileBordersInfo
{
TileArrayIndex tileArrayIndex; /**< Tile type. Index for CIsoEngineGroundData::terrainTiles. */
TileBorders borders[10]; /**< Borders of adjacent tiles that have different terrains. */
int bordersTotal; /**< Number of valid borders entries. */
TileBorders waterBorders; /**< Describes water borders. */
bool hasWaterBorders; /**< Indicates that water borders are present. */
bool hidden; /**< Tile is patrially or fully hidden by fog of war. */
char padding[2];
};
assert_size(TileBordersInfo, 232);
struct IsoEngineGroundArrayElement
{
SmartPtr<Vector<TerrainTilePtr>> tileVariants;
bool water; /**< True if tile variants are belongs to water. */
char padding[3];
};
assert_size(IsoEngineGroundArrayElement, 12);
using IsoEngineGroundArray = Vector<IsoEngineGroundArrayElement>;
struct CIsoEngineGroundData
{
CMqPoint isoViewSize; /**< Size of isometric map view in pixels. */
IMqImage2* waterBackground;
CIsoStillBackground* isoStillBackground;
bool animatedIso;
char padding[3];
std::uint32_t mapSize; /**< Scenario map size in tiles. */
/**
* Borders information for each map tile.
* Resized to mapSize * mapSize in CIsoEngineGround c-tor.
*/
Vector<TileBordersInfo> tileBorders;
TileBordersInfo outOfMapBorders; /**< Borders for tiles outside of map bounds. */
bool dirty;
char padding2[3];
IsoEngineGroundArray terrainTiles; /**< Terrain tiles images in multiple variants. */
/**
* Border tile images in multiple variants.
* Each vector contains less than 3 border tiles.
* Array index computed as: borderIndex + 32 * TileArrayIndex.
* Border index is in range [0 : 31].
*/
Vector<BorderTilePtr> borderTiles[320];
CMidIsoGroundIndexer* isoGroundIndexer; /**< Used for tile images variants selection. */
SmartPtr<CMqPresentationManager> presentationMgr;
Vector<IsoGroundTextureData> groundTextures;
/** Number of textures along X axis (width) needed to fully cover ground area on screen. */
std::uint32_t numTexturesAlongX;
/** Number of textures along Y axis (height) needed to fully cover ground area on screen. */
std::uint32_t numTexturesAlongY;
};
assert_size(CIsoEngineGroundData, 5448);
assert_offset(CIsoEngineGroundData, tileBorders, 24);
assert_offset(CIsoEngineGroundData, isoGroundIndexer, 5412);
assert_offset(CIsoEngineGroundData, groundTextures, 5424);
/** Isometric engine responsible for ground rendering. */
struct CIsoEngineGround
{
struct CGroundTexture;
CIsoEngineGroundVftable* vftable;
CIsoEngineGroundData* data;
};
assert_size(CIsoEngineGround, 8);
struct CIsoEngineGround::CGroundTexture : public IMqTexture
{
CIsoEngineGround* isoEngineGround;
CMqPoint textureOffset;
bool dirty; /**< Indicates that texture has changes and should be redrawn. */
char unknown5;
bool hasWaterTiles; /**< Indicates that texture contains water tiles inside it. */
bool hidden; /**< Indicates that texture is fully hidden and should not be drawn. */
};
assert_size(CIsoEngineGround::CGroundTexture, 20);
struct IsoGroundTextureData
{
TextureHandle textureHandle;
CIsoEngineGround::CGroundTexture* texture;
CMqPoint textureOffset;
};
assert_size(IsoGroundTextureData, 28);
struct CIsoEngineGroundVftable
{
using Destructor = void(__thiscall*)(CIsoEngineGround* thisptr, char flags);
Destructor destructor;
using Render = void(__thiscall*)(CIsoEngineGround* thisptr,
IMqRenderer2* renderer,
const CMqPoint* position,
const CMqRect* area);
Render render;
};
assert_vftable_size(CIsoEngineGroundVftable, 2);
/** Holds information about tile borders rendering. */
struct TileBordersDrawInfo
{
TileBordersInfo* tileInfo; /**< Tile borders to draw. */
CMqPoint srcPos; /**< Source position for CTerrainTile::Draw. */
CMqPoint dstPos; /**< Destination position for CTerrainTile::Draw. */
CMqPoint pos3;
bool hidden; /**< Tile hidden in fog of war. */
char padding[3];
};
assert_size(TileBordersDrawInfo, 32);
namespace CGroundTextureApi {
IMqTextureVftable* vftable();
CIsoEngineGroundVftable* isoEngineVftable();
/** Temporary buffer for blend or alpha mask. */
void* borderMaskBuffer();
} // namespace CGroundTextureApi
} // namespace game
#endif // ISOENGINEGROUND_H
| 7,317
|
C++
|
.h
| 186
| 35.784946
| 99
| 0.731491
|
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,563
|
draganddropinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/draganddropinterf.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 DRAGANDDROPINTERF_H
#define DRAGANDDROPINTERF_H
#include "d2list.h"
#include "fullscreeninterf.h"
#include "middropmanager.h"
#include "mqpoint.h"
#include "smartptr.h"
namespace game {
struct IMidDropSource;
struct IMidDropTarget;
struct CDialogInterf;
struct CInterfManagerImpl;
struct ITask;
struct CDragAndDropInterfData
{
bool unknown;
char padding[3];
IMidDropSource* currentSource;
char unknown8[4];
SmartPtr<CInterfManagerImpl> interfManager;
List<IMidDropSource*> dropSources;
List<IMidDropTarget*> dropTargets;
CMqPoint mousePosition;
CDialogInterf* dialogInterf;
ITask* task;
char unknown68[4];
};
assert_size(CDragAndDropInterfData, 72);
struct CDragAndDropInterf : public CFullScreenInterf
{
IMidDropManager dropManager;
CDragAndDropInterfData* dragAndDropInterfData;
};
namespace CDragAndDropInterfApi {
struct Api
{
using GetDialog = CDialogInterf*(__thiscall*)(CDragAndDropInterf* thisptr);
GetDialog getDialog;
};
Api& get();
} // namespace CDragAndDropInterfApi
} // namespace game
#endif // DRAGANDDROPINTERF_H
| 1,923
|
C++
|
.h
| 61
| 29.04918
| 79
| 0.782044
|
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,564
|
mapgraphics.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mapgraphics.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 MAPGRAPHICS_H
#define MAPGRAPHICS_H
#include "d2list.h"
#include "d2map.h"
#include "functordispatch1.h"
#include "mqrect.h"
#include "smartptr.h"
#include "tileindices.h"
#include <cstddef>
namespace game {
struct C2DEngine;
struct CIsoEngineGround;
struct IIsoCBScroll;
struct IMqImage2;
struct CIsoLayer;
/**
* Maps iso layer and map tile positions to 2d engine element indices.
* Hash value computed as:
* @code{.cpp}
* (layerNumber << 20)
* | ((mapPosX & 0xFFF003FF | ((mapPosX & 0x3FF) << 10))
* ^ (mapPosY ^ (mapPosX & 0xFFF003FF | ((mapPosX & 0x3FF) << 10))) & 0x3FF)
* & 0xFFFFF;
* @endcode
* Element indices are used by C2DEngineMapImpl to add, remove and change map elements images.
*/
using HashElementIndexMap = Map<int /* hash */, int /* elementIndex */, SmartPointer>;
assert_size(HashElementIndexMap, 36);
struct MapGraphics
{
C2DEngine* engine2d;
CMqRect isoViewArea; /**< Area of isometric map view. */
int mapSize;
HashElementIndexMap hashElementIndexMap;
CIsoEngineGround* isoEngineGround;
int scrollSpeed;
bool unknown5;
char padding[3];
List<IIsoCBScroll*> isoScrollList;
bool unknown6;
char padding2[3];
/**
* Callback that returns true if mouse coordinates can be converted to tile coordinates.
* Set by CStratInterf in its c-tor.
*/
SmartPtr<CBFunctorDispatch1wRet<const CMqPoint*, bool>> canConvertMouse;
};
assert_size(MapGraphics, 100);
assert_offset(MapGraphics, isoEngineGround, 60);
assert_offset(MapGraphics, isoScrollList, 72);
assert_offset(MapGraphics, canConvertMouse, 92);
using MapGraphicsPtr = SmartPtr<MapGraphics*>;
namespace MapGraphicsApi {
struct Api
{
using GetMapGraphics = MapGraphicsPtr*(__stdcall*)(MapGraphicsPtr* ptr);
GetMapGraphics getMapGraphics;
using SetMapGraphics = void(__thiscall*)(MapGraphicsPtr* thisptr, MapGraphics** data);
SetMapGraphics setMapGraphics;
using GetTileIndex = TileArrayIndex(__thiscall*)(MapGraphics** thisptr, bool waterTile);
GetTileIndex getTileIndex;
/** Sets tile array index used for tiles outside of map bounds. */
using SetOutOfBordersTileIndex = int(__thiscall*)(MapGraphics** thisptr,
TileArrayIndex tileIndex);
SetOutOfBordersTileIndex setOutOfBordersTileIndex;
/**
* Shows specified image on selected layer.
* Image is placed according to mapPosition.
*/
using ShowImageOnMap = void(__stdcall*)(const CMqPoint* mapPosition,
const CIsoLayer* layer,
const IMqImage2* image,
int a4,
int a5);
ShowImageOnMap showImageOnMap;
/** Hides all images on selected layer. */
using HideLayerImages = void(__stdcall*)(const CIsoLayer* layer);
HideLayerImages hideLayerImages;
};
Api& get();
} // namespace MapGraphicsApi
} // namespace game
#endif // MAPGRAPHICS_H
| 3,898
|
C++
|
.h
| 101
| 33.445545
| 94
| 0.698173
|
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,565
|
eventeffect.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/eventeffect.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 EVENTEFFECT_H
#define EVENTEFFECT_H
#include "idvector.h"
namespace game {
struct IEventEffectVftable;
struct IMidgardObjectMap;
struct IMidMsgSender;
struct IEventEffect
{
IEventEffectVftable* vftable;
};
struct IEventEffectVftable
{
using Destructor = void(__thiscall*)(IEventEffect* thisptr, char flags);
Destructor destructor;
/**
* Applies game internal event effect.
* Sends network messages using msgSender.
* @returns true if effect applied successfully.
*/
using Apply = bool(__thiscall*)(const IEventEffect* thisptr,
IMidgardObjectMap* objectMap,
IMidMsgSender* msgSender,
IdVector* triggerers);
Apply apply;
using Method2 = bool(__thiscall*)(IEventEffect* thisptr, int a2);
Method2 method2;
using Method3 = bool(__thiscall*)(IEventEffect* thisptr);
Method3 method3;
/**
* Returns true to indicate that further events and effects processing should stop.
* Only CEffectBattle is known to return true from this method.
*/
using StopProcessing = bool(__thiscall*)(const IEventEffect* thisptr);
StopProcessing stopProcessing;
};
assert_vftable_size(IEventEffectVftable, 5);
} // namespace game
#endif // EVENTEFFECT_H
| 2,152
|
C++
|
.h
| 57
| 32.807018
| 87
| 0.716138
|
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,566
|
midisogroundindexer.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midisogroundindexer.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 MIDISOGROUNDINDEXER_H
#define MIDISOGROUNDINDEXER_H
#include "d2assert.h"
#include "isogroundindexer.h"
namespace game {
struct IMidgardObjectMap;
struct CMidIsoGroundIndexerData
{
IMidgardObjectMap* objectMap;
/** Accessed in getData as: 48 * ((posY / 192 + 24) % 24) + (posX / 192 + 48) % 48 */
std::uint8_t groundIndices[1152];
int mapSeed;
};
assert_size(CMidIsoGroundIndexerData, 1160);
struct CMidIsoGroundIndexer : public IIsoGroundIndexer
{
CMidIsoGroundIndexerData* data;
};
assert_size(CMidIsoGroundIndexer, 8);
} // namespace game
#endif // MIDISOGROUNDINDEXER_H
| 1,424
|
C++
|
.h
| 39
| 34.307692
| 89
| 0.764364
|
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,567
|
popupinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/popupinterf.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 POPUPINTERF_H
#define POPUPINTERF_H
#include "popupdialoginterf.h"
#include "taskmanagerholder.h"
namespace game {
struct CPopupInterfData
{
CDialogInterf* dialog;
CTaskManager* taskManager;
ITask* task;
};
assert_size(CPopupInterfData, 12);
struct CPopupInterf
: public CPopupDialogInterf
, public ITaskManagerHolder
{
CPopupInterfData* popupData;
};
assert_size(CPopupInterf, 24);
assert_offset(CPopupInterf, popupData, 20);
} // namespace game
#endif // POPUPINTERF_H
| 1,324
|
C++
|
.h
| 40
| 30.85
| 72
| 0.771765
|
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,568
|
playerincomehooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/playerincomehooks.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 PLAYERINCOMEHOOKS_H
#define PLAYERINCOMEHOOKS_H
namespace game {
struct Bank;
struct IMidgardObjectMap;
struct CMidgardID;
} // namespace game
namespace hooks {
game::Bank* __stdcall computePlayerDailyIncomeHooked(game::Bank* income,
game::IMidgardObjectMap* objectMap,
const game::CMidgardID* playerId);
}
#endif // PLAYERINCOMEHOOKS_H
| 1,269
|
C++
|
.h
| 31
| 35.774194
| 88
| 0.714286
|
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,569
|
mqnettraffic.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqnettraffic.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 MQNETTRAFFIC_H
#define MQNETTRAFFIC_H
namespace game {
struct IMqNetTraffic
{
void* vftable;
};
} // namespace game
#endif // MQNETTRAFFIC_H
| 970
|
C++
|
.h
| 27
| 33.962963
| 72
| 0.763326
|
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,570
|
modifgroup.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/modifgroup.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 MODIFGROUP_H
#define MODIFGROUP_H
#include "categories.h"
namespace game {
struct LModifGroup : public Category<ModifierSourceId>
{ };
struct LModifGroupTable : public CEnumConstantTable<ModifierSourceId>
{ };
namespace LModifGroupApi {
struct Categories
{
LModifGroup* unit;
LModifGroup* stack;
LModifGroup* attack;
};
Categories& categories();
void* vftable();
} // namespace LModifGroupApi
namespace LModifGroupTableApi {
using Api = CategoryTableApi::Api<LModifGroupTable, LModifGroup>;
Api& get();
void* vftable();
} // namespace LModifGroupTableApi
} // namespace game
#endif // MODIFGROUP_H
| 1,447
|
C++
|
.h
| 43
| 31.581395
| 72
| 0.775054
|
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,571
|
midrod.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midrod.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 MIDROD_H
#define MIDROD_H
#include "mapelement.h"
#include "midscenarioobject.h"
namespace game {
struct CMidRod : public IMidScenarioObject
{
IMapElement mapElement;
CMidgardID ownerId;
};
assert_size(CMidRod, 32);
} // namespace game
#endif // MIDROD_H
| 1,090
|
C++
|
.h
| 31
| 33.129032
| 72
| 0.765209
|
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,572
|
playerbuildings.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/playerbuildings.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 PLAYERBUIDINGS_H
#define PLAYERBUIDINGS_H
#include "idlist.h"
#include "midscenarioobject.h"
namespace game {
/** Holds information about player's buildings in capital. */
struct CPlayerBuildings : public IMidScenarioObject
{
int unknown;
IdList buildings;
};
assert_size(CPlayerBuildings, 28);
} // namespace game
#endif // PLAYERBUIDINGS_H
| 1,177
|
C++
|
.h
| 32
| 34.78125
| 72
| 0.769772
|
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,573
|
nativespellinfo.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/nativespellinfo.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 NATIVESPELLINFO_H
#define NATIVESPELLINFO_H
#include "rsgid.h"
#include "spellinfo.h"
namespace hooks {
class NativeSpellInfo final : public rsg::SpellInfo
{
public:
NativeSpellInfo(const rsg::CMidgardID& spellId, int value, int level, rsg::SpellType spellType)
: spellId{spellId}
, value{value}
, level{level}
, spellType{spellType}
{ }
~NativeSpellInfo() override = default;
const rsg::CMidgardID& getSpellId() const override
{
return spellId;
}
rsg::SpellType getSpellType() const override
{
return spellType;
}
int getValue() const override
{
return value;
}
int getLevel() const override
{
return level;
}
private:
rsg::CMidgardID spellId;
int value{};
int level{};
rsg::SpellType spellType{rsg::SpellType::Attack};
};
} // namespace hooks
#endif // NATIVESPELLINFO_H
| 1,745
|
C++
|
.h
| 57
| 26.649123
| 99
| 0.711814
|
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,574
|
popupdialoginterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/popupdialoginterf.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 POPUPDIALOGINTERF_H
#define POPUPDIALOGINTERF_H
#include "interfdialog.h"
namespace game {
struct CDialogInterf;
struct CPopupDialogInterf : public CInterfDialog
{
CDialogInterf** dialog;
};
assert_offset(CPopupDialogInterf, dialog, 12);
namespace CPopupDialogInterfApi {
struct Api
{
using Constructor = CPopupDialogInterf*(__thiscall*)(CPopupDialogInterf* thisptr,
const char* dialogName,
CMqRect* area);
Constructor constructor;
};
Api& get();
} // namespace CPopupDialogInterfApi
} // namespace game
#endif // POPUPDIALOGINTERF_H
| 1,492
|
C++
|
.h
| 40
| 32.425
| 85
| 0.718056
|
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,575
|
phasegame.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/phasegame.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 PHASEGAME_H
#define PHASEGAME_H
#include "interfmanager.h"
#include "midcommandqueue2.h"
#include "middatacache.h"
#include "phase.h"
#include <cstddef>
namespace game {
struct CMidObjectNotify;
struct CMidObjectLock;
struct CIsoChatDisplay;
struct MapGraphics;
struct IIsoCBScroll;
struct CCityDisplay;
struct CMidAnim2System;
struct CPhaseGameData
{
InterfManagerImplPtr interfManager;
int unknown2;
CInterface* currentInterface;
SmartPtr<MapGraphics*> mapGraphics;
SmartPointer palMapIsoScroller;
IIsoCBScroll* audioRegionCtrl;
CMidClient* midClient;
int unknown8;
CMidObjectNotify* midObjectNotify;
CMidAnim2System* animSystem;
void* listPtr;
CCityDisplay* cityDisplay;
CMidgardID currentPlayerId;
CMidObjectLock* midObjectLock;
int unknown13;
CIsoChatDisplay* isoChatDisplay;
};
assert_size(CPhaseGameData, 76);
assert_offset(CPhaseGameData, midClient, 36);
struct CPhaseGame : public CMidCommandQueue2::INotifyCQ
{
CMidDataCache2::INotify dataCacheNotify;
CPhase phase;
CPhaseGameData* data;
};
assert_size(CPhaseGame, 20);
assert_offset(CPhaseGame, phase, 8);
} // namespace game
#endif // PHASEGAME_H
| 2,015
|
C++
|
.h
| 64
| 28.875
| 72
| 0.783617
|
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,576
|
pointset.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/pointset.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 POINTSET_H
#define POINTSET_H
#include "d2set.h"
#include "mqpoint.h"
namespace game {
using PointSet = Set<CMqPoint>;
struct PointSetIterator
{
char unknown[16];
};
namespace PointSetApi {
struct Api
{
using Constructor = PointSet*(__thiscall*)(PointSet* thisptr, bool* a2, void* a3, bool a4);
Constructor constructor;
using Destructor = void(__thiscall*)(PointSet* thisptr);
Destructor destructor;
using Add = PointSetIterator*(__thiscall*)(PointSet* thisptr,
PointSetIterator* iterator,
const CMqPoint* point);
Add add;
};
Api& get();
} // namespace PointSetApi
} // namespace game
#endif // POINTSET_H
| 1,561
|
C++
|
.h
| 44
| 31.022727
| 95
| 0.704787
|
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,577
|
itemexpotionheal.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemexpotionheal.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 ITEMEXPOTIONHEAL_H
#define ITEMEXPOTIONHEAL_H
namespace game {
struct IItemExPotionHeal
{
void* vftable;
};
} // namespace game
#endif // ITEMEXPOTIONHEAL_H
| 986
|
C++
|
.h
| 27
| 34.555556
| 72
| 0.767296
|
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,578
|
eventconditioncathooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/eventconditioncathooks.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 EVENTCONDITIONCATHOOKS_H
#define EVENTCONDITIONCATHOOKS_H
#include "eventconditioncat.h"
#include "midgardid.h"
namespace hooks {
struct CustomEventCondition
{
game::LEventCondCategory category{nullptr, nullptr, game::EventConditionId{-1}};
game::CMidgardID infoText{};
game::CMidgardID brief{};
game::CMidgardID description{};
};
struct CustomEventConditions
{
CustomEventCondition ownResource{};
CustomEventCondition gameMode{};
CustomEventCondition playerType{};
CustomEventCondition variableCmp{};
CustomEventCondition script{};
};
CustomEventConditions& customEventConditions();
game::LEventCondCategoryTable* __fastcall eventCondCategoryTableCtorHooked(
game::LEventCondCategoryTable* thisptr,
int /*%edx*/,
const char* globalsFolderPath,
void* codeBaseEnvProxy);
} // namespace hooks
#endif // EVENTCONDITIONCATHOOKS_H
| 1,707
|
C++
|
.h
| 46
| 34.413043
| 84
| 0.777845
|
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,579
|
d2osexception.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/d2osexception.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 D2OSEXCEPTION_H
#define D2OSEXCEPTION_H
namespace game {
/** Base class for all exceptions. */
struct os_exception
{
void* vftable;
const char* message;
};
namespace os_exceptionApi {
struct Api
{
/** Passes its arguments to c++ standard library function that handles exception throw. */
using ThrowException = void(__stdcall*)(const os_exception* thisptr, const void* throwInfo);
ThrowException throwException;
};
Api& get();
} // namespace os_exceptionApi
} // namespace game
#endif // D2OSEXCEPTION_H
| 1,353
|
C++
|
.h
| 38
| 33.394737
| 96
| 0.755743
|
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,580
|
doppelgangerhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/doppelgangerhooks.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 DOPPELGANGERHOOKS_H
#define DOPPELGANGERHOOKS_H
namespace game {
struct CBatAttackDoppelganger;
struct IMidgardObjectMap;
struct BattleMsgData;
struct CMidgardID;
struct BattleAttackInfo;
} // namespace game
namespace hooks {
bool __fastcall doppelgangerAttackCanPerformHooked(game::CBatAttackDoppelganger* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* targetUnitId);
bool __fastcall doppelgangerAttackIsImmuneHooked(game::CBatAttackDoppelganger* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* unitId);
void __fastcall doppelgangerAttackOnHitHooked(game::CBatAttackDoppelganger* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* targetUnitId,
game::BattleAttackInfo** attackInfo);
bool __stdcall cannotUseDoppelgangerAttackHooked(const game::CMidgardID* unitId,
const game::BattleMsgData* battleMsgData);
} // namespace hooks
#endif // DOPPELGANGERHOOKS_H
| 2,560
|
C++
|
.h
| 48
| 37.645833
| 91
| 0.587695
|
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,581
|
scripts.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/scripts.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 SCRIPTS_H
#define SCRIPTS_H
#include <filesystem>
#include <lua.hpp>
#include <optional>
#include <sol/sol.hpp>
namespace hooks {
/** Returns lua environment with bound api and specified source loaded and executed. */
sol::environment executeScript(const std::string& source,
sol::protected_function_result& result,
bool bindScenario = false);
/** Returns lua environment with bound api and specified file loaded and executed. */
std::optional<sol::environment> executeScriptFile(const std::filesystem::path& path,
bool alwaysExists = false,
bool bindScenario = false);
/**
* Returns function with specified name from lua environment to call from c++.
* Return type is sol::function as std::function causes memory leaks in sol2 when function executes.
* @param[in] environment lua environment where to search.
* @param[in] name function name in lua script.
* @param[in] alwaysExists true to show error message if the function does not exist.
*/
std::optional<sol::function> getScriptFunction(const sol::environment& environment,
const char* name,
bool alwaysExists = false);
/**
* Returns function with specified name from lua environment to call from c++.
* Return type is sol::function as std::function causes memory leaks in sol2 when function executes.
* @param[in] path filename of script source.
* @param[in] name function name in lua script.
* @param[out] environment lua environment where the function executes.
* @param[in] alwaysExists true to show error message if the function does not exist.
* @param[in] bindScenario true to bind global 'getScenario' function.
*/
std::optional<sol::function> getScriptFunction(const std::filesystem::path& path,
const char* name,
std::optional<sol::environment>& environment,
bool alwaysExists = false,
bool bindScenario = false);
/**
* Returns protected_function that is less performant than unsafe_function, but has error handling.
* sol::function is defined as unsafe_function for Release build. If an error occurs in such
* function, it causes Lua stack to not properly unwind after try...catch block, that eventually
* leads to stack overflow. See https://github.com/ThePhD/sol2/issues/65 for details.
* @param[in] environment lua environment where to search.
* @param[in] name function name in lua script.
* @param[in] alwaysExists true to show error message if the function does not exist.
*/
std::optional<sol::protected_function> getProtectedScriptFunction(
const sol::environment& environment,
const char* name,
bool alwaysExists = false);
} // namespace hooks
#endif // SCRIPTS_H
| 3,847
|
C++
|
.h
| 72
| 45.416667
| 100
| 0.681275
|
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,582
|
tasktilehighlight.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/tasktilehighlight.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 TASKTILEHIGHLIGHT_H
#define TASKTILEHIGHLIGHT_H
#include "midfreetask.h"
#include "mqpoint.h"
#include "uievent.h"
namespace game {
struct CTaskTileHighlight : public CMidFreeTask
{
struct Impl
{
void* vftable;
UiEvent updateEvent;
CMqPoint mousePosition;
};
Impl* impl;
};
assert_size(CTaskTileHighlight, 20);
} // namespace game
#endif // TASKTILEHIGHLIGHT_H
| 1,229
|
C++
|
.h
| 37
| 30.459459
| 72
| 0.751689
|
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,583
|
aioperational.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aioperational.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 AIOPERATIONAL_H
#define AIOPERATIONAL_H
#include "aistate.h"
#include "idlist.h"
namespace game {
struct IMidgardObjectMap;
struct CMidServerLogicData;
struct CAiLog;
struct CAiReactionOper;
struct IAiOperationalInternalVftable;
struct IAiOperationalInternal
{
IAiOperationalInternalVftable* vftable;
};
struct IAiOperationalInternalVftable
{
using Destructor = void(__thiscall*)(IAiOperationalInternal* thisptr, char flags);
Destructor destructor;
void* methods[3];
};
struct CAiOperational
: public IAiState
, public IAiOperationalInternal
{
IMidgardObjectMap* objectMap;
CMidgardID playerId;
CMidServerLogicData* serverLogic;
CAiLog* aiLog;
IdList* list;
IdList* list2;
CAiReactionOper* reactionOper;
int unknown;
bool unknown2;
char padding[3];
int unknown3;
};
assert_size(CAiOperational, 48);
} // namespace game
#endif // AIOPERATIONAL_H
| 1,745
|
C++
|
.h
| 57
| 27.912281
| 86
| 0.77327
|
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,584
|
game.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/game.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 GAME_H
#define GAME_H
#include "attacktypepairvector.h"
#include "faceimg.h"
#include "globaldata.h"
#include "idlist.h"
#include "mqpoint.h"
#include "smartptr.h"
namespace game {
struct TRaceType;
struct CPlayerBuildings;
struct LUnitBranch;
struct CMidDataCache2;
struct CMidgardID;
struct CDBTable;
struct GlobalData;
struct IMidObject;
struct IUsSoldier;
struct IUsNoble;
struct IUsStackLeader;
struct IMidgardObjectMap;
struct TLordType;
struct CMidPlayer;
struct BattleMsgData;
struct CMidUnit;
struct IUsUnit;
struct LAttackSource;
struct LAttackClass;
struct LImmuneCat;
struct IBatAttack;
struct IAttack;
struct CMidUnitGroup;
struct Bank;
struct CMqPoint;
struct CUnitGenerator;
struct CAttackData;
struct CDynUpgrade;
struct CMidStack;
struct CFortification;
struct CMidRuin;
struct CMidgardPlan;
struct CMidgardMap;
struct IMqImage2;
struct IEncUnitDescriptor;
struct CDialogInterf;
struct String;
struct LRaceCategory;
struct LTerrainCategory;
struct LGroundCategory;
struct IItem;
struct CPhaseGame;
struct IUsRacialSoldier;
struct NetPlayerInfo;
struct LBuildingCategory;
struct IUsLeader;
struct LDeathAnimCategory;
struct CMidStreamEnvFile;
struct CMidgardScenarioMap;
struct TBuildingType;
enum class ModifierElementTypeFlag : int;
enum class CanApplyPotionResult : int
{
Ok = 0,
NoItemInInventory = 1,
AlreadyAtFullHp = 3,
AlreadyAlive = 5,
NotAPotion = 8,
AlreadyApplied = 9,
CannotBoostDead = 10,
CannotHealDead = 11,
};
enum class BuildingStatus : int
{
CanBeBuilt = 0,
InsufficientBank = 3,
ExceedsMaxLevel = 5,
PlayerAlreadyBuiltThisDay = 6,
AlreadyBuilt = 8,
PlayerHasNoRequiredBuilding = 9,
PlayerHasSiblingUnitBuilding = 10,
LordHasNoBuilding = 11, // Custom value, compatible with all occurrences of getBuildingStatus
};
/** Sets initial values for 'show resources' and 'minimap mode' toggle buttons. */
using RespopupInitFunc = void (*)(void);
/** Sets initial value for 'show banners' toggle button. */
using ToggleShowBannersInitFunc = void*(__thiscall*)(void* thisptr);
/**
* Adds tier-1 unit from specified unit branch to player's hire list.
* @param[in] race player race.
* @param[in] buildings player buildings.
* @param[in] branch determines unit to add.
* @param[inout] hireList list to store results.
* @returns unknown.
*/
using AddUnitToHireList = void*(__stdcall*)(TRaceType* race,
CPlayerBuildings* buildings,
const LUnitBranch* branch,
IdList* hireList);
/**
* Adds unit from sideshow branch to player's hire list.
* @param[in] race player race.
* @param[in] buildings player buildings.
* @param[inout] hireList list to store results.
* @returns unknown.
*/
using AddSideshowUnitToHireList = void*(__stdcall*)(TRaceType* race,
CPlayerBuildings* buildings,
IdList* hireList);
/**
* Adds player's tier-1 units to hire list.
* @param[in] dataCache pointer to data cache object.
* @param[in] playerId id of player to process.
* @param[in] a3 meaning unknown.
* @param[inout] hireList list to store results.
* @returns true if units were added to the list.
*/
using AddPlayerUnitsToHireList = bool(__stdcall*)(CMidDataCache2* dataCache,
const CMidgardID* playerId,
const CMidgardID* a3,
IdList* hireList);
/**
* Callback function used to process each record in GBuild.dbf.
* Creates TBuildingType or TBuildingUnitUpgType objects from record data and stores them in a2.
*/
using CreateBuildingType = void(__stdcall*)(const CDBTable* dbTable,
void* a2,
const GlobalData** globalData);
/**
* Adds object to dictionary-like structure if it's not a duplicate.
* @returns false in case of duplicating object.
*/
using AddObjectAndCheckDuplicates = bool(__thiscall*)(void* thisptr, const IMidObject* object);
/**
* Decides where to place unit in group.
* @returns 0 for back lane, 1 for forward lane.
*/
using ChooseUnitLane = int(__stdcall*)(const IUsSoldier* soldier);
/** Returns lord type for specified player. */
using GetLordByPlayer = const TLordType*(__stdcall*)(const CMidPlayer* player);
/** Returns true if current turn value is in allowed range [0 : 999]. */
using IsTurnValid = bool(__stdcall*)(int turn);
/** Returns stack id of allies or enemies for specified unit id. */
using GetAllyOrEnemyGroupId = CMidgardID*(__stdcall*)(CMidgardID* value,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId,
bool allies);
/** Returns pointer to unit found by specified id. */
using FindUnitById = CMidUnit*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
using CastUnitImplToSoldier = IUsSoldier*(__stdcall*)(const IUsUnit* unitImpl);
using CastUnitImplToNoble = IUsNoble*(__stdcall*)(const IUsUnit* unitImpl);
using CastUnitImplToStackLeader = IUsStackLeader*(__stdcall*)(const IUsUnit* unitImpl);
using CastUnitImplToLeader = IUsLeader*(__stdcall*)(const IUsUnit* unitImpl);
using CastUnitImplToRacialSoldier = const IUsRacialSoldier*(__stdcall*)(const IUsUnit* unitImpl);
using CreateBatAttack = IBatAttack*(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId,
const CMidgardID* id2,
int attackNumber,
const LAttackClass* attackClass,
bool a7);
using GetAttackById = IAttack*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* id,
int attackNumber,
bool checkAltAttack);
using IsUnitImmuneToAttack = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId,
const IAttack* attack,
bool checkAlwaysImmuneOnly);
/** Returns bit flag position (0-31) for the specified attack class. */
using GetAttackClassWardFlagPosition = std::uint32_t(__stdcall*)(const LAttackClass* attackClass);
using AttackClassToString = const char*(__stdcall*)(const LAttackClass* attackClass);
/** Returns bit flag position (0-7) for the specified attack source. */
using GetAttackSourceWardFlagPosition =
std::uint32_t(__stdcall*)(const LAttackSource* attackSource);
/**
* Returns pointer to units group of stack, fortification or ruin
* Actual object type found determined by specified id IdType.
*/
using GetStackFortRuinGroup = CMidUnitGroup*(__thiscall*)(void* thisptr,
const IMidgardObjectMap* objectMap,
const CMidgardID* objectId);
using GetStackFortRuinGroupForChange = void(__stdcall*)(IMidgardObjectMap* objectMap,
const CMidgardID* objectId,
CMidUnitGroup** result);
using GetStackFortRuinForChange = void(__stdcall*)(IMidgardObjectMap* objectMap,
const CMidgardID* objectId,
CMidStack** stack,
CFortification** fort,
CMidRuin** ruin);
/**
* Returns id of the object with the group the unit belongs to.
* Returned id is always valid.
*/
using GetStackFortRuinId = const CMidgardID*(__stdcall*)(const CMidgardID* unitId,
const IMidgardObjectMap* objectMap);
using GetStackIdByUnitId = const CMidgardID*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
using GetFortIdByUnitId = const CMidgardID*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
using GetRuinIdByUnitId = const CMidgardID*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
/** Deletes all building in capital of specified player. */
using DeletePlayerBuildings = int(__stdcall*)(IMidgardObjectMap* objectMap,
const CMidPlayer* player);
/** Builds lord-specific buildings in capital of player described by NetPlayerInfo. */
using BuildLordSpecificBuildings = bool(__stdcall*)(IMidgardObjectMap* objectMap,
const NetPlayerInfo* playerInfo,
int);
/** Adds building of specified category to capital of specified player. */
using AddCapitalBuilding = bool(__stdcall*)(IMidgardObjectMap* objectMap,
const CMidPlayer* player,
const LBuildingCategory* building);
using GetInterfaceText = const char*(__stdcall*)(const CMidgardID* textId);
using ComputePlayerDailyIncome = Bank*(__stdcall*)(Bank* income,
IMidgardObjectMap* objectMap,
const CMidgardID* playerId);
/**
* Computes full attack damage with respect to armor, buffs, debuffs and critical hit.
* @param[in] objectMap map to search for units.
* @param[in] battleMsgData battle information to check for buffs and debuffs.
* @param[in] attackImpl attack for which damage is computed.
* @param[in] attackerUnitId id of unit performing the attack.
* @param[in] targetUnitId id of unit being attacked.
* @param computeCriticalHit if set to true, critical hit ability is checked and critical damage is
* computed.
* @param[inout] attackDamage used to store damage without critical hit. Must be non-null if
* computeCriticalHit is true.
* @param[inout] criticalHitDamage used to store critical hit damage. Must be non-null if
* computeCriticalHit is true.
* @returns computed damage.
*/
using ComputeDamage = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const IAttack* attack,
const CMidgardID* attackerUnitId,
const CMidgardID* targetUnitId,
bool computeCriticalHit,
int* attackDamage,
int* criticalHitDamage);
using ComputeDamageMax = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
using ComputeDamageWithBuffs = int(__stdcall*)(const IAttack* attack,
int damageMax,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId,
bool addRandomDamage,
bool easyDifficulty);
/**
* Computes unit armor with respect to buffs / debuffs, defend / fortification bonus and shattered
* armor.
* @param[out] armor the resulting value.
* @param[in] objectMap map to search for units.
* @param[in] battleMsgData battle information to check for buffs and debuffs.
* @param[in] unitId id of a unit to compute armor for.
* @returns pointer to the resulting value.
*/
using ComputeArmor = int*(__stdcall*)(int* armor,
const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId);
/**
* Used for pathfinding.
* Causes memory corruption (that leads to crash) on 144x144 maps if the position is out of map
* bounds.
*/
using MarkMapPosition = void(__thiscall*)(void* thisptr, CMqPoint* position);
/** Returns unit level by impl id. If unit does not exist yet, computes its level. */
using GetUnitLevelByImplId = int(__stdcall*)(const CMidgardID* unitImplId);
/**
* Returns attack power value (chance to hit / accuracy) adjusted according to game difficulty and
* batte round.
*/
using GetAttackPower = void(__stdcall*)(int* power,
const IAttack* attack,
const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const BattleMsgData* battleMsgData);
/** Returns true if group with specified id belongs to human controlled player. */
using IsGroupOwnerPlayerHuman = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* groupId);
/**
* Determines whether attack should miss or not depending on its power (chance to hit / accuracy).
* Compares attack power with arithmetic mean of two random numbers.
* @returns true if arithmetic mean is greater than power value.
*/
using AttackShouldMiss = bool(__stdcall*)(const int* power);
/** Generates random number in range [0 : maxValue) using special ingame generator. */
using GenerateRandomNumber = int(__stdcall*)(unsigned int maxValue);
/** Generates random number in range [0 : maxValue) using standard CRT rand(). */
using GenerateRandomNumberStd = int(__stdcall*)(unsigned int maxValue);
using GetUnitPositionInGroup = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* groupId,
const CMidgardID* unitId);
/** Returns summon unit impl id for specified attack id according to size and position in group. */
using GetSummonUnitImplIdByAttack = CMidgardID*(__stdcall*)(CMidgardID* summonImplId,
const CMidgardID* attackId,
int position,
bool smallUnit);
/**
* Returns summon unit impl id for specified summon attack.
* @param[inout] summonImplId where to store resulting unit impl id.
* @param[in] objectMap used for object search.
* @param[in] attackId summon attack id to choose one summon from list.
* @param[in] groupId id of group where summoned unit supposed to be.
* @param[in] targetUnitId special summon id to get position in group.
* @param canSummonBig determines wheter big unit can be summoned or not.
* @returns pointer to summonImplId.
*/
using GetSummonUnitImplId = CMidgardID*(__stdcall*)(CMidgardID* summonImplId,
IMidgardObjectMap* objectMap,
const CMidgardID* attackId,
const CMidgardID* groupId,
const CMidgardID* targetUnitId,
bool canSummonBig);
;
/**
* Returns number of attacks allowed in battle for specific id ???
* 1 or 0 for item, 1 or 2 for unit attacks and so on.
*/
using GetAttackImplMagic = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
int a3);
/**
* If unit has primary or secondary attack from Heal class category, returns 1 for primary and 2 for
* secondary. In case of different attack class returns 0.
*/
using GetUnitHealAttackNumber = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
/**
* Returns attack damage or heal depending on its class, allows to specify max damage to return.
* Used for encyclopedia text generation, by CMidUnitDescriptor and elsewhere.
*/
using GetAttackQtyDamageOrHeal = int(__stdcall*)(const IAttack* attack, int damageMax);
/**
* Computes unit hp + (hp * armor).
* Used for battle AI.
*/
using ComputeUnitEffectiveHpForAi = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidUnit* unit,
const BattleMsgData* battleMsgData);
/**
* Calculates upgrade count for the specified unit level and applies upgrade values from
* GDynUpgr.dbf to the initial attack data.
*/
using ApplyDynUpgradeToAttackData = void(__stdcall*)(const CMidgardID* unitImplId,
CUnitGenerator* unitGenerator,
int unitLevel,
IdType dynUpgradeType,
const CMidgardID* altAttackId,
CAttackData* attackData);
using ComputeUnitDynUpgrade = void(__stdcall*)(const CMidgardID* unitImplId,
int unitLevel,
CDynUpgrade** upgrade1,
CDynUpgrade** upgrade2,
int* upgrade1Count,
int* upgrade2Count);
using ShowMovementPath = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* stackId,
List<CMqPoint>* path,
const CMqPoint* lastReachablePoint,
const CMqPoint* pathEnd,
bool a6);
using GetMidgardPlan = CMidgardPlan*(__stdcall*)(const IMidgardObjectMap* objectMap);
using GetBlockingPathNearbyStackId =
const CMidgardID*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardPlan* plan,
const CMidStack* stack,
const CMqPoint* lastReachablePoint,
const CMqPoint* pathEnd,
int a6);
/**
* Searches fortification or ruin at specified position and returns its entrance point.
* @param[in] objectMap map to search objects.
* @param[in] plan used to search fortification and ruin objects by position.
* @param[in] stack used to check fort subrace. Entrance point returned only for forts with
* different subraces.
* @param[in] position position to check.
* @param[inout] entrance pointer to store the result.
* @returns true if entrance point found.
*/
using GetFortOrRuinEntrance = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardPlan* plan,
const CMidStack* stack,
const CMqPoint* position,
CMqPoint* entrance);
/**
* Returns true if stack can move to specified position on a map.
* @param[in] objectMap map to search objects.
* @paran[in] position tile position to check.
* @param[in] stack stack to check.
* @param[in] plan pointer to plan object to check obstacles.
*/
using StackCanMoveToPosition = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMqPoint* position,
const CMidStack* stack,
const CMidgardPlan* plan);
using IsWaterTileSurroundedByWater = bool(__stdcall*)(const CMqPoint* position,
const IMidgardObjectMap* objectMap);
using GetStackPositionById = CMqPoint(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* stackId);
/** Applies percentage modifiers of the specified type to the value. */
using ApplyPercentModifiers = int(__stdcall*)(int value,
const IdList* unitModifiers,
ModifierElementTypeFlag type);
/** Creates a formatted description of attack for encyclopedia. */
using GenerateAttackDescription = void(__stdcall*)(IEncUnitDescriptor* descriptor,
CDialogInterf* dialog,
int boostDamageLevel,
int lowerDamageLevel,
int lowerInitiativeLevel,
const IdList* editorModifiers,
int damageMax);
using CreateMenuAnimation = SmartPtr<IMqImage2>*(__stdcall*)(SmartPtr<IMqImage2>* animation,
const char* animationName);
/** Gets attack source interface text. */
using GetAttackSourceText = String*(__stdcall*)(String* value, const LAttackSource* attackSource);
/** Appends attack source interface text. */
using AppendAttackSourceText = void(__stdcall*)(const LAttackSource* attackSource,
String* value,
bool* valueIsNotEmpty);
using IsRaceCategoryUnplayable = bool(__stdcall*)(const LRaceCategory* raceCategory);
/**
* Validates TRaceType objects.
* Checks valirity of unit, guardian, leader and buildings ids.
* Checks that all race categories were correctly read.
*/
using ValidateRaces = void(__thiscall*)(RacesMap** thisptr, GlobalData** globalData);
/** Checks if race with specified category was loaded from Grace.dbf. */
using CheckRaceExist = void(__stdcall*)(RacesMap** races,
const LRaceCategory* category,
const char* dbfFileName);
/** Gets a list of sources to which the unit has the specified immunity. */
using GetUnitAttackSourceImmunities = void(__stdcall*)(const LImmuneCat* immuneCat,
const CMidUnit* unit,
List<LAttackSource>* value);
/** Gets a list of sources to which the soldier has the specified immunity. */
using GetSoldierAttackSourceImmunities = void(__stdcall*)(const IUsSoldier* soldier,
bool alwaysImmune,
List<LAttackSource>* value);
/** Gets immunity rating to be used by AI for overall soldier rating calculation. */
using GetSoldierImmunityAiRating = double(__stdcall*)(const IUsSoldier* soldier);
/** Gets attack class rating to be used by AI for overall soldier rating calculation. */
using GetAttackClassAiRating = double(__stdcall*)(const IUsSoldier* soldier, bool a2);
/** Gets attack reach rating to be used by AI for overall soldier rating calculation. */
using GetAttackReachAiRating = double(__stdcall*)(const IUsSoldier* soldier, int targetCount);
/** Gets distance between unit positions in battle. Used for adjacent attack reach calculations. */
using GetUnitPositionDistance = int(__stdcall*)(int unitPosition,
int targetPosition,
bool isTargetAlly);
using GetUnitRaceCategory = LRaceCategory*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
using IsGroupSuitableForAiNobleMisfit = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidUnitGroup* group);
using IsUnitSuitableForAiNobleDuel = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
using IsAttackEffectiveAgainstGroup = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const IAttack* attack,
const CMidUnitGroup* group);
using IsAttackBetterThanItemUsage = bool(__stdcall*)(const IItem* item,
const IUsSoldier* soldier,
const CMidgardID* unitImplId);
using ComputeAttackDamageCheckAltAttack = int(__stdcall*)(const IUsSoldier* soldier,
const CMidgardID* unitImplId,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId);
using FillAttackTransformIdList = void(__thiscall*)(const void* thisptr,
IdList* value,
const CMidgardID* attackId,
bool sizeSmall);
using IsSmallMeleeFighter = bool(__stdcall*)(const IUsSoldier* soldier);
using CAiHireUnitEval = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidUnitGroup* group);
using GetMeleeUnitToHireAiRating = double(__stdcall*)(const CMidgardID* unitImplId,
bool a2,
bool a3);
using ComputeTargetUnitAiPriority = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const BattleMsgData* battleMsgData,
int attackerDamage);
/**
* Returns terrain category by its abbreviation string.
* Used in processing GTileDbi.dbf records.
*/
using GetTerrainByAbbreviation = LTerrainCategory*(__stdcall*)(LTerrainCategory* category,
const char* abbreviation);
/** Returns terrain category that corresponds to specified race category. */
using GetTerrainByRace = const LTerrainCategory*(__stdcall*)(const LRaceCategory* race);
/** Returns race category that corresponds to specified terrain category. */
using GetRaceByTerrain = const LRaceCategory*(__stdcall*)(const LTerrainCategory* terrain);
/** Assumption: returns color index for minimap. */
using GetNumberByTerrainGround = int(__stdcall*)(const LTerrainCategory* terrain,
const LGroundCategory* ground);
/** Throws MqDbException with specified message. */
using ThrowGenericException = void(__stdcall*)(const char* message);
/** Returns true if game should ignore events for specified player. */
using IgnorePlayerEvents = bool(__stdcall*)(const CMidgardID* playerId,
const IMidgardObjectMap* objectMap);
/** Returns race's scenario preview image. */
using GetRacePreviewImage = IMqImage2*(__stdcall*)(const LRaceCategory* race);
using IsPlayerRaceUnplayable = bool(__stdcall*)(const CMidgardID* playerId,
const IMidgardObjectMap* objectMap);
using IsSupportAttackClass = bool(__stdcall*)(const LAttackClass* value);
/** Returns a vector of attack + attack-number pairs by unit. */
using GetUnitAttacks = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
AttackTypePairVector* value,
bool checkAltAttack);
using GetItemAttack = IAttack*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
int itemNumber);
using IsUnitUseAdditionalAnimation = bool(__stdcall*)(const CMidgardID* unitId);
using CheckUnitForHire = bool(__stdcall*)(const CMidPlayer* player,
CPhaseGame* phaseGame,
const CMidgardID* unitImplId);
using GetBaseUnitImplId = CMidgardID*(__stdcall*)(CMidgardID* value,
const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
bool original);
using GetUnitImplDamageMax = int(__stdcall*)(CMidgardID* unitImplId);
using ReadGlobalAttacks = AttackMap**(__thiscall*)(AttackMap** thisptr,
const char* globalsFolderPath,
void* codeBaseEnvProxy,
const GlobalData** globalData);
using GetAltAttackIdCheckClass = const CMidgardID*(__stdcall*)(const IAttack* attack);
using UnitHasDoppelgangerAttack = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
using GetDeathAnimationByUnitOrItemId =
LDeathAnimCategory*(__stdcall*)(const CMidgardID* unitOrItemId);
/**
* Translates a string from the OEM-defined character set
* into either an ANSI or a wide-character string.
* This is import from user32.dll used by game executable.
* If Verok's DisciplesGL wrapper is present function will be hooked,
* otherwise it remains the same.
* We don't care and always use it through a function pointer.
* DO NOT hook this function from mss32!
*/
using OemToCharA = int(__stdcall**)(const char* pSrc, char* pDst);
/** Throws CMidScenException with specified param name and message. */
using ThrowScenarioException = void(__stdcall*)(const char* paramName, const char* message);
using LoadScenarioMap = int(__stdcall*)(int a1,
CMidStreamEnvFile* streamEnv,
CMidgardScenarioMap* scenarioMap);
/**
* 'big' determines whether '*FACEB' (round) instead of '*FACE' (rectangle) image from Faces.ff
* should be used.
*/
using CreateUnitFaceImage = CFaceImg::IFaceImg*(__stdcall*)(CMidgardID* unitImplId, bool big);
using CanApplyPotionToUnit = CanApplyPotionResult(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const CMidgardID* groupId,
const CMidgardID* itemId);
/** Returns either next tier (if available) or next level implementation if unit xp is enough. */
using GetUpgradeUnitImplCheckXp = const TUsUnitImpl*(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidUnit* unit);
/** Runs ChangeUnitXP visitor, if unit has no upgrade - decreases the amount by 1. */
using ChangeUnitXpCheckUpgrade = bool(__stdcall*)(IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const CMidgardID* unitId,
int amount);
using IsUnitTierMax = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const CMidgardID* unitId);
using IsUnitLevelNotMax = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const CMidgardID* unitId);
using IsUnitUpgradePending = bool(__stdcall*)(const CMidgardID* unitId,
const IMidgardObjectMap* objectMap);
using GetUnitImplIdForIsoUnitImage = const CMidgardID*(__stdcall*)(const CMidgardID* unitImplId);
using GetUnitRequiredBuildings = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const IUsUnit* unitImpl,
Vector<TBuildingType*>* result);
using ComputeMovementCost = int(__stdcall*)(const CMqPoint* mapPosition,
const IMidgardObjectMap* objectMap,
const CMidgardMap* midgardMap,
const CMidgardPlan* plan,
const CMidgardID* stackId,
const char* a6,
const char* a7,
bool leaderAlive,
bool plainsBonus,
bool forestBonus,
bool waterBonus,
bool waterOnly,
bool forbidWaterOnlyOnLand);
using GetBuildingStatus = BuildingStatus(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const CMidgardID* buildingId,
bool ignoreBuildTurnAndCost);
/** Game and editor functions that can be hooked. */
struct Functions
{
RespopupInitFunc respopupInit;
ToggleShowBannersInitFunc toggleShowBannersInit;
AddUnitToHireList addUnitToHireList;
AddSideshowUnitToHireList addSideshowUnitToHireList;
AddPlayerUnitsToHireList addPlayerUnitsToHireList;
CreateBuildingType createBuildingType;
AddObjectAndCheckDuplicates addObjectAndCheckDuplicates;
ChooseUnitLane chooseUnitLane;
GetLordByPlayer getLordByPlayer;
IsTurnValid isTurnValid;
GetAllyOrEnemyGroupId getAllyOrEnemyGroupId;
FindUnitById findUnitById;
CastUnitImplToSoldier castUnitImplToSoldier;
CastUnitImplToStackLeader castUnitImplToStackLeader;
CreateBatAttack createBatAttack;
GetAttackById getAttackById;
IsUnitImmuneToAttack isUnitImmuneToAttack;
GetAttackClassWardFlagPosition getAttackClassWardFlagPosition;
AttackClassToString attackClassToString;
GetAttackSourceWardFlagPosition getAttackSourceWardFlagPosition;
GetStackFortRuinGroup getStackFortRuinGroup;
GetStackFortRuinGroupForChange getStackFortRuinGroupForChange;
GetStackFortRuinForChange getStackFortRuinForChange;
GetStackFortRuinId getStackFortRuinId;
GetStackIdByUnitId getStackIdByUnitId;
GetFortIdByUnitId getFortIdByUnitId;
GetRuinIdByUnitId getRuinIdByUnitId;
DeletePlayerBuildings deletePlayerBuildings;
GetInterfaceText getInterfaceText;
ComputePlayerDailyIncome computePlayerDailyIncome;
ComputeDamage computeDamage;
ComputeDamageMax computeDamageMax;
ComputeDamageWithBuffs computeDamageWithBuffs;
ComputeArmor computeArmor;
MarkMapPosition markMapPosition;
GetUnitLevelByImplId getUnitLevelByImplId;
GetAttackPower getAttackPower;
IsGroupOwnerPlayerHuman isGroupOwnerPlayerHuman;
AttackShouldMiss attackShouldMiss;
GenerateRandomNumber generateRandomNumber;
GenerateRandomNumberStd generateRandomNumberStd;
GetUnitPositionInGroup getUnitPositionInGroup;
GetSummonUnitImplIdByAttack getSummonUnitImplIdByAttack;
GetSummonUnitImplId getSummonUnitImplId;
GetAttackImplMagic getAttackImplMagic;
GetUnitHealAttackNumber getUnitHealAttackNumber;
GetAttackQtyDamageOrHeal getAttackQtyDamageOrHeal;
ComputeUnitEffectiveHpForAi computeUnitEffectiveHpForAi;
ApplyDynUpgradeToAttackData applyDynUpgradeToAttackData;
ComputeUnitDynUpgrade computeUnitDynUpgrade;
ShowMovementPath showMovementPath;
GetMidgardPlan getMidgardPlan;
CastUnitImplToNoble castUnitImplToNoble;
GetBlockingPathNearbyStackId getBlockingPathNearbyStackId;
GetFortOrRuinEntrance getFortOrRuinEntrance;
StackCanMoveToPosition stackCanMoveToPosition;
IsWaterTileSurroundedByWater isWaterTileSurroundedByWater;
GetStackPositionById getStackPositionById;
ApplyPercentModifiers applyPercentModifiers;
GenerateAttackDescription generateAttackDescription;
CreateMenuAnimation createMenuAnimation;
GetAttackSourceText getAttackSourceText;
AppendAttackSourceText appendAttackSourceText;
IsRaceCategoryUnplayable isRaceCategoryUnplayable;
ValidateRaces validateRaces;
CheckRaceExist checkRaceExist;
GetUnitAttackSourceImmunities getUnitAttackSourceImmunities;
GetSoldierAttackSourceImmunities getSoldierAttackSourceImmunities;
GetTerrainByAbbreviation getTerrainByAbbreviation;
GetTerrainByRace getTerrainByRace;
GetTerrainByRace getTerrainByRace2;
GetRaceByTerrain getRaceByTerrain;
GetRaceByTerrain getPlayableRaceByTerrain;
GetNumberByTerrainGround getNumberByTerrainGround;
ThrowGenericException throwGenericException;
IgnorePlayerEvents ignorePlayerEvents;
GetRacePreviewImage getRacePreviewImage;
GetSoldierImmunityAiRating getSoldierImmunityAiRating;
GetAttackClassAiRating getAttackClassAiRating;
GetAttackReachAiRating getAttackReachAiRating;
GetUnitPositionDistance getUnitPositionDistance;
GetUnitRaceCategory getUnitRaceCategory;
IsGroupSuitableForAiNobleMisfit isGroupSuitableForAiNobleMisfit;
IsUnitSuitableForAiNobleDuel isUnitSuitableForAiNobleDuel;
IsAttackEffectiveAgainstGroup isAttackEffectiveAgainstGroup;
IsAttackBetterThanItemUsage isAttackBetterThanItemUsage;
ComputeAttackDamageCheckAltAttack computeAttackDamageCheckAltAttack;
FillAttackTransformIdList fillAttackTransformIdList;
IsSmallMeleeFighter isSmallMeleeFighter;
CAiHireUnitEval cAiHireUnitEval;
GetMeleeUnitToHireAiRating getMeleeUnitToHireAiRating;
ComputeTargetUnitAiPriority computeTargetUnitAiPriority;
IsPlayerRaceUnplayable isPlayerRaceUnplayable;
IsSupportAttackClass isSupportAttackClass;
GetUnitAttacks getUnitAttacks;
GetItemAttack getItemAttack;
IsUnitUseAdditionalAnimation isUnitUseAdditionalAnimation;
CheckUnitForHire shouldAddUnitToHire;
CheckUnitForHire enableUnitInHireListUi;
CastUnitImplToRacialSoldier castUnitImplToRacialSoldier;
BuildLordSpecificBuildings buildLordSpecificBuildings;
AddCapitalBuilding addCapitalBuilding;
CastUnitImplToLeader castUnitImplToLeader;
GetBaseUnitImplId getBaseUnitImplId;
GetUnitImplDamageMax getUnitImplDamageMax;
ReadGlobalAttacks readGlobalAttacks;
GetAltAttackIdCheckClass getAltAttackIdCheckClass;
UnitHasDoppelgangerAttack unitHasDoppelgangerAttack;
GetDeathAnimationByUnitOrItemId getDeathAnimationByUnitOrItemId;
OemToCharA oemToCharA;
ThrowScenarioException throwScenarioException;
LoadScenarioMap loadScenarioMap;
CreateUnitFaceImage createUnitFaceImage;
CanApplyPotionToUnit canApplyPotionToUnit;
GetUpgradeUnitImplCheckXp getUpgradeUnitImplCheckXp;
ChangeUnitXpCheckUpgrade changeUnitXpCheckUpgrade;
IsUnitTierMax isUnitTierMax;
IsUnitLevelNotMax isUnitLevelNotMax;
IsUnitUpgradePending isUnitUpgradePending;
GetUnitImplIdForIsoUnitImage getUnitImplIdForIsoUnitImage;
GetUnitRequiredBuildings getUnitRequiredBuildings;
ComputeMovementCost computeMovementCost;
GetBuildingStatus getBuildingStatus;
};
/** Global variables used in game. */
struct Variables
{
int* minimapMode; /**< Value of 0 shows minimap, 1 shows percentage of land converted. */
unsigned char* respopup;
};
/** Returns functions according to determined version of the game. */
Functions& gameFunctions();
/** Returns variables according to determined version of the game. */
Variables& gameVariables();
} // namespace game
#endif // GAME_H
| 42,039
|
C++
|
.h
| 749
| 41.205607
| 100
| 0.620864
|
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,585
|
freetask.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/freetask.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 FREETASK_H
#define FREETASK_H
#include "smartptr.h"
#include "task.h"
namespace game {
struct CTaskManager;
struct CInterfManagerImpl;
struct CFreeTask : public ITask
{
CTaskManager* taskManager;
SmartPtr<CInterfManagerImpl> interfManager;
};
} // namespace game
#endif // FREETASK_H
| 1,119
|
C++
|
.h
| 32
| 32.96875
| 72
| 0.77037
|
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,586
|
bordertile.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/bordertile.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 BORDERTILE_H
#define BORDERTILE_H
#include "isoborder.h"
namespace game {
struct CBorderTile : public IIsoBorder
{
void*** imageData;
};
assert_size(CBorderTile, 8);
} // namespace game
#endif // BORDERTILE_H
| 1,040
|
C++
|
.h
| 29
| 33.896552
| 72
| 0.761952
|
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,587
|
netcustomservice.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netcustomservice.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 NETCUSTOMSERVICE_H
#define NETCUSTOMSERVICE_H
#include "lobbycallbacks.h"
#include "mqnetservice.h"
#include "networkpeer.h"
#include "roomscallback.h"
#include <Lobby2Client.h>
#include <Lobby2Message.h>
#include <RakPeerInterface.h>
#include <RoomsPlugin.h>
#include <memory>
#include <string>
namespace hooks {
struct CNetCustomService;
struct CNetCustomSession;
class LobbyPeerCallbacks : public NetworkPeerCallbacks
{
public:
LobbyPeerCallbacks(CNetCustomService* netService)
: netService{netService}
{ }
virtual ~LobbyPeerCallbacks() = default;
void onPacketReceived(DefaultMessageIDTypes type,
SLNet::RakPeerInterface* peer,
const SLNet::Packet* packet) override;
private:
CNetCustomService* netService;
};
struct CNetCustomService : public game::IMqNetService
{
CNetCustomService(NetworkPeer::PeerPtr&& peer);
~CNetCustomService() = default;
std::string loggedAccount;
SLNet::SystemAddress roomOwnerAddress;
/** Interacts with lobby server. */
SLNet::Lobby2Client lobbyClient;
/** Creates network messages. */
SLNet::Lobby2MessageFactory lobbyMsgFactory;
/** Callbacks only for debug logging. */
LoggingCallbacks loggingCallbacks;
/** Interacts with lobby server rooms. */
SLNet::RoomsPlugin roomsClient;
RoomsLoggingCallback roomsLogCallback;
/** Connection with lobby server. */
NetworkPeer lobbyPeer;
LobbyPeerCallbacks callbacks;
CNetCustomSession* session;
};
/** Returns net service if it is present and has type CNetCustomService. */
CNetCustomService* getNetService();
bool createCustomNetService(game::IMqNetService** service);
void addLobbyCallbacks(SLNet::Lobby2Callbacks* callbacks);
void removeLobbyCallbacks(SLNet::Lobby2Callbacks* callbacks);
void addRoomsCallback(SLNet::RoomsCallback* callback);
void removeRoomsCallback(SLNet::RoomsCallback* callback);
/** Returns true if current netService in CMidgard exists and has type CNetCustomService. */
bool isNetServiceCustom();
/** Checks if specified net service is custom. */
bool isNetServiceCustom(const game::IMqNetService* service);
} // namespace hooks
#endif // NETCUSTOMSERVICE_H
| 3,047
|
C++
|
.h
| 79
| 35.240506
| 92
| 0.768735
|
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,588
|
raceset.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/raceset.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 RACESET_H
#define RACESET_H
#include "d2set.h"
#include "racecategory.h"
namespace game {
using RaceSet = Set<LRaceCategory>;
struct RaceSetIterator
{
char unknown[16];
};
namespace RaceSetApi {
struct Api
{
using Clear = void(__thiscall*)(RaceSet* thisptr);
Clear clear;
using Add = RaceSetIterator*(__thiscall*)(RaceSet* thisptr,
RaceSetIterator* iterator,
LRaceCategory* raceCategory);
Add add;
};
Api& get();
} // namespace RaceSetApi
} // namespace game
#endif // RACESET_H
| 1,423
|
C++
|
.h
| 42
| 29.52381
| 75
| 0.704164
|
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,589
|
testconditionhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/testconditionhooks.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 TESTCONDITIONHOOKS_H
#define TESTCONDITIONHOOKS_H
namespace game {
struct ITestCondition;
struct CMidEvCondition;
struct CMidgardID;
} // namespace game
namespace hooks {
// hooks for ITestCondition derived types in game -> testconditionhooks.h
game::ITestCondition* __stdcall createTestConditionHooked(game::CMidEvCondition* eventCondition,
bool samePlayer,
const game::CMidgardID* triggererStackId);
} // namespace hooks
#endif // TESTCONDITIONHOOKS_H
| 1,397
|
C++
|
.h
| 32
| 38.28125
| 100
| 0.721649
|
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,590
|
scenariodataarray.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/scenariodataarray.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 SCENARIODATAARRAY_H
#define SCENARIODATAARRAY_H
#include "d2assert.h"
#include "d2vector.h"
namespace game {
struct ScenarioData;
using ScenarioDataArray = Vector<ScenarioData>;
struct ScenarioDataArrayWrapped
{
bool initialized;
char padding[3];
ScenarioDataArray data;
int maxScenarioFileIndex;
};
assert_size(ScenarioDataArrayWrapped, 24);
namespace ScenarioDataArrayApi {
struct Api
{
/**
* Adds new ScenarioData element to the end of the array.
* @param[in] thisptr pointer to array to add to.
* @param[in] data element to push.
* @returns unknown.
*/
using PushBack = void*(__thiscall*)(ScenarioDataArray* thisptr, const ScenarioData* data);
PushBack pushBack;
/** Returns element at specified index. */
using GetElement = ScenarioData*(__thiscall*)(ScenarioDataArrayWrapped* thisptr, int index);
GetElement getElement;
};
Api& get();
} // namespace ScenarioDataArrayApi
} // namespace game
#endif // SCENARIODATAARRAY_H
| 1,826
|
C++
|
.h
| 52
| 32.269231
| 96
| 0.754545
|
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,591
|
logutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/logutils.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 LOGUTILS_H
#define LOGUTILS_H
#include <string>
namespace game {
struct CMidgardID;
} // namespace game
namespace hooks {
const char* getNetPlayerIdDesc(int netPlayerId);
const char* getMidgardIdTypeDesc(const game::CMidgardID* id);
} // namespace hooks
#endif // LOGUTILS_H
| 1,103
|
C++
|
.h
| 29
| 36.206897
| 72
| 0.771321
|
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,592
|
netsingleplayerhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netsingleplayerhooks.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 NETSINGLEPLAYERHOOKS_H
#define NETSINGLEPLAYERHOOKS_H
namespace game {
struct CNetSinglePlayer;
struct NetMessageHeader;
} // namespace game
namespace hooks {
bool __fastcall netSinglePlayerSendMessageHooked(game::CNetSinglePlayer* thisptr,
int /*%edx*/,
int idTo,
const game::NetMessageHeader* message);
} // namespace hooks
#endif // NETSINGLEPLAYERHOOKS_H
| 1,333
|
C++
|
.h
| 31
| 36.516129
| 88
| 0.693673
|
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,593
|
lordtype.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/lordtype.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 LORDTYPE_H
#define LORDTYPE_H
#include "d2list.h"
#include "d2set.h"
#include "lordcat.h"
#include "midgardid.h"
#include "midobject.h"
#include "textandid.h"
#include <cstddef>
#include <cstdint>
namespace game {
/** Holds information read from GBuiList.dbf. */
struct TLordTypeBuildList
{
CMidgardID lordId;
Set<CMidgardID> data;
};
assert_size(TLordTypeBuildList, 32);
struct LeaderUpgData
{
CMidgardID modifierId;
int leaderLevel;
int priority;
TextAndId name;
TextAndId description;
char unknown[8];
};
assert_size(LeaderUpgData, 36);
assert_offset(LeaderUpgData, name, 12);
assert_offset(LeaderUpgData, description, 20);
/** Holds information read from GLeaUpg.dbf. */
struct CLordLeaderUpg
{
void* vftable;
CMidgardID lordId;
List<LeaderUpgData> upgrades;
};
assert_size(CLordLeaderUpg, 24);
struct TLordTypeData
{
CMidgardID raceId;
TextAndId name;
TextAndId description;
char picture[9];
char padding[3];
TLordTypeBuildList* buildList;
CLordLeaderUpg* leaderUpg;
void* unknown;
LLordCategory lordCategory;
};
assert_size(TLordTypeData, 56);
assert_offset(TLordTypeData, name, 4);
assert_offset(TLordTypeData, description, 12);
assert_offset(TLordTypeData, buildList, 32);
/** Holds information read from GLord.dbf. */
struct TLordType : public IMidObject
{
TLordTypeData* data;
};
assert_size(TLordType, 12);
} // namespace game
#endif // LORDTYPE_H
| 2,278
|
C++
|
.h
| 80
| 26.025
| 72
| 0.760421
|
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,594
|
cmdbattlechooseactionmsg.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/cmdbattlechooseactionmsg.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 CMDBATTLECHOOSEACTIONMSG_H
#define CMDBATTLECHOOSEACTIONMSG_H
#include "battlemsgdata.h"
#include "commandmsg.h"
#include "d2set.h"
namespace game {
struct CCmdBattleChooseActionMsg
: public CCommandMsgTempl<CommandMsgId::BattleChooseAction, CommandMsgParam::Value0>
{
BattleMsgData battleMsgData;
CMidgardID id;
Set<int> list;
CMidgardID id2;
Set<int> list2;
CMidgardID id3;
Set<int> list3;
CMidgardID id4;
Set<int> list4;
};
assert_size(CCmdBattleChooseActionMsg, 4064);
assert_offset(CCmdBattleChooseActionMsg, battleMsgData, 16);
namespace CCmdBattleChooseActionMsgApi {
struct Api
{
using Destructor = void(__thiscall*)(CCmdBattleChooseActionMsg* thisptr);
Destructor destructor;
};
Api& get();
CCommandMsgVftable* vftable();
} // namespace CCmdBattleChooseActionMsgApi
} // namespace game
#endif // CMDBATTLECHOOSEACTIONMSG_H
| 1,713
|
C++
|
.h
| 50
| 31.72
| 88
| 0.777105
|
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,595
|
objectselection.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/objectselection.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 OBJECTSELECTION_H
#define OBJECTSELECTION_H
#include "midgardid.h"
#include "smartptr.h"
namespace game {
struct IMidgardObjectMap;
struct ICanSelect;
struct IMqImage2;
struct ObjectSelectionData
{
IMidgardObjectMap* objectMap;
ICanSelect* canSelect;
CMidgardID playerId;
int unknown;
int unknown2;
int unknown3;
int unknown4;
int unknown5;
int unknown6;
SmartPtr<IMqImage2> selectNoImage;
SmartPtr<IMqImage2> selectYesImage;
};
assert_size(ObjectSelectionData, 52);
} // namespace game
#endif // OBJECTSELECTION_H
| 1,387
|
C++
|
.h
| 43
| 29.651163
| 72
| 0.768713
|
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,596
|
midlandmark.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midlandmark.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 MIDLANDMARK_H
#define MIDLANDMARK_H
#include "mapelement.h"
#include "midgardid.h"
#include "midscenarioobject.h"
#include "stringandid.h"
namespace game {
/** Represents landmark in scenario file and game. */
struct CMidLandmark : public IMidScenarioObject
{
IMapElement mapElement;
CMidgardID landmarkTypeId;
StringAndId description;
};
assert_size(CMidLandmark, 44);
} // namespace game
#endif // MIDLANDMARK_H
| 1,253
|
C++
|
.h
| 35
| 33.771429
| 72
| 0.771263
|
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,597
|
2dengine.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/2dengine.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 C2DENGINE_H
#define C2DENGINE_H
#include "d2assert.h"
#include "mqpoint.h"
namespace game {
struct C2DEngineMapImpl;
struct C2DEngineData
{
C2DEngineMapImpl* engineMapImpl;
CMqPoint textureCoordScreenStart; /**< Top-left screen corner position in texture coordinates */
char unknown[16];
CMqPoint position2;
};
assert_size(C2DEngineData, 36);
struct C2DEngine
{
void* vftable;
C2DEngineData* data;
};
assert_size(C2DEngine, 8);
} // namespace game
#endif // C2DENGINE_H
| 1,324
|
C++
|
.h
| 40
| 30.825
| 100
| 0.764521
|
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,598
|
custombuildingcategories.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/custombuildingcategories.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 CUSTOMBUILDINGCATEGORIES_H
#define CUSTOMBUILDINGCATEGORIES_H
#include "buildingcat.h"
#include <filesystem>
#include <map>
#include <string>
namespace game {
enum class BuildingBranchNumber : int;
} // namespace game
namespace hooks {
struct CustomBuildingCategory : game::LBuildingCategory
{
std::string text;
};
using CustomBuildingCategories = std::map<game::BuildingBranchNumber, CustomBuildingCategory>;
CustomBuildingCategories& getCustomBuildingCategories();
bool addCustomBuildingCategory(const std::filesystem::path& dbfFilePath,
game::BuildingBranchNumber branchNumber,
const char* text);
bool isCustomBuildingCategory(const game::LBuildingCategory* category);
game::BuildingId getCustomBuildingCategoryId(game::BuildingBranchNumber branchNumber);
} // namespace hooks
#endif // CUSTOMBUILDINGCATEGORIES_H
| 1,713
|
C++
|
.h
| 41
| 38.536585
| 94
| 0.773301
|
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,599
|
encunitdescriptor.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/encunitdescriptor.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 ENCUNITDESCRIPTOR_H
#define ENCUNITDESCRIPTOR_H
#include "attackclasscat.h"
#include "attacksourcecat.h"
#include "d2list.h"
#include "d2vector.h"
#include "leaderabilitycat.h"
namespace game {
struct CMidgardID;
struct IEncUnitDescriptorVftable;
struct LAttackReach;
struct LLeaderAbility;
struct TBuildingType;
struct IEncUnitDescriptor
{
const IEncUnitDescriptorVftable* vftable;
};
struct IEncUnitDescriptorVftable
{
using Destructor = void(__thiscall*)(IEncUnitDescriptor* thisptr, bool freeMemory);
Destructor destructor;
using GetBool = bool(__thiscall*)(const IEncUnitDescriptor* thisptr);
GetBool isUnitType;
using GetInt = int(__thiscall*)(const IEncUnitDescriptor* thisptr);
GetInt getHp;
GetInt getHpMax;
using GetId = CMidgardID*(__thiscall*)(const IEncUnitDescriptor* thisptr, CMidgardID* value);
GetId getAttackId;
using GetAttackClass = const LAttackClass*(__thiscall*)(const IEncUnitDescriptor* thisptr);
GetAttackClass getAttackClass;
using GetStr = const char*(__thiscall*)(const IEncUnitDescriptor* thisptr);
GetStr getAttackName;
GetInt getAttackPower;
GetInt getAttackLevel;
using GetAttackSource = const LAttackSource*(__thiscall*)(const IEncUnitDescriptor* thisptr);
GetAttackSource getAttackSource;
using GetAttackReach = const LAttackReach*(__thiscall*)(const IEncUnitDescriptor* thisptr);
GetAttackReach getAttackReach;
GetInt getAttackDamageOrHeal;
GetInt getAttackInitiative;
GetId getAltAttackId;
GetStr getAltAttackName;
GetInt getAltAttackPower;
GetId getAttack2Id;
GetStr getAttack2Name;
GetInt getAttack2Power;
GetBool attacksTwice;
GetInt getLeadership;
GetInt getNbBattle;
GetBool isUnitInStack;
GetInt getMovement;
GetBool isUnitLeader;
GetId getGlobalUnitImplId;
GetStr getUnitName;
GetStr getUnitDescription;
GetInt getUnitLevel;
GetInt getUnitArmor;
GetBool isUnitAtMaxLevel;
GetInt getUnitCurrentXp;
GetInt getUnitXpNext;
GetBool isUnitUpgradePending;
using GetUnitRequiredBuildings = void(__thiscall*)(const IEncUnitDescriptor* thisptr,
Vector<TBuildingType*>* buildings);
GetUnitRequiredBuildings getUnitRequiredBuildings;
GetBool getUnitDynLevel;
GetBool unknownMethod;
GetBool getLeaderFlyAbility;
using GetLeaderAbilities = void(__thiscall*)(const IEncUnitDescriptor* thisptr,
List<LLeaderAbility>* abilities);
GetLeaderAbilities getLeaderAbilities;
using GetAttackClasses = void(__thiscall*)(const IEncUnitDescriptor* thisptr,
List<LAttackClass>* attackClasses);
GetAttackClasses getAttackClassesUnitIsImmuneTo;
using GetAttackSources = void(__thiscall*)(const IEncUnitDescriptor* thisptr,
List<LAttackSource>* attackSources);
GetAttackSources getAttackSourcesUnitIsImmuneTo;
GetAttackClasses getAttackClassesUnitIsResistantTo;
GetAttackSources getAttackSourcesUnitIsResistantTo;
};
assert_vftable_size(IEncUnitDescriptorVftable, 43);
} // namespace game
#endif // ENCUNITDESCRIPTOR_H
| 4,126
|
C++
|
.h
| 100
| 35.36
| 97
| 0.751195
|
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,600
|
interfacechilds.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/interfacechilds.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 INTERFACECHILDS_H
#define INTERFACECHILDS_H
#include "d2assert.h"
#include "d2vector.h"
namespace game {
struct CInterface;
struct CInterfaceChilds
{
void* vftable;
Vector<CInterface*> childs;
};
assert_size(CInterfaceChilds, 20);
} // namespace game
#endif // INTERFACECHILDS_H
| 1,115
|
C++
|
.h
| 32
| 32.8125
| 72
| 0.768372
|
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,601
|
midstreamfile.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midstreamfile.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 MIDSTREAMFILE_H
#define MIDSTREAMFILE_H
#include "midgardstream.h"
namespace game {
struct CMidStreamEnvFile;
/** Implementation of IMidgardStream that works with files. */
struct CMidStreamFile : public IMidgardStream
{
CMidStreamEnvFile* streamEnv;
bool insideRecord;
char padding[3];
};
assert_size(CMidStreamFile, 12);
} // namespace game
#endif // MIDSTREAMFILE_H
| 1,209
|
C++
|
.h
| 33
| 34.515152
| 72
| 0.771404
|
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,602
|
summonhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/summonhooks.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 SUMMONHOOKS_H
#define SUMMONHOOKS_H
namespace game {
struct CBatAttackSummon;
struct IMidgardObjectMap;
struct BattleMsgData;
struct CMidgardID;
struct BattleAttackInfo;
} // namespace game
namespace hooks {
void __fastcall summonAttackOnHitHooked(game::CBatAttackSummon* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* targetUnitId,
game::BattleAttackInfo** attackInfo);
}
#endif // SUMMONHOOKS_H
| 1,489
|
C++
|
.h
| 36
| 34.166667
| 77
| 0.679337
|
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,603
|
factoryimageanim.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/factoryimageanim.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 FACTORYIMAGEANIM_H
#define FACTORYIMAGEANIM_H
#include "d2vector.h"
#include "imgfactory.h"
#include "mqanimation.h"
#include "smartptr.h"
#include <cstddef>
namespace game {
struct CMqPresentationManager;
struct FactoryImageAnim
: public CImgFactory::Image
, public IMqAnimation
{
SmartPtr<CMqPresentationManager> presentationMgr;
Vector<IMqImage2*> frames;
int currentFrame;
char unknown;
char padding[3];
};
assert_size(FactoryImageAnim, 40);
assert_offset(FactoryImageAnim, presentationMgr, 8);
} // namespace game
#endif // FACTORYIMAGEANIM_H
| 1,404
|
C++
|
.h
| 41
| 31.95122
| 72
| 0.772694
|
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,604
|
racelist.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/racelist.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 RACELIST_H
#define RACELIST_H
#include "d2list.h"
#include "racecategory.h"
namespace game {
using RaceCategoryList = List<LRaceCategory>;
using RaceCategoryListNode = ListNode<LRaceCategory>;
namespace RaceCategoryListApi {
struct Api
{
/** Constructs an empty list. */
using Constructor = RaceCategoryList*(__thiscall*)(RaceCategoryList* thisptr);
Constructor constructor;
/** Copy constructs list from 'other'. */
using CopyConstructor = RaceCategoryList*(__thiscall*)(RaceCategoryList* thisptr,
const RaceCategoryList* other);
CopyConstructor copyConstructor;
/** Frees memory allocated for list nodes. */
using FreeNodes = void(__thiscall*)(RaceCategoryList* thisptr);
FreeNodes freeNodes;
/** Frees memory allocated for specified node. */
using FreeNode = void(__thiscall*)(RaceCategoryList* thisptr, RaceCategoryListNode* node);
FreeNode freeNode;
/** Adds race category to the list. */
using Add = void(__thiscall*)(RaceCategoryList* thisptr, const LRaceCategory* race);
Add add;
/** Returns list with playable race categories. */
using GetPlayableRaces = RaceCategoryList*(__stdcall*)(RaceCategoryList* races);
GetPlayableRaces getPlayableRaces;
};
Api& get();
} // namespace RaceCategoryListApi
} // namespace game
#endif // RACELIST_H
| 2,212
|
C++
|
.h
| 52
| 38.403846
| 94
| 0.732867
|
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,605
|
mideveffect.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mideveffect.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 MIDEVEFFECT_H
#define MIDEVEFFECT_H
#include "eventeffectcat.h"
#include "midgardid.h"
namespace game {
struct CMidEvEffectVftable;
struct IMidgardObjectMap;
struct IMidgardStream;
struct IMidgardStreamEnv;
struct String;
/** Base class for all event effects. */
struct CMidEvEffect
{
CMidEvEffectVftable* vftable;
CMidgardID eventId;
int sequenceNumber; /**< Determines effects apply order. */
LEventEffectCategory category;
};
struct CMidEvEffectVftable
{
using Destructor = void(__thiscall*)(CMidEvEffect* thisptr, char flags);
Destructor destructor;
/** Returns true if id used by event effect equals to the objectId specified. */
using IsIdsEqual = bool(__thiscall*)(const CMidEvEffect* thisptr, const CMidgardID* objectId);
IsIdsEqual isIdsEqual;
/** Returns true if effect is valid: refers to existing scenario objects. */
using IsValid = bool(__thiscall*)(const CMidEvEffect* thisptr,
const IMidgardObjectMap* objectMap);
IsValid isValid;
using Method3 = bool(__thiscall*)(const CMidEvEffect* thisptr, int a2);
Method3 method3;
/** Serializes event effect. */
using Stream = void(__thiscall*)(CMidEvEffect* thisptr,
IMidgardStreamEnv* streamEnv,
IMidgardStream** stream);
Stream stream;
};
assert_vftable_size(CMidEvEffectVftable, 5);
namespace CMidEvEffectApi {
struct Api
{
using CreateFromCategory = CMidEvEffect*(__stdcall*)(const CMidgardID* eventId,
const LEventEffectCategory* category);
CreateFromCategory createFromCategory;
/**
* Returns string with current effect settings to show in effects list box.
* Used in Scenario Editor only.
*/
using GetInfoString = void(__stdcall*)(String* info,
const IMidgardObjectMap* objectMap,
const CMidEvEffect* eventEffect);
GetInfoString getInfoString;
using GetDescription = void(__stdcall*)(String* description,
const LEventEffectCategory* category);
/**
* Returns brief effect description by specified category
* Used in Scenario Editor only.
*/
GetDescription getBrief;
/**
* Returns full effect description by specified category
* Used in Scenario Editor only.
*/
GetDescription getDescription;
};
Api& get();
} // namespace CMidEvEffectApi
} // namespace game
#endif // MIDEVEFFECT_H
| 3,439
|
C++
|
.h
| 87
| 32.885057
| 98
| 0.687988
|
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,606
|
eventeffectcathooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/eventeffectcathooks.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 EVENTEFFECTCATHOOKS_H
#define EVENTEFFECTCATHOOKS_H
#include "eventeffectcat.h"
#include "midgardid.h"
namespace hooks {
struct CustomEventEffect
{
game::LEventEffectCategory category{nullptr, nullptr, game::EventEffectId{-1}};
game::CMidgardID infoText{};
game::CMidgardID brief{};
game::CMidgardID description{};
};
struct CustomEventEffects
{ };
CustomEventEffects& customEventEffects();
game::LEventEffectCategoryTable* __fastcall eventEffectCategoryTableCtorHooked(
game::LEventEffectCategoryTable* thisptr,
int /*%edx*/,
const char* globalsFolderPath,
void* codeBaseEnvProxy);
} // namespace hooks
#endif // EVENTEFFECTCATHOOKS_H
| 1,497
|
C++
|
.h
| 40
| 34.975
| 83
| 0.773481
|
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,607
|
drainattackhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/drainattackhooks.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 DRAINATTACKHOOKS_H
#define DRAINATTACKHOOKS_H
namespace game {
struct CBatAttackDrain;
struct IMidgardObjectMap;
struct BattleMsgData;
struct CMidgardID;
struct BattleAttackInfo;
struct CBatAttackDrainOverflow;
} // namespace game
namespace hooks {
void __fastcall drainAttackOnHitHooked(game::CBatAttackDrain* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* unitId,
game::BattleAttackInfo** attackInfo);
void __fastcall drainOverflowAttackOnHitHooked(game::CBatAttackDrainOverflow* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* unitId,
game::BattleAttackInfo** attackInfo);
} // namespace hooks
#endif // DRAINATTACKHOOKS_H
| 2,014
|
C++
|
.h
| 43
| 35.27907
| 86
| 0.623218
|
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,608
|
image2fill.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/image2fill.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 IMAGE2FILL_H
#define IMAGE2FILL_H
#include "d2color.h"
#include "mqimage2surface16.h"
namespace game {
/** Renders rectangular region filled with a single color. */
struct CImage2Fill : public CMqImage2Surface16
{
Color color;
CMqPoint size;
};
assert_size(CImage2Fill, 56);
namespace CImage2FillApi {
struct Api
{
using Constructor = CImage2Fill*(__thiscall*)(CImage2Fill* thisptr,
std::uint32_t width,
std::uint32_t height);
Constructor constructor;
using SetColor = void(__thiscall*)(CImage2Fill* thisptr, const Color* color);
SetColor setColor;
};
Api& get();
} // namespace CImage2FillApi
} // namespace game
#endif // IMAGE2FILL_H
| 1,593
|
C++
|
.h
| 44
| 31.727273
| 81
| 0.711126
|
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,609
|
menunewskirmishmultihooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menunewskirmishmultihooks.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 MENUNEWSKIRMISHMULTIHOOKS_H
#define MENUNEWSKIRMISHMULTIHOOKS_H
namespace game {
struct CMenuNewSkirmishMulti;
struct CMenuPhase;
} // namespace game
namespace hooks {
bool __fastcall menuNewSkirmishMultiCreateServerHooked(game::CMenuNewSkirmishMulti* thisptr,
int /*%edx*/);
game::CMenuNewSkirmishMulti* __fastcall menuNewSkirmishMultiCtorHooked(
game::CMenuNewSkirmishMulti* thisptr,
int /*%edx*/,
game::CMenuPhase* menuPhase);
} // namespace hooks
#endif // MENUNEWSKIRMISHMULTIHOOKS_H
| 1,383
|
C++
|
.h
| 33
| 38.151515
| 92
| 0.750558
|
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,610
|
mqrect.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqrect.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 MQRECT_H
#define MQRECT_H
#include "d2assert.h"
namespace game {
struct CMqPoint;
struct CMqRect
{
int left;
int top;
int right;
int bottom;
};
assert_size(CMqRect, 16);
namespace MqRectApi {
struct Api
{
using Constructor = CMqRect*(__thiscall*)(CMqRect* thisptr);
Constructor constructor;
using PtInRect = bool(__thiscall*)(const CMqRect* thisptr, const CMqPoint* pt);
PtInRect ptInRect;
using GetCenter = CMqPoint*(__thiscall*)(const CMqRect* thisptr, CMqPoint* value);
GetCenter getCenter;
};
Api& get();
} // namespace MqRectApi
} // namespace game
#endif // MQRECT_H
| 1,447
|
C++
|
.h
| 45
| 29.577778
| 86
| 0.744236
|
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,611
|
togglebutton.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/togglebutton.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 TOGGLEBUTTON_H
#define TOGGLEBUTTON_H
#include "interface.h"
#include "smartptr.h"
namespace game {
struct CToggleButtonVftable;
struct CDialogInterf;
struct CToggleButtonData
{
int buttonChildIndex;
bool checked;
char padding[3];
SmartPointer ptr;
SmartPointer ptrArray[7];
};
assert_size(CToggleButtonData, 72);
/**
* Toggle button ui element.
* Represents TOGGLE from Interf.dlg or ScenEdit.dlg files.
*/
struct CToggleButton : public CInterfaceT<CToggleButtonVftable>
{
CToggleButtonData* data;
};
assert_size(CToggleButton, 12);
struct CToggleButtonVftable : public CInterfaceVftable
{
void* method34;
using SetEnabled = void(__thiscall*)(CToggleButton* thisptr, bool value);
SetEnabled setEnabled;
void* method36;
void* method37;
};
assert_vftable_size(CToggleButtonVftable, 38);
assert_offset(CToggleButtonVftable, setEnabled, 140);
namespace CToggleButtonApi {
struct Api
{
using SetChecked = void(__thiscall*)(CToggleButton* thisptr, bool checked);
SetChecked setChecked;
using AssignFunctor = CToggleButton*(__stdcall*)(CDialogInterf* dialog,
const char* buttonName,
const char* dialogName,
SmartPointer* functor,
int hotkey);
AssignFunctor assignFunctor;
};
Api& get();
} // namespace CToggleButtonApi
} // namespace game
#endif // TOGGLEBUTTON_H
| 2,372
|
C++
|
.h
| 69
| 28.869565
| 79
| 0.700963
|
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,612
|
tileprefixes.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/tileprefixes.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 TILEPREFIXES_H
#define TILEPREFIXES_H
#include <cstdint>
namespace game {
/** Used to convert between tile name prefixes and vice versa. */
enum class TilePrefix : std::uint32_t
{
Water, /**< WA */
Neutral, /**< NE */
Human, /**< HU */
Heretic, /**< HE */
Dwarf, /**< DW */
Undead, /**< UN */
Black, /**< BL */
Elf, /**< EL */
};
namespace TilePrefixApi {
struct Api
{
/** Returns tile prefix number by tile prefix name. */
using GetTilePrefixByName = TilePrefix(__stdcall*)(const char* tileNamePrefix);
GetTilePrefixByName getTilePrefixByName;
/** Returns tile prefix name by tile prefix number. */
using GetTilePrefixName = const char*(__stdcall*)(TilePrefix tilePrefix);
GetTilePrefixName getTilePrefixName;
};
Api& get();
} // namespace TilePrefixApi
} // namespace game
#endif // TILEPREFIXES_H
| 1,700
|
C++
|
.h
| 48
| 32.666667
| 83
| 0.711152
|
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,613
|
midunitgroup.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midunitgroup.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 MIDUNITGROUP_H
#define MIDUNITGROUP_H
#include "idlist.h"
#include "idvector.h"
#include "unitpositionmap.h"
namespace game {
struct CMidUnitGroupVftable;
struct IMidgardObjectMap;
struct CFortification;
struct CVisitorAddUnitToGroup;
/** Represents group of 6 units in game. */
struct CMidUnitGroup
{
const CMidUnitGroupVftable* vftable;
IdVector units;
CMidgardID positions[6];
/**
* Maximum number of units that can be added to the group.
* Value of -1 disables restriction.
* Does not work properly with units hire and used only for summon attacks logic.
*/
int maxUnitsAllowed;
CFortification* city;
};
struct CMidUnitGroupVftable
{
using Destructor = void(__thiscall*)(CMidUnitGroup* thisptr, char flags);
Destructor destructor;
using AddLeader = bool(__thiscall*)(CMidUnitGroup* thisptr,
const CMidgardID* unitId,
int position,
const IMidgardObjectMap* objectMap);
AddLeader addLeader;
using RemoveAllUnits = bool(__thiscall*)(CMidUnitGroup* thisptr,
const CMidgardID* groupId,
const IMidgardObjectMap* objectMap);
RemoveAllUnits removeAllUnits;
using Stream = void(__thiscall*)(CMidUnitGroup* thisptr, int a2, const CMidgardID* groupId);
Stream stream;
void* methods[2];
using AddUnit = bool(__thiscall*)(CMidUnitGroup* thisptr,
const CVisitorAddUnitToGroup* visitor,
const CMidgardID* unitId,
int position,
const IMidgardObjectMap* objectMap);
AddUnit addUnit;
using RemoveUnit = bool(__thiscall*)(CMidUnitGroup* thisptr,
CVisitorAddUnitToGroup* visitor,
const CMidgardID* unitId,
const IMidgardObjectMap* objectMap);
RemoveUnit removeUnit;
void* methods2[2];
};
assert_vftable_size(CMidUnitGroupVftable, 10);
namespace CMidUnitGroupApi {
struct Api
{
using GetUnitId = CMidgardID*(__thiscall*)(const CMidUnitGroup* thisptr, int index);
GetUnitId getUnitId;
/** Returns unit position in group, or -1 if unit not found. */
using GetUnitPosition = int(__thiscall*)(const CMidUnitGroup* thisptr,
const CMidgardID* unitId);
GetUnitPosition getUnitPosition;
/** Returns unit id by specified position in group, or emptyId in case of wrong position. */
using GetUnitIdByPosition = const CMidgardID*(__thiscall*)(const CMidUnitGroup* thisptr,
int position);
GetUnitIdByPosition getUnitIdByPosition;
using AddUnitIdsAvailableForSummons = void(__stdcall*)(IdList* value,
const IMidgardObjectMap* objectMap,
const CMidUnitGroup* group);
AddUnitIdsAvailableForSummons addUnitIdsAvailableForSummons;
using UnknownFunction = void(__stdcall*)(CMidUnitGroup* group1,
CMidUnitGroup* group2,
UnitPositionMap* positions);
UnknownFunction unknownFunction;
/** Returns number of units in group. */
using GetUnitsCount = int(__thiscall*)(const CMidUnitGroup* group);
GetUnitsCount getUnitsCount;
};
Api& get();
} // namespace CMidUnitGroupApi
} // namespace game
#endif // MIDUNITGROUP_H
| 4,581
|
C++
|
.h
| 101
| 34.425743
| 96
| 0.63165
|
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,614
|
twospeedanimator.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/twospeedanimator.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 TWOSPEEDANIMATOR_H
#define TWOSPEEDANIMATOR_H
#include "d2assert.h"
#include "mqanimation.h"
#include "smartptr.h"
namespace game {
struct CMqPresentationManager;
struct CTwoSpeedAnimator : public IMqAnimation
{
struct ITwoSpeedAnimationVftable;
struct ITwoSpeedAnimation
{
ITwoSpeedAnimationVftable* vftable;
};
bool fastAnimation;
char padding[3];
SmartPtr<CMqPresentationManager> presentationMgr;
ITwoSpeedAnimation* twoSpeedAnimation;
};
assert_size(CTwoSpeedAnimator, 20);
// Virtual table does not contain destructor
struct CTwoSpeedAnimator::ITwoSpeedAnimationVftable
{
/** Updates animations by a single frame. */
using Update = void(__thiscall*)(CTwoSpeedAnimator::ITwoSpeedAnimation* thisptr,
bool smoothScroll);
Update update;
};
assert_vftable_size(CTwoSpeedAnimator::ITwoSpeedAnimationVftable, 1);
} // namespace game
#endif // TWOSPEEDANIMATOR_H
| 1,781
|
C++
|
.h
| 49
| 32.938776
| 84
| 0.762209
|
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,615
|
mqrasterizer.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqrasterizer.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 MQRASTERIZER_H
#define MQRASTERIZER_H
#include "d2assert.h"
#include <cstdint>
#include <windows.h>
struct IDirectDrawSurface7;
struct IDirectDrawPalette;
namespace game {
struct IMqRasterizerVftable;
struct DisplaySettings;
struct CMqPoint;
struct SurfaceDecompressData;
struct CMqRect;
struct IMqRasterizer
{
struct SurfaceDecompVftable;
struct SurfaceDecomp
{
SurfaceDecompVftable* vftable;
};
IMqRasterizerVftable* vftable;
};
struct IMqRasterizer::SurfaceDecompVftable
{
using Destructor = void(__thiscall*)(IMqRasterizer::SurfaceDecomp* thisptr, char flags);
Destructor destructor;
using GetData = SurfaceDecompressData*(__thiscall*)(IMqRasterizer::SurfaceDecomp* thisptr);
GetData getData;
};
assert_vftable_size(IMqRasterizer::SurfaceDecompVftable, 2);
struct IMqRasterizerVftable
{
using Destructor = void(__thiscall*)(IMqRasterizer* thisptr, char flags);
Destructor destructor;
/** Returns true if specified display settings can be applied. */
using IsSettingsSupported = bool(__thiscall*)(const IMqRasterizer* thisptr,
const DisplaySettings* displaySettings);
IsSettingsSupported isSettingsSupported;
/**
* Initializes rasterizer surfaces using provided display settings.
* @returns true if initialization was successfull.
*/
using InitializeSurfaces = bool(__thiscall*)(IMqRasterizer* thisptr,
DisplaySettings* displaySettings);
InitializeSurfaces initializeSurfaces;
/** Returns current display settings. */
using GetDisplaySettings = DisplaySettings*(__thiscall*)(const IMqRasterizer* thisptr,
DisplaySettings* displaySettings);
GetDisplaySettings getDisplaySettings;
using Method4 = void*(__thiscall*)(IMqRasterizer* thisptr, void* a2);
Method4 method4;
/** Returns size of screen surface. */
using GetScreenSurfaceSize = CMqPoint*(__thiscall*)(const IMqRasterizer* thisptr,
CMqPoint* screenSurfaceSize);
GetScreenSurfaceSize getScreenSurfaceSize;
/** Assumption: notifies rasterizer that scaling of specified area has started. */
using StartScaling = void(__thiscall*)(IMqRasterizer* thisptr,
const CMqRect* area,
const CMqPoint* position);
StartScaling startScaling;
/** Assumption: notifies rasterizer that scaling has ended. */
using EndScaling = void(__thiscall*)(IMqRasterizer* thisptr);
EndScaling endScaling;
/**
* Returns true if rasterizer can perform image scaling.
* It means that startScaling and endScaling methods are implemented.
* CDisplayD3D returns its member value while CDisplayDDraw always returns false.
*/
using IsScalingSupported = bool(__thiscall*)(const IMqRasterizer* thisptr);
IsScalingSupported isScalingSupported;
/** Returns true if game is in fullscreen mode. */
using IsFullscreen = bool(__thiscall*)(const IMqRasterizer* thisptr);
IsFullscreen isFullscreen;
/** Calls IDirectDraw7::FlipToGDISurface. */
using FlipToGDISurface = void(__thiscall*)(IMqRasterizer* thisptr);
FlipToGDISurface flipToGDISurface;
/** Performs a bit block transfer, calls IDirectDrawSurface7::Blt. */
using Blit = void(__thiscall*)(IMqRasterizer* thisptr);
Blit blit;
/** Calls IDirectDrawSurface7::Flip. */
using SwapBuffers = void(__thiscall*)(IMqRasterizer* thisptr);
SwapBuffers swapBuffers;
using SetBool = bool(__thiscall*)(IMqRasterizer* thisptr, bool value);
SetBool setUnknown;
SetBool setLowAlpha;
using Method15 = bool(__thiscall*)(IMqRasterizer* thisptr);
Method15 method15;
using AlphaBlend = void(__thiscall*)(IMqRasterizer* thisptr,
IDirectDrawSurface7* srcSurface,
CMqPoint* a9,
CMqPoint* dstPosition,
CMqPoint* a10,
int opacity);
AlphaBlend alphaBlend;
/** Assumption: returns maximum dimensions the surface (image) can use in the game. */
using GetMaxSurfaceSize = CMqPoint*(__thiscall*)(IMqRasterizer* thisptr, CMqPoint* size);
GetMaxSurfaceSize getMaxSurfaceSize;
using CreateSurfaceDecomp =
IMqRasterizer::SurfaceDecomp*(__thiscall*)(IMqRasterizer* thisptr,
IMqRasterizer::SurfaceDecomp** surfaceDecomp,
IDirectDrawPalette* palette,
CMqPoint* textureSize,
int maybeBitsPerPixel);
CreateSurfaceDecomp createSurfaceDecomp;
/**
* Calls IDirectDraw7::CreateSurface with DDSCAPS_OFFSCREENPLAIN description flag.
* @param[in] hintPtr used only by CDisplayD3D to create dynamic (DDSCAPS2_HINTDYNAMIC)
* or static (DDSCAPS2_HINTSTATIC) surfaces. Dynamic surface created when hint value is 2.
*/
using CreateOffscreenSurface = void(__thiscall*)(IMqRasterizer* thisptr,
IDirectDrawSurface7** surface,
CMqPoint* size,
std::uint32_t* hintPtr,
std::uint16_t opacity,
char a6);
CreateOffscreenSurface createOffscreenSurface;
void* method20;
using GetScreenSurfaceColorBitMask = void(__thiscall*)(IMqRasterizer* thisptr,
std::uint32_t* rBitMask,
std::uint32_t* gBitMask,
std::uint32_t* bBitMask,
std::uint32_t* alphaBitMask);
GetScreenSurfaceColorBitMask getScreenSurfaceColorBitMask;
/** Calls IDirectDraw7::CreatePalette with DDPCAPS_8BIT flag. */
using CreatePalette = void(__thiscall*)(IMqRasterizer* thisptr,
IDirectDrawPalette** palette,
PALETTEENTRY* paletteEntries);
CreatePalette createPalette;
/**
* Blits screen surface inside 'area' onto offscreen surface,
* copies screen surface color key into offscreen surface
* and calls (if opacity is 300 or 400) CColorConversion::IImpl::doubleLighter
* using offscreen surface.
* @returns true if there were no errors
*/
using DoubleLighter = bool(__thiscall*)(IMqRasterizer* thisptr,
IDirectDrawSurface7* offscreenSurface,
const CMqRect* area,
std::uint16_t opacity);
DoubleLighter doubleLighter;
using Method24 = void(__thiscall*)(IMqRasterizer* thisptr, int a2, unsigned int a3, int a4);
Method24 method24;
using Method25 = bool(__thiscall*)(IMqRasterizer* thisptr, int a2);
Method25 method25;
};
assert_vftable_size(IMqRasterizerVftable, 26);
} // namespace game
#endif // MQRASTERIZER_H
| 8,365
|
C++
|
.h
| 166
| 38.03012
| 96
| 0.629857
|
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,616
|
middropsourceext.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/middropsourceext.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 MIDDROPSOURCEEXT_H
#define MIDDROPSOURCEEXT_H
namespace game {
struct IMidDropSourceExtVftable;
struct IMidDropSourceExt
{
IMidDropSourceExtVftable* vftable;
};
} // namespace game
#endif // MIDDROPSOURCEEXT_H
| 1,040
|
C++
|
.h
| 28
| 35.178571
| 72
| 0.777336
|
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,617
|
midserverlogichooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midserverlogichooks.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 MIDSERVERLOGICHOOKS_H
#define MIDSERVERLOGICHOOKS_H
#include "d2set.h"
namespace game {
struct IMidMsgSender;
struct CMidServerLogic;
struct CMidgardID;
} // namespace game
namespace hooks {
bool __fastcall midServerLogicSendObjectsChangesHooked(game::IMidMsgSender* thisptr, int /*%edx*/);
bool __fastcall midServerLogicSendRefreshInfoHooked(const game::CMidServerLogic* thisptr,
int /*%edx*/,
const game::Set<game::CMidgardID>* objectsList,
std::uint32_t playerNetId);
} // namespace hooks
#endif // MIDSERVERLOGICHOOKS_H
| 1,509
|
C++
|
.h
| 34
| 38.058824
| 99
| 0.700068
|
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,618
|
stringintlist.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/stringintlist.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 STRINGINTLIST_H
#define STRINGINTLIST_H
#include "d2list.h"
#include "d2pair.h"
#include "d2string.h"
namespace game {
using StringIntList = List<Pair<String, int>>;
namespace StringIntListApi {
struct Api
{
using Constructor = StringIntList*(__thiscall*)(StringIntList* thisptr);
Constructor constructor;
using Destructor = void(__thiscall*)(StringIntList* thisptr);
Destructor destructor;
};
Api& get();
} // namespace StringIntListApi
} // namespace game
#endif // STRINGINTLIST_H
| 1,331
|
C++
|
.h
| 37
| 33.783784
| 76
| 0.763055
|
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,619
|
mqimage2.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqimage2.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 MQIMAGE2_H
#define MQIMAGE2_H
#include "d2assert.h"
#include <cstdint>
namespace game {
struct IMqImage2Vftable;
struct CMqPoint;
struct CMqRect;
struct IMqRenderer2;
template <typename T>
struct IMqImage2T
{
T* vftable;
};
/** Assumption: base class for all images. */
struct IMqImage2 : public IMqImage2T<IMqImage2Vftable>
{ };
struct IMqImage2Vftable
{
using Destructor = void(__thiscall*)(IMqImage2* thisptr, char flags);
Destructor destructor;
/** Returns image dimensions as CMqPoint(width, height). */
using GetSize = CMqPoint*(__thiscall*)(const IMqImage2* thisptr, CMqPoint* size);
GetSize getSize;
/** Sets current image index. */
using SetImageIndex = std::uint32_t(__thiscall*)(IMqImage2* thisptr, std::uint32_t imageIndex);
SetImageIndex setImageIndex;
/** Returns current image index. */
using GetImageIndex = std::uint32_t(__thiscall*)(const IMqImage2* thisptr);
GetImageIndex getImageIndex;
/**
* Returns number of images depending on context.
* For animation related derived types, returns number of frames.
* For multi-layered images returns number of layers.
* For common images returns 1.
*/
using GetImagesCount = std::uint32_t(__thiscall*)(const IMqImage2* thisptr);
GetImagesCount getImagesCount;
/** Assumtion: renders image in CMqRect(start + offset, size) area. */
using Render = void(__thiscall*)(const IMqImage2* thisptr,
IMqRenderer2* renderer,
const CMqPoint* start,
const CMqPoint* offset,
const CMqPoint* size,
const CMqRect* area);
Render render;
using SetUnknown = void(__thiscall*)(IMqImage2* thisptr);
SetUnknown setUnknown;
using ResetUnknown = void(__thiscall*)(IMqImage2* thisptr);
ResetUnknown resetUnknown;
using Method8 = int(__thiscall*)(IMqImage2* thisptr);
Method8 method8;
};
assert_vftable_size(IMqImage2Vftable, 9);
} // namespace game
#endif // MQIMAGE2_H
| 2,949
|
C++
|
.h
| 74
| 34.243243
| 99
| 0.694435
|
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,620
|
midscenvariables.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midscenvariables.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 MIDSCENVARIABLES_H
#define MIDSCENVARIABLES_H
#include "d2map.h"
#include "midgardid.h"
#include "midscenarioobject.h"
namespace game {
struct ScenarioVariableData
{
char name[36];
int value;
};
assert_size(ScenarioVariableData, 40);
/**
* Holds variables information in scenario file and game.
* Scenario variables used in events logic.
*/
struct CMidScenVariables : public IMidScenarioObject
{
int unknown;
Map<int, ScenarioVariableData> variables;
};
assert_size(CMidScenVariables, 40);
using ScenarioVariable = Pair<int, ScenarioVariableData>;
namespace CMidScenVariablesApi {
struct Api
{
/**
* Returns scenario variable data by its id.
* @returns pointer to empty scenario variable data in case of wrong id.
*/
using FindById = ScenarioVariableData*(__thiscall*)(const CMidScenVariables* thisptr,
int variableId);
FindById findById;
};
Api& get();
} // namespace CMidScenVariablesApi
} // namespace game
#endif // MIDSCENVARIABLES_H
| 1,875
|
C++
|
.h
| 56
| 30.107143
| 89
| 0.742382
|
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,621
|
netdplaysessenum.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netdplaysessenum.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 NETDPLAYSESSENUM_H
#define NETDPLAYSESSENUM_H
#include "d2string.h"
#include "mqnetsessenum.h"
#include <guiddef.h>
namespace game {
struct CNetDPlayService;
/** Common session info wrapper for Direct Play. */
struct CNetDPlaySessEnum : public IMqNetSessEnum
{
CNetDPlayService* service;
GUID instanceGuid;
GUID appGuid;
String sessionName;
int playersCount;
int maxPlayers;
bool requiresPassword;
char padding[3];
};
assert_size(CNetDPlaySessEnum, 68);
} // namespace game
#endif // NETDPLAYSESSENUM_H
| 1,363
|
C++
|
.h
| 40
| 31.65
| 72
| 0.76654
|
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,622
|
midgardmapfog.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midgardmapfog.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 MIDGARDMAPFOG_H
#define MIDGARDMAPFOG_H
#include "d2pair.h"
#include "midscenarioobject.h"
#include "mqpoint.h"
#include <cstddef>
#include <cstdint>
namespace game {
/** Holds player's fog of war related data in scenario file and game. */
struct CMidgardMapFog : public IMidScenarioObject
{
std::uint32_t mapSize;
Pair<std::size_t, void*> fogCells;
};
assert_size(CMidgardMapFog, 20);
namespace CMidgardMapFogApi {
struct Api
{
/**
* Returns fog of war at specified map position.
* @param[in] thisptr map fog object
* @param[out] fog pointer where to store fog result
* @param[in] mapPosition position of a tile to check fog at
* @returns true on success. It means fog pointer contains actual data
*/
using GetFog = bool(__thiscall*)(const CMidgardMapFog* thisptr,
bool* fog,
const CMqPoint* mapPosition);
GetFog getFog;
};
Api& get();
} // namespace CMidgardMapFogApi
} // namespace game
#endif // MIDGARDMAPFOG_H
| 1,872
|
C++
|
.h
| 52
| 32.057692
| 74
| 0.716261
|
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.