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,623
|
midunit.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midunit.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 MIDUNIT_H
#define MIDUNIT_H
#include "d2assert.h"
#include "idlist.h"
#include "midgardid.h"
#include "midscenarioobject.h"
#include "stringandid.h"
#include <cstddef>
namespace game {
struct IUsUnit;
struct CScenarioVisitor;
struct CMidUnitVftable;
struct IMidgardStream;
/** Holds unit related data in scenario file and game. */
struct CMidUnit : public IMidScenarioObject
{
int creation;
StringAndId name;
bool dynLevel;
char padding[3];
IUsUnit* unitImpl;
int currentHp;
int currentXp;
bool transformed;
char padding2[3];
CMidgardID origTypeId;
bool keepHp;
char padding3[3];
int hpBefore;
int hpBefMax;
int origXp;
IdList origModifiers;
};
assert_size(CMidUnit, 80);
assert_offset(CMidUnit, dynLevel, 24);
assert_offset(CMidUnit, origTypeId, 44);
assert_offset(CMidUnit, origXp, 60);
struct CMidUnitVftable : IMidScenarioObjectVftable
{
/**
* Called by server when new unit is created.
* Used in CreateUnit, CVisitorChangeStackLeader::Apply and CVisitorAddUnitToGroup::Apply.
*/
using InitWithSoldierImpl = bool(__thiscall*)(CMidUnit* thisptr,
const IMidgardObjectMap* objectMap,
const CMidgardID* unitImplId,
const int* turn);
InitWithSoldierImpl initWithSoldierImpl;
/**
* Called by server when unit is removed. Calls RemoveModifiers and sets unitImpl to null.
* Used in CVisitorChangeStackLeader::Apply and CVisitorRmvUnitFromGroup::Apply.
* Not actually a finalize method as it is not called every time a unit instance is destroyed.
* Destructor also calls RemoveModifiers on its own.
*/
using RemoveUnitImpl = bool(__thiscall*)(CMidUnit* thisptr, int a2);
RemoveUnitImpl removeUnitImpl;
};
assert_vftable_size(CMidUnitVftable, 6);
namespace CMidUnitApi {
struct Api
{
using AddRemoveModifier = bool(__thiscall*)(CMidUnit* thisptr, const CMidgardID* modifierId);
AddRemoveModifier addModifier;
AddRemoveModifier removeModifier;
using GetHpMax = int(__thiscall*)(const CMidUnit* thisptr);
GetHpMax getHpMax;
using Upgrade = bool(__thiscall*)(CMidUnit* thisptr,
const CScenarioVisitor* visitor,
const CMidgardID* upgradeImplId);
Upgrade upgrade;
using Transform = bool(__thiscall*)(CMidUnit* thisptr,
const CScenarioVisitor* visitor,
const IMidgardObjectMap* objectMap,
const CMidgardID* transformImplId,
bool keepHp);
Transform transform;
using Untransform = bool(__thiscall*)(CMidUnit* thisptr, const CScenarioVisitor* visitor);
Untransform untransform;
using GetModifiers = bool(__stdcall*)(IdList* value, const CMidUnit* unit);
GetModifiers getModifiers;
using AddModifiers = bool(__stdcall*)(const IdList* value,
CMidUnit* unit,
char* errorBuffer,
bool skipInapplicable);
AddModifiers addModifiers;
using RemoveModifiers = bool(__stdcall*)(IUsUnit** unitImpl);
RemoveModifiers removeModifiers;
using ReplaceImpl = bool(__stdcall*)(IUsUnit** unitImpl, IUsUnit* value);
ReplaceImpl replaceImpl;
using StreamImpl = void(__stdcall*)(IMidgardStream** stream, IUsUnit** value);
StreamImpl streamImpl;
using StreamModifiers = void(__stdcall*)(IMidgardStream** stream,
const CMidgardID* unitId,
CMidUnit* unit);
StreamModifiers streamModifiers;
using StreamImplIdAndLevel = void(__stdcall*)(IMidgardStream** stream,
CMidgardID* unitImplId,
const char* idName,
const char* levelName);
StreamImplIdAndLevel streamImplIdAndLevel;
};
Api& get();
CMidUnitVftable* vftable();
} // namespace CMidUnitApi
} // namespace game
#endif // MIDUNIT_H
| 5,169
|
C++
|
.h
| 124
| 32.419355
| 98
| 0.647797
|
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,624
|
battlemsgdata.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/battlemsgdata.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 BATTLEMSGDATA_H
#define BATTLEMSGDATA_H
#include "idlist.h"
#include "targetset.h"
#include "unitinfolist.h"
#include <cstddef>
#include <cstdint>
namespace game {
struct IMidgardObjectMap;
struct IAttack;
struct IBatAttack;
struct LAttackSource;
struct LAttackClass;
struct LAttackReach;
struct CMidUnitGroup;
struct String;
/** Unit statuses in battle. */
enum class BattleStatus : int
{
XpCounted = 0, /**< Unit was killed and its experience points were counted. */
Dead, /**< Unit dead. */
Paralyze, /**< Unit paralyzed. */
Petrify, /**< Unit petrified. */
DisableLong, /**< Long disable applied (paralyze, petrify or fear). */
BoostDamageLvl1, /**< 25% boost */
BoostDamageLvl2, /**< 50% boost */
BoostDamageLvl3, /**< 75% boost */
BoostDamageLvl4, /**< 100% boost */
BoostDamageLong, /**< Long damage boost (until battle is over or lower damage applied). */
LowerDamageLvl1, /**< 50% lower damage */
LowerDamageLvl2, /**< 33% lower damage */
LowerDamageLong, /**< Long lower damage (until battle is over or removed). */
LowerInitiative, /**< 50% lower initiative */
LowerInitiativeLong, /**< Long lower initiative. */
Poison, /**< Poison dot. */
PoisonLong, /**< Long poison applied. */
Frostbite, /**< Frostbite dot. */
FrostbiteLong, /**< Long frostbite applied. */
Blister, /**< Blister dot. */
BlisterLong, /**< Long blister applied. */
Cured, /**< Cure applied ? */
Transform, /**< Unit transformed by another unit. */
TransformLong, /**< Long transformation applied by another unit. */
TransformSelf, /**< Unit transfomed himself ? */
TransformDoppelganger, /**< Doppelganger transformation ? */
TransformDrainLevel, /**< Drain level applied ? */
Summon, /**< Unit was summoned during battle. */
Retreated, /**< Unit retreated from battle. */
Retreat, /**< Unit is retreating. */
Hidden, /**< Unit is hidden. For example, while leader dueling a thief. */
Defend, /**< Defend was used in this round. */
Unsummoned /**< unsummon effect applied ? */
};
enum class BattleAction : int
{
Attack = 0,
Skip,
Retreat,
Wait,
Defend,
Auto,
UseItem,
Resolve,
};
enum class RetreatStatus : std::uint8_t
{
NoRetreat = 0, /**< Group does not retreat. */
CoverAndRetreat, /**< Frontline units defend and cover retreating leader and backline units. */
FullRetreat, /**< Entire group retreats. */
};
struct ModifiedUnitInfo
{
CMidgardID unitId;
CMidgardID modifierId;
};
assert_size(ModifiedUnitInfo, 8);
/** Array of 48 items (8 modifiers x 6 units). */
static const size_t ModifiedUnitCountPatched = 48;
union ModifiedUnitsPatched
{
ModifiedUnitInfo original[8];
ModifiedUnitInfo* patched;
};
assert_size(ModifiedUnitsPatched, 64);
union AttackSourceImmunityStatusesPatched
{
struct
{
std::uint8_t original;
char padding[3];
};
std::uint32_t patched;
};
assert_size(AttackSourceImmunityStatusesPatched, 4);
/** Battle turn info. */
struct BattleTurn
{
/** Id of unit performing the turn. */
CMidgardID unitId;
/** Number of attacks unit can make in a single turn. 2 for units with double attack. */
char attackCount;
char padding[3];
};
assert_size(BattleTurn, 8);
/** Additional unit statuses and information packed in single byte. */
union UnitFlags
{
struct
{
std::uint8_t indexInGroup : 3;
bool attacker : 1;
std::uint8_t waited : 1;
/** Performed first attack while attacking twice. */
std::uint8_t attackedOnceOfTwice : 1;
bool revived : 1;
/**
* Indicates that unit waited and then started retreating.
* Units with this flag set are skipped during turns order computation
* at the start of the round.
*/
bool retreatingAfterWait : 1;
} parts;
std::uint8_t value;
};
assert_size(UnitFlags, 1);
/** Holds unit information used in battle. */
struct UnitInfo
{
CMidgardID unitId1;
CMidgardID unitId2;
/** Bitmask made of BattleStatus values used as shifts. */
std::uint64_t unitStatuses;
/** Additional statuses, unused in RotE v3.01. */
std::uint64_t unitStatuses2;
/** Id of attack that applied poison effect. */
CMidgardID poisonAttackId;
/** Id of attack that applied frostbite effect. */
CMidgardID frostbiteAttackId;
/** Id of attack that applied blister effect. */
CMidgardID blisterAttackId;
/** Bitmask with values for each of LAttackSource. */
AttackSourceImmunityStatusesPatched attackSourceImmunityStatuses;
/** Bitmask with values for each of LAttackClass. */
std::uint32_t attackClassImmunityStatuses;
std::uint16_t unitHp;
std::uint16_t unitXp;
UnitFlags unitFlags;
/** Bit 0 indicates that unit should be hidden in battle UI since its slot used by summon. */
std::uint8_t unknown2;
/** Round when paralyze, petrify or fear was applied. */
std::int8_t disableAppliedRound;
/** Round when long poison was applied. 0 means poison was not applied. */
std::int8_t poisonAppliedRound;
/** Round when long frostbite was applied. */
std::int8_t frostbiteAppliedRound;
/** Round when long blister was applied. */
std::int8_t blisterAppliedRound;
/** Round when long transform was applied. */
std::int8_t transformAppliedRound;
char unknown6;
CMidgardID summonOwner;
/** Ids of units modified by this unit coupled with corresponding modifier ids. */
ModifiedUnitsPatched modifiedUnits;
/** Modifiers applied to this unit. */
CMidgardID modifierIds[8];
/** Total armor reduced by theurgist 'shatter' attacks. Negative values can increase armor. */
int shatteredArmor;
int fortificationArmor;
/** Applied by game to mage units. Reduction does not shown in unit encyclopedia. */
int attackPowerReduction;
};
assert_size(UnitInfo, 168);
assert_offset(UnitInfo, unitStatuses, 8);
assert_offset(UnitInfo, unitHp, 44);
assert_offset(UnitInfo, unitXp, 46);
assert_offset(UnitInfo, unitFlags, 48);
assert_offset(UnitInfo, poisonAppliedRound, 51);
assert_offset(UnitInfo, modifiedUnits, 60);
assert_offset(UnitInfo, shatteredArmor, 156);
using GroupIdTargetsPair = Pair<CMidgardID, TargetSet>;
union BattleStateFlags
{
struct
{
/** Decision about attacker or defender retreat was made and should not be changed. */
bool retreatDecisionWasMade : 1;
/** RetreatStatus for attacker stack. */
std::uint8_t attackerRetreatStatus : 2;
/** RetreatStatus for defender group. */
std::uint8_t defenderRetreatStatus : 2;
/** Battle is over but healers can make one more turn. */
bool afterBattle : 1;
/** Player turned on 'AutoBattle' mode. Also set along with fast battle mode. */
bool autoBattle : 1;
/** Player turned on 'Resolve' (fast battle) mode. */
bool fastBattle : 1;
} parts;
std::uint8_t value;
};
assert_size(BattleStateFlags, 1);
union BattleStateFlags2
{
struct
{
/** Special zero round for doppelgangers was handled. */
bool doppelgangerRoundWasHandled : 1;
/** Negative and retreat effects on units needs to be updated. */
bool shouldUpdateUnitEffects : 1;
/** Attacker stack leader original position before duel. */
std::uint8_t attackerLeaderOriginalPos : 3;
/** Defender stack leader original position before duel. */
std::uint8_t defenderLeaderOriginalPos : 3;
} parts;
std::uint8_t value;
};
assert_size(BattleStateFlags2, 1);
/**
* Common part of the network messages that is being sent during battle.
*/
struct BattleMsgData
{
/**
* 12 for alive units, another 12 is for units that can be possibly summoned over dead bodies
* minus 2 because each group can only have 5 dead units, the 6-th one must be alive or the
* battle is over.
*/
UnitInfo unitsInfo[22];
/** Order of turns in a single battle round. 12 for units and 1 reserved? */
BattleTurn turnsOrder[13];
CMidgardID attackerGroupId;
/** Can be id of a stack, fortification or ruin. */
CMidgardID defenderGroupId;
CMidgardID attackerPlayerId;
CMidgardID defenderPlayerId;
CMidgardID attackerStackUnitIds[6];
CMidgardID defenderStackUnitIds[6];
CMidgardID ids3[2];
/** Ids of items that were used during battle. */
CMidgardID usedItemIds[4];
/** Round counting usually starts from 1, but there is a special round 0 for Doppelgangers. */
std::int8_t currentRound;
char padding[3];
int unknown3;
double attackerGroupCoefficient;
double defenderGroupCoefficient;
BattleStateFlags battleStateFlags;
BattleStateFlags2 battleStateFlags2;
/**
* Indicates that battle is a duel.
* Before duel starts, group leaders change their positions to 2, so they face each other.
* Original positions are saved and restored when duel ends.
* Non-leader units in both groups are marked with BattleStatus::Hidden.
*/
bool duel;
char padding2;
char unknown11[4];
};
assert_size(BattleMsgData, 3920);
assert_offset(BattleMsgData, turnsOrder, 3696);
assert_offset(BattleMsgData, attackerStackUnitIds, 3816);
assert_offset(BattleMsgData, battleStateFlags2, 3913);
namespace BattleMsgDataApi {
struct Api
{
using GetUnitStatus = bool(__thiscall*)(const BattleMsgData* thisptr,
const CMidgardID* unitId,
BattleStatus status);
GetUnitStatus getUnitStatus;
using SetUnitStatus = void(__thiscall*)(const BattleMsgData* thisptr,
const CMidgardID* unitId,
BattleStatus status,
bool enable);
SetUnitStatus setUnitStatus;
using GetUnitIntValue = int(__thiscall*)(const BattleMsgData* thisptr,
const CMidgardID* unitId);
GetUnitIntValue getUnitShatteredArmor;
GetUnitIntValue getUnitFortificationArmor;
using SetUnitIntValue = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
int value);
SetUnitIntValue setUnitShatteredArmor;
/** Sets UnitInfo::unitHp for unit with unitId to specified value. */
using SetUnitInt16Value = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
std::int16_t value);
SetUnitInt16Value setUnitHp;
/** Checks if unit is dead, updates UnitInfo::unitStatuses accordingly. */
using CheckUnitDeath = void(__stdcall*)(const IMidgardObjectMap* objectMap,
BattleMsgData* battleMsgData,
const CMidgardID* unitId);
CheckUnitDeath checkUnitDeath;
using SetInt8Value = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
std::int8_t value);
SetInt8Value setDisableAppliedRound;
using AddSummonedUnit = void(__thiscall*)(BattleMsgData* thisptr,
const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const CMidgardID* groupId);
AddSummonedUnit addSummonedUnit;
using SetSummonOwner = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* summonUnitId,
const CMidgardID* ownerUnitId);
SetSummonOwner setSummonOwner;
using CannotUseDoppelgangerAttack = bool(__stdcall*)(const CMidgardID* unitId,
const BattleMsgData* battleMsgData);
CannotUseDoppelgangerAttack cannotUseDoppelgangerAttack;
using RemoveTransformStatuses = void(__stdcall*)(const CMidgardID* unitId,
const BattleMsgData* battleMsgData);
RemoveTransformStatuses removeTransformStatuses;
using IsUnitAttacker = bool(__thiscall*)(const BattleMsgData* thisptr,
const CMidgardID* unitId);
IsUnitAttacker isUnitAttacker;
GetUnitIntValue getAttackPowerReduction;
SetUnitIntValue setAttackPowerReduction;
using SetUnitBoolValue = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
bool value);
SetUnitBoolValue setUnitShown;
using UnitHasModifier = bool(__stdcall*)(const BattleMsgData* battleMsgData,
const CMidgardID* modifierId,
const CMidgardID* unitId);
UnitHasModifier unitHasModifier;
using GetUnitInfoById = UnitInfo*(__stdcall*)(const BattleMsgData* battleMsgData,
const CMidgardID* unitId);
GetUnitInfoById getUnitInfoById;
/**
* Calls check methods of the attack - from Method14 to Method17, then compares the results
* against unit statuses (xp counted, dead, unsummoned, retreated and hidden) to see if the
* attack can be performed. If all the checks are passed, calls CanPerform of the attack.
*/
using CanPerformAttackOnUnitWithStatusCheck =
bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const IBatAttack* batAttack,
const CMidgardID* unitId);
CanPerformAttackOnUnitWithStatusCheck canPerformAttackOnUnitWithStatusCheck;
using IsUnitAttackSourceWardRemoved = bool(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
const LAttackSource* attackSource);
IsUnitAttackSourceWardRemoved isUnitAttackSourceWardRemoved;
using RemoveUnitAttackSourceWard = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
const LAttackSource* attackSource);
RemoveUnitAttackSourceWard removeUnitAttackSourceWard;
using IsUnitAttackClassWardRemoved = bool(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
const LAttackClass* attackClass);
IsUnitAttackClassWardRemoved isUnitAttackClassWardRemoved;
using RemoveUnitAttackClassWard = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId,
const LAttackClass* attackClass);
RemoveUnitAttackClassWard removeUnitAttackClassWard;
using UnitCanBeHealed = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId);
UnitCanBeHealed unitCanBeHealed;
using UnitCanBeCured = bool(__stdcall*)(const BattleMsgData* battleMsgData,
const CMidgardID* unitId);
UnitCanBeCured unitCanBeCured;
using UnitCanBeRevived = bool(__stdcall*)(const BattleMsgData* battleMsgData,
const CMidgardID* unitId);
UnitCanBeRevived unitCanBeRevived;
/** Called at the end of battle turn to update battle data for the current unit. */
using AfterBattleTurn = void(__stdcall*)(const BattleMsgData* battleMsgData,
const CMidgardID* unitId,
const CMidgardID* nextUnitId);
AfterBattleTurn afterBattleTurn;
/** Called at the end of battle turn to update battle data for the next unit. */
using BeforeBattleTurn = void(__stdcall*)(const BattleMsgData* battleMsgData,
const IMidgardObjectMap* objectMap,
const CMidgardID* unitId);
BeforeBattleTurn beforeBattleTurn;
/**
* Resets info about units modified by this unit. Called in BeforeBattleTurn after corresponding
* modifiers are removed.
*/
using ResetModifiedUnitsInfo = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* unitId);
ResetModifiedUnitsInfo resetModifiedUnitsInfo;
/**
* Resets info about a modifier applied to this unit. Called in BeforeBattleTurn after the
* modifier is removed.
*/
using ResetUnitModifierInfo = void(__thiscall*)(BattleMsgData* thisptr,
const CMidgardID* modifiedUnitId,
const CMidgardID* modifierId);
ResetUnitModifierInfo resetUnitModifierInfo;
/** Used by AI to determine attack target depending on attack class. */
using FindAttackTarget = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitOrItemId,
const IAttack* attack,
const CMidUnitGroup* targetGroup,
const TargetSet* targets,
const BattleMsgData* battleMsgData,
CMidgardID* value);
FindAttackTarget findAttackTarget;
/** Used by AI to determine attack target for L_ALL attack reach. */
using FindAttackTargetWithAllReach = bool(__stdcall*)(CMidgardID* value,
const CMidUnitGroup* targetGroup,
const TargetSet* targets);
FindAttackTargetWithAllReach findAttackTargetWithAllReach;
using FindSpecificAttackTarget = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidUnitGroup* targetGroup,
const TargetSet* targets,
CMidgardID* value);
/** Used by AI to determine boost attack target. */
FindSpecificAttackTarget findBoostAttackTarget;
/** Used by AI to determine fear attack target. */
FindSpecificAttackTarget findFearAttackTarget;
using FindDoppelgangerAttackTarget = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const BattleMsgData* battleMsgData,
const CMidUnitGroup* targetGroup,
const TargetSet* targets,
CMidgardID* value);
/** Used by AI to determine doppelganger attack target. */
FindDoppelgangerAttackTarget findDoppelgangerAttackTarget;
using FindDamageAttackTargetWithNonAllReach =
bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const IAttack* attack,
int damage,
const CMidUnitGroup* targetGroup,
const TargetSet* targets,
const BattleMsgData* battleMsgData,
CMidgardID* value);
/** Used by AI to determine damage attack target with non-all reach. */
FindDamageAttackTargetWithNonAllReach findDamageAttackTargetWithNonAllReach;
using FindDamageAttackTargetWithAnyReach = bool(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidUnitGroup* targetGroup,
const TargetSet* targets,
int damage,
const BattleMsgData* battleMsgData,
const LAttackClass* attackClass,
const LAttackSource* attackSource,
const BattleStatus* filterByStatus,
CMidgardID* value);
/** Used by AI to determine damage attack target with any reach. */
FindDamageAttackTargetWithAnyReach findDamageAttackTargetWithAnyReach;
using FindDamageAttackTargetWithAdjacentReach =
CMidgardID*(__stdcall*)(CMidgardID* value,
const IMidgardObjectMap* objectMap,
const CMidUnitGroup* targetGroup,
const TargetSet* targets,
const BattleMsgData* battleMsgData,
const LAttackSource* attackSource,
const LAttackClass* attackClass);
/** Used by AI to determine damage attack target with adjacent reach. */
FindDamageAttackTargetWithAdjacentReach findDamageAttackTargetWithAdjacentReach;
using AddUnitToBattleMsgData = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidUnitGroup* group,
const CMidgardID* unitId,
char attackerFlags,
BattleMsgData* battleMsgData);
AddUnitToBattleMsgData addUnitToBattleMsgData;
using Constructor = BattleMsgData*(__thiscall*)(BattleMsgData* thisptr);
Constructor constructor;
using CopyConstructor = BattleMsgData*(__thiscall*)(BattleMsgData* thisptr,
const BattleMsgData* src);
CopyConstructor copyConstructor;
CopyConstructor copyConstructor2;
using CopyAssignment = BattleMsgData*(__thiscall*)(BattleMsgData* thisptr,
const BattleMsgData* src);
CopyAssignment copyAssignment;
using Copy = BattleMsgData*(__thiscall*)(BattleMsgData* thisptr, const BattleMsgData* src);
Copy copy;
using Destructor = void(__thiscall*)(BattleMsgData* thisptr);
Destructor destructor;
using RemoveUnitInfo = void(__thiscall*)(BattleMsgData* thisptr, const CMidgardID* unitId);
RemoveUnitInfo removeUnitInfo;
using DecreaseUnitAttacks = bool(__thiscall*)(BattleMsgData* thisptr, const CMidgardID* unitId);
DecreaseUnitAttacks decreaseUnitAttacks;
using GetTargetsToAttack = void(__stdcall*)(IdList* value,
const IMidgardObjectMap* objectMap,
const IAttack* attack,
const IBatAttack* batAttack,
const LAttackReach* attackReach,
const BattleMsgData* battleMsgData,
BattleAction action,
const CMidgardID* targetUnitId);
GetTargetsToAttack getTargetsToAttack;
/** Values is a pointer to CMidgardID itemIds[2]. */
using GetLeaderEquippedBattleItemIds = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const BattleMsgData* battleMsgData,
CMidgardID* values);
GetLeaderEquippedBattleItemIds getLeaderEquippedBattleItemIds;
using GetLeaderEquippedBattleItemIndex = int(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const BattleMsgData* battleMsgData,
const CMidgardID* itemId);
GetLeaderEquippedBattleItemIndex getLeaderEquippedBattleItemIndex;
using GetUnitInfos = void(__thiscall*)(const BattleMsgData* thisptr,
UnitInfoList* value,
bool a3);
GetUnitInfos getUnitInfos;
/**
* Fills targets list for a specified attack.
* @param[in] objectMap map where to search for objects.
* @param[in] battleMsgData battle information.
* @param[in] batAttack battle attack for which targets list will be filled.
* @param[in] unitId id of a unit performing the attack.
* @param[in] attackUnitOrItemId unit or item id performing the attack.
* @param targetAllies specifies whether the attack should target allies or not.
* @param[inout] targetsList list to fill.
* @param[in] checkAltAttack specifies whether alt-attack should be checked to fill targets for.
*/
using FillTargetsList = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const IBatAttack* batAttack,
const CMidgardID* unitId,
const CMidgardID* attackUnitOrItemId,
bool targetAllies,
TargetSet* value,
bool checkAltAttack);
FillTargetsList fillTargetsList;
using FillTargetsListForAllAnyAttackReach = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const IBatAttack* batAttack,
const CMidgardID* targetGroupId,
TargetSet* value);
FillTargetsListForAllAnyAttackReach fillTargetsListForAllAttackReach;
FillTargetsListForAllAnyAttackReach fillTargetsListForAnyAttackReach;
using FillTargetsListForAdjacentAttackReach =
void(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const IBatAttack* batAttack,
const CMidgardID* targetGroupId,
const CMidgardID* unitGroupId,
const CMidgardID* unitId,
TargetSet* value);
FillTargetsListForAdjacentAttackReach fillTargetsListForAdjacentAttackReach;
using FillEmptyTargetsList = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const IBatAttack* batAttack,
const CMidgardID* unitId,
const CMidgardID* attackUnitOrItemId,
bool targetAllies,
TargetSet* value);
FillEmptyTargetsList fillEmptyTargetsList;
using FillEmptyTargetsListForAllAnyAttackReach =
void(__stdcall*)(const IMidgardObjectMap* objectMap,
const CMidgardID* targetGroupId,
TargetSet* value);
FillEmptyTargetsListForAllAnyAttackReach fillEmptyTargetsListForAllAttackReach;
FillEmptyTargetsListForAllAnyAttackReach fillEmptyTargetsListForAnyAttackReach;
FillTargetsListForAdjacentAttackReach fillEmptyTargetsListForAdjacentAttackReach;
using IsAutoBattle = bool(__thiscall*)(const BattleMsgData* thisptr);
IsAutoBattle isAutoBattle;
using AlliesNotPreventingAdjacentAttack = bool(__stdcall*)(const BattleMsgData* battleMsgData,
const CMidUnitGroup* unitGroup,
int unitPosition,
bool targetsAreAllies);
AlliesNotPreventingAdjacentAttack alliesNotPreventingAdjacentAttack;
using GiveAttack = void(__thiscall*)(BattleMsgData* thistr,
const CMidgardID* unitId,
char attackCount,
int lastIndex);
GiveAttack giveAttack;
using RemoveFiniteBoostLowerDamage = void(__stdcall*)(BattleMsgData* battleMsgData,
const CMidgardID* unitId);
RemoveFiniteBoostLowerDamage removeFiniteBoostLowerDamage;
/** Creates a formatted description of unit's big face during battle. */
using GenerateBigFaceDescription = String*(__stdcall*)(String* value,
const IMidgardObjectMap* objectMap,
const CMidgardID* unitId,
const BattleMsgData* battleMsgData);
GenerateBigFaceDescription generateBigFaceDescription;
using UpdateBattleActions = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId,
Set<BattleAction>* actions,
GroupIdTargetsPair* attackTargets,
GroupIdTargetsPair* item1Targets,
GroupIdTargetsPair* item2Targets);
UpdateBattleActions updateBattleActions;
using GetItemAttackTargets = void(__stdcall*)(const IMidgardObjectMap* objectMap,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId,
const CMidgardID* itemId,
GroupIdTargetsPair* value);
GetItemAttackTargets getItemAttackTargets;
using BeforeBattleRound = void(__thiscall*)(BattleMsgData* thisptr);
BeforeBattleRound beforeBattleRound;
};
Api& get();
} // namespace BattleMsgDataApi
} // namespace game
#endif // BATTLEMSGDATA_H
| 32,786
|
C++
|
.h
| 608
| 38.164474
| 100
| 0.583785
|
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,625
|
idlist.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/idlist.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 IDLIST_H
#define IDLIST_H
#include "d2list.h"
#include "midgardid.h"
namespace game {
using IdList = List<CMidgardID>;
using IdListNode = ListNode<CMidgardID>;
using IdListIterator = ListIterator<CMidgardID>;
namespace IdListApi {
struct Api
{
using Constructor = IdList*(__thiscall*)(IdList* thisptr);
Constructor constructor;
using Destructor = void(__thiscall*)(IdList* thisptr);
Destructor destructor;
/** Clears list contents. */
using Clear = bool(__thiscall*)(IdList* thisptr);
Clear clear;
/** Adds id to list's end. */
using PushBack = int(__thiscall*)(IdList* thisptr, const CMidgardID* id);
PushBack pushBack;
using PushFront = int(__thiscall*)(IdList* thisptr, const CMidgardID* id);
PushFront pushFront;
/** Erases id from list. */
using Erase = void(__thiscall*)(IdList* thisptr, IdListIterator pos);
Erase erase;
using Find = IdListIterator*(__stdcall*)(IdListIterator* value,
IdListIterator begin,
IdListIterator end,
const CMidgardID* id);
Find find;
using Shuffle = void(__stdcall*)(IdList* list);
Shuffle shuffle;
};
Api& get();
} // namespace IdListApi
} // namespace game
#endif // IDLIST_H
| 2,160
|
C++
|
.h
| 56
| 33.196429
| 78
| 0.685673
|
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,626
|
unittypedescriptor.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/unittypedescriptor.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 UNITTYPEDESCRIPTOR_H
#define UNITTYPEDESCRIPTOR_H
#include "encunitdescriptor.h"
#include "midgardid.h"
namespace game {
struct IUsUnit;
struct IAttack;
struct CUnitTypeDescriptor : public IEncUnitDescriptor
{
CMidgardID unitImplId;
};
assert_size(CUnitTypeDescriptor, 8);
namespace CUnitTypeDescriptorApi {
struct Api
{
using GetUnitImpl = IUsUnit*(__thiscall*)(const CUnitTypeDescriptor* thisptr);
GetUnitImpl getUnitImpl;
using GetAttack = IAttack*(__thiscall*)(const CUnitTypeDescriptor* thisptr);
GetAttack getAttack;
using GetAltAttack = IAttack*(__thiscall*)(const CUnitTypeDescriptor* thisptr);
GetAltAttack getAltAttack;
};
Api& get();
const IEncUnitDescriptorVftable* vftable();
} // namespace CUnitTypeDescriptorApi
} // namespace game
#endif // UNITTYPEDESCRIPTOR_H
| 1,642
|
C++
|
.h
| 45
| 34.155556
| 83
| 0.780657
|
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,627
|
groupupgradehooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/groupupgradehooks.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 GROUPUPGRADEHOOKS_H
#define GROUPUPGRADEHOOKS_H
namespace game {
struct CMidgardID;
struct IMidgardObjectMap;
struct BattleMsgData;
struct BattleAttackInfo;
} // namespace game
namespace hooks {
void __stdcall upgradeGroupHooked(game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
const game::CMidgardID* groupId,
game::BattleAttackInfo** attackInfo,
bool playableRaceAi);
} // namespace hooks
#endif // GROUPUPGRADEHOOKS_H
| 1,407
|
C++
|
.h
| 34
| 35.705882
| 72
| 0.711778
|
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,628
|
unitpickerinterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/unitpickerinterf.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 UNITPICKERINTERF_H
#define UNITPICKERINTERF_H
#include "functordispatch3.h"
#include "midgardid.h"
#include "popupinterf.h"
namespace game {
struct CRadioButtonInterf;
struct LSubRaceCategory;
namespace editor {
/** RAD_RACE toggle button indices in DLG_ENROLL_UNITS from ScenEdit.dlg. */
enum class UnitPickerSubrace : int
{
Human,
Dwarf,
Undead,
Heretic,
Neutral,
NeutralHuman,
NeutralElf,
NeutralGreenSkin,
NeutralDragon,
NeutralMarsh,
NeutralWater,
NeutralBarbarian,
NeutralWolf,
Elf,
};
/** RAD_SORTED toggle button indices in DLG_ENROLL_UNITS from ScenEdit.dlg. */
enum class UnitPickerSortMethod : int
{
Experience,
Name,
};
struct CUnitPickerInterfData
{
Vector<CMidgardID> units; /**< Units which can be potentially picked. */
Vector<CMidgardID> filteredUnits; /**< Subset of units to pick from, filtered by subrace. */
ITask* task;
SmartPtr<CBFunctorDispatch3<CMidgardID, int, bool>> onUnitPicked;
UnitPickerSubrace selectedSubRace;
bool enabledButtons[14];
char padding[2];
};
assert_size(CUnitPickerInterfData, 64);
/** Represents DLG_ENROLL_UNITS from ScenEdit.dlg. */
struct CUnitPickerInterf : public CPopupInterf
{
CUnitPickerInterfData* data;
};
assert_size(CUnitPickerInterf, 28);
namespace CUnitPickerInterfApi {
struct Api
{
using DataConstructor = CUnitPickerInterfData*(__thiscall*)(CUnitPickerInterfData* thisptr);
DataConstructor dataConstructor;
/** Sets RAD_RACE toggle buttons enabled states depending on enabledButtons array. */
using UpdateRadioButton = void(__stdcall*)(const bool* enabledButtons,
CRadioButtonInterf* radioButton,
size_t buttonsTotal);
UpdateRadioButton updateRadioButton;
/** Updates enabledButtons and returns initial subrace selection. */
using UpdateEnabledButtons = void(__thiscall*)(CUnitPickerInterf* thisptr,
UnitPickerSubrace* selectedSubRace);
UpdateEnabledButtons updateEnabledButtons;
using UpdateEditLevel = void(__thiscall*)(CUnitPickerInterf* thisptr, int selectedIndex);
UpdateEditLevel updateEditLevel;
/**
* Filter unit picker units by specified subrace.
* Updates filteredUnits array.
*/
using FilterUnits = void(__thiscall*)(CUnitPickerInterf* thisptr,
const LSubRaceCategory* subRace);
FilterUnits filterUnits;
/** Sorts filteredUnits array using specified method. */
using SortUnits = void(__thiscall*)(CUnitPickerInterf* thisptr,
UnitPickerSortMethod sortMethod);
SortUnits sortUnits;
/** Called when RAD_RACE toggle buttons selection changed. */
using OnTogglePressed = void(__thiscall*)(CUnitPickerInterf* thisptr,
UnitPickerSubrace selectedSubRace);
OnTogglePressed onTogglePressed;
UnitPickerSubrace* selectedButton;
UnitPickerSortMethod* sortMethod;
};
Api& get();
} // namespace CUnitPickerInterfApi
} // namespace editor
} // namespace game
#endif // UNITPICKERINTERF_H
| 4,068
|
C++
|
.h
| 107
| 32.252336
| 96
| 0.713415
|
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,629
|
displayhandlers.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/displayhandlers.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 DISPLAYHANDLERS_H
#define DISPLAYHANDLERS_H
#include "idset.h"
#include "imagelayerlist.h"
#include "midgardid.h"
namespace game {
struct IMidgardObjectMap;
struct CMidVillage;
namespace DisplayHandlersApi {
struct Api
{
template <typename T>
using DisplayHandler = void(__stdcall*)(ImageLayerList* list,
const T* scenarioObject,
const IMidgardObjectMap* objectMap,
const CMidgardID* playerId,
const IdSet* objectives,
int a6,
bool animatedIso);
DisplayHandler<CMidVillage> villageHandler;
};
Api& get();
} // namespace DisplayHandlersApi
} // namespace game
#endif // DISPLAYHANDLERS_H
| 1,693
|
C++
|
.h
| 43
| 31.325581
| 79
| 0.654878
|
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,630
|
usunitimpl.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/usunitimpl.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 USUNITIMPL_H
#define USUNITIMPL_H
#include "midgardid.h"
#include "unitcat.h"
#include "usunit.h"
namespace game {
struct TUsUnitImpl : public IUsUnit
{
LUnitCategory category;
};
assert_size(TUsUnitImpl, 20);
} // namespace game
#endif // USUNITIMPL_H
| 1,084
|
C++
|
.h
| 31
| 33.064516
| 72
| 0.764818
|
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,631
|
fullscreeninterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/fullscreeninterf.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 FULLSCREENINTERF_H
#define FULLSCREENINTERF_H
#include "interffullscreen.h"
#include "taskmanagerholder.h"
namespace game {
struct CTaskManager;
struct CFullScreenInterfData
{
CTaskManager* taskManager;
char unknown;
char padding[3];
};
assert_size(CFullScreenInterfData, 8);
struct CFullScreenInterf : public CInterfFullScreen
{
ITaskManagerHolder taskManagerHolder;
CFullScreenInterfData* fullScreenInterfData;
};
} // namespace game
#endif // FULLSCREENINTERF_H
| 1,314
|
C++
|
.h
| 38
| 32.368421
| 72
| 0.782952
|
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,632
|
netcustomplayerserver.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netcustomplayerserver.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 NETCUSTOMPLAYERSERVER_H
#define NETCUSTOMPLAYERSERVER_H
#include "mqnetplayerserver.h"
#include "netcustomplayer.h"
#include <NatPunchthroughClient.h>
#include <list>
#include <utility>
#include <vector>
namespace hooks {
struct CNetCustomPlayerServer;
class PlayerServerCallbacks : public NetworkPeerCallbacks
{
public:
PlayerServerCallbacks(CNetCustomPlayerServer* playerServer)
: playerServer{playerServer}
{ }
virtual ~PlayerServerCallbacks() = default;
void onPacketReceived(DefaultMessageIDTypes type,
SLNet::RakPeerInterface* peer,
const SLNet::Packet* packet) override;
private:
CNetCustomPlayerServer* playerServer;
};
struct CNetCustomPlayerServer : public game::IMqNetPlayerServer
{
CNetCustomPlayerServer(CNetCustomSession* session,
game::IMqNetSystem* netSystem,
game::IMqNetReception* netReception,
NetworkPeer::PeerPtr&& peer);
~CNetCustomPlayerServer() = default;
auto getPeer()
{
return player.getPeer();
}
bool notifyHostClientConnected();
CNetCustomPlayer player;
PlayerServerCallbacks callbacks;
SLNet::NatPunchthroughClient natClient;
using NetMessagePtr = std::unique_ptr<unsigned char[]>;
using IdMessagePair = std::pair<std::uint32_t, NetMessagePtr>;
std::list<IdMessagePair> messages;
std::vector<SLNet::RakNetGUID> connectedIds;
};
game::IMqNetPlayerServer* createCustomPlayerServer(CNetCustomSession* session,
game::IMqNetSystem* netSystem,
game::IMqNetReception* netReception);
} // namespace hooks
#endif // NETCUSTOMPLAYERSERVER_H
| 2,622
|
C++
|
.h
| 66
| 33.30303
| 88
| 0.711584
|
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,633
|
leaderabilitycat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/leaderabilitycat.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 LEADERABILITYCAT_H
#define LEADERABILITYCAT_H
#include "categories.h"
namespace game {
struct LLeaderAbilityTable : CEnumConstantTable<LeaderAbilityId>
{ };
struct LLeaderAbility : public Category<LeaderAbilityId>
{ };
namespace LeaderAbilityCategories {
struct Categories
{
LLeaderAbility* orbUse;
LLeaderAbility* wandScrollUse;
LLeaderAbility* weaponArmorUse;
LLeaderAbility* incorruptible;
LLeaderAbility* criticalHit;
LLeaderAbility* travelItemUse;
LLeaderAbility* talismanUse;
LLeaderAbility* bannerUse;
LLeaderAbility* rod;
LLeaderAbility* weaponMaster;
LLeaderAbility* jewelryUse;
};
Categories& get();
} // namespace LeaderAbilityCategories
} // namespace game
#endif // LEADERABILITYCAT_H
| 1,573
|
C++
|
.h
| 45
| 32.355556
| 72
| 0.781147
|
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,634
|
aireactionoper.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aireactionoper.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 AIREACTIONOPER_H
#define AIREACTIONOPER_H
#include "aireactionnull.h"
namespace game {
struct CAiReactionOper : public CAiReactionNull
{ };
} // namespace game
#endif // AIREACTIONOPER_H
| 1,013
|
C++
|
.h
| 26
| 37.076923
| 72
| 0.770642
|
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,635
|
textmessage.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/textmessage.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 TEXTMESSAGE_H
#define TEXTMESSAGE_H
#include "d2assert.h"
namespace game {
struct LRaceCategory;
struct TextMessage
{
const LRaceCategory* race;
const char* message;
int time;
};
assert_size(TextMessage, 12);
} // namespace game
#endif // TEXTMESSAGE_H
| 1,093
|
C++
|
.h
| 32
| 32
| 72
| 0.762583
|
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,636
|
encparambasehooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/encparambasehooks.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 ENCPARAMBASEHOOKS_H
#define ENCPARAMBASEHOOKS_H
namespace game {
struct CEncParamBase;
struct CMidgardID;
struct BattleMsgData;
} // namespace game
namespace hooks {
void __stdcall encParamBaseAddUnitBattleInfoHooked(game::CEncParamBase* param,
const game::CMidgardID* unitId,
const game::BattleMsgData* battleMsgData);
} // namespace hooks
#endif // ENCPARAMBASEHOOKS_H
| 1,300
|
C++
|
.h
| 31
| 36.903226
| 93
| 0.72209
|
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,637
|
aireactionstrat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aireactionstrat.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 AIREACTIONSTRAT_H
#define AIREACTIONSTRAT_H
#include "aireactionnull.h"
namespace game {
struct CAiReactionStrat : public CAiReactionNull
{ };
} // namespace game
#endif // AIREACTIONSTRAT_H
| 1,017
|
C++
|
.h
| 26
| 37.230769
| 72
| 0.771574
|
VladimirMakeev/D2ModdingToolset
| 32
| 13
| 15
|
GPL-3.0
|
9/20/2024, 10:45:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
1,542,638
|
menunewskirmishhotseat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menunewskirmishhotseat.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 MENUNEWSKIRMISHHOTSEAT_H
#define MENUNEWSKIRMISHHOTSEAT_H
#include "menunewskirmish.h"
namespace game {
/**
* New hotseat skirmish menu.
* Represents DLG_HOTSEAT_NEW from Interf.dlg.
*/
struct CMenuNewSkirmishHotseat : public CMenuNewSkirmish
{ };
assert_size(CMenuNewSkirmishHotseat, 12);
namespace CMenuNewSkirmishHotseatApi {
struct Api
{
using Constructor = CMenuNewSkirmishHotseat*(__thiscall*)(CMenuNewSkirmishHotseat* thisptr,
CMenuPhase* menuPhase);
Constructor constructor;
};
Api& get();
} // namespace CMenuNewSkirmishHotseatApi
} // namespace game
#endif // MENUNEWSKIRMISHHOTSEAT_H
| 1,499
|
C++
|
.h
| 40
| 33.95
| 95
| 0.75
|
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,639
|
mqpoint.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqpoint.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 MQPOINT_H
#define MQPOINT_H
namespace game {
struct CMqPoint
{
int x;
int y;
};
static constexpr bool operator==(const CMqPoint& a, const CMqPoint& b)
{
return a.x == b.x && a.y == b.y;
}
static constexpr bool operator!=(const CMqPoint& a, const CMqPoint& b)
{
return !(a == b);
}
static constexpr CMqPoint& operator+=(CMqPoint& a, const CMqPoint& b)
{
a.x += b.x;
a.y += b.y;
return a;
}
static constexpr CMqPoint operator+(const CMqPoint& a, const CMqPoint& b)
{
return CMqPoint{a.x + b.x, a.y + b.y};
}
static constexpr CMqPoint operator-(const CMqPoint& a, const CMqPoint& b)
{
return CMqPoint{a.x - b.x, a.y - b.y};
}
} // namespace game
#endif // MQPOINT_H
| 1,529
|
C++
|
.h
| 50
| 28.32
| 73
| 0.718856
|
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,640
|
untransformeffecthooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/untransformeffecthooks.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 UNTRANSFORMEFFECTHOOKS_H
#define UNTRANSFORMEFFECTHOOKS_H
namespace game {
struct CBatAttackUntransformEffect;
struct IMidgardObjectMap;
struct BattleMsgData;
struct CMidgardID;
struct BattleAttackInfo;
} // namespace game
namespace hooks {
void __fastcall untransformEffectAttackOnHitHooked(game::CBatAttackUntransformEffect* thisptr,
int /*%edx*/,
game::IMidgardObjectMap* objectMap,
game::BattleMsgData* battleMsgData,
game::CMidgardID* targetUnitId,
game::BattleAttackInfo** attackInfo);
} // namespace hooks
#endif // UNTRANSFORMEFFECTHOOKS_H
| 1,630
|
C++
|
.h
| 36
| 36.555556
| 94
| 0.670025
|
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,641
|
customattack.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/customattack.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 CUSTOMATTACK_H
#define CUSTOMATTACK_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
struct IAttack;
struct IMidgardObjectMap;
} // namespace game
namespace hooks {
struct CustomAttack : public game::CBatAttackBase
{
game::CMidgardID id1;
game::CMidgardID id2;
int attackNumber;
game::IAttack* attack;
};
game::IBatAttack* customAttackCtor(CustomAttack* attack,
game::IMidgardObjectMap* objectMap,
const game::CMidgardID* id1,
const game::CMidgardID* id2,
int attackNumber);
} // namespace hooks
#endif // CUSTOMATTACK_H
| 1,521
|
C++
|
.h
| 41
| 31.682927
| 72
| 0.699049
|
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,642
|
aitactic.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aitactic.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 AITACTIC_H
#define AITACTIC_H
#include "aireactionnull.h"
#include "aistate.h"
#include "currency.h"
#include "d2set.h"
#include "idlist.h"
namespace game {
struct IAiTacticInternalVftable;
struct IMidgardObjectMap;
struct CMidServerLogicData;
struct CAiReactionTactic;
struct CAiReactionNull;
struct CAiBlockingStacks;
struct CAiLog;
struct AiLogicUnknown;
struct CAiTacticData;
struct CMidServerLogicData2;
struct MapSizeBigArrayPair
{
int mapSize;
char array[144][144];
};
assert_size(MapSizeBigArrayPair, 20740);
struct IAiTacticInternal
{
IAiTacticInternalVftable* vftable;
};
struct CAiTactic
: public IAiState
, public IAiTacticInternal
{
IMidgardObjectMap* objectMap;
CMidgardID playerId;
CMidServerLogicData* serverLogic;
CAiReactionTactic* reactionTactic;
CAiReactionNull reactionNull;
Set<int> list;
MapSizeBigArrayPair pair;
Set<int> list2;
CAiBlockingStacks* blockingStacks;
Bank bank;
AiLogicUnknown* logicUnknown;
CAiLog* aiLog;
int unknown3;
IdList list3;
IdList list4;
IdList list5;
IdList list6;
int unknown;
CAiTacticData* data;
int unknown4;
CMidgardID unknownId;
CMidServerLogicData2* serverLogic2;
IdList list7;
bool unknown5;
bool unknown6;
char padding[2];
Set<int> list8;
IdList* list9;
IdList* list10;
};
assert_size(CAiTactic, 20992);
assert_offset(CAiTactic, list2, 20796);
} // namespace game
#endif // AITACTIC_H
| 2,310
|
C++
|
.h
| 84
| 24.547619
| 72
| 0.766591
|
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,643
|
mapelement.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mapelement.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 MAPELEMENT_H
#define MAPELEMENT_H
#include "d2assert.h"
#include "mqpoint.h"
namespace game {
struct IMapElementVftable;
struct IMidgardObjectMap;
struct CMidgardID;
struct IMapElement
{
const IMapElementVftable* vftable;
CMqPoint position;
int sizeX;
int sizeY;
};
assert_size(IMapElement, 20);
struct IMapElementVftable
{
using Destructor = void(__thiscall*)(IMapElement* thisptr, char flags);
Destructor destructor;
using Initialize = bool(__thiscall*)(IMapElement* thisptr,
const IMidgardObjectMap* objectMap,
const CMidgardID* leaderId,
const CMidgardID* ownerId,
const CMidgardID* subraceId,
const CMqPoint* position);
Initialize initialize;
void* method2;
};
assert_vftable_size(IMapElementVftable, 3);
} // namespace game
#endif // MAPELEMENT_H
| 1,826
|
C++
|
.h
| 50
| 30.12
| 76
| 0.68424
|
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,644
|
midstreamenvfile.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midstreamenvfile.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 MIDSTREAMENVFILE_H
#define MIDSTREAMENVFILE_H
#include "d2pair.h"
#include "d2set.h"
#include "d2string.h"
#include "midgardid.h"
#include "midgardstreamenv.h"
namespace game {
struct IStdFileImpl;
struct CMidStreamCountFile;
struct CMidStreamFile;
struct StreamEnvFileInfo
{
Pair<const char* /* dbf file name */, const char* /* Assumption: dbf SQL query */> pair;
CMidStreamFile* stream;
};
/** Implementation of IMidgardStreamEnv that works with files. */
struct CMidStreamEnvFile : public IMidgardStreamEnv
{
CMidgardID scenarioId;
bool readMode;
bool unknown2;
char padding[2];
IStdFileImpl* stdFileImpl;
String fileName;
CMidgardID unknownId;
String errorMessage;
CMidStreamCountFile* streamCountFile;
Set<StreamEnvFileInfo> streams;
};
assert_size(CMidStreamEnvFile, 84);
} // namespace game
#endif // MIDSTREAMENVFILE_H
| 1,704
|
C++
|
.h
| 51
| 30.960784
| 92
| 0.768248
|
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,645
|
dbfaccess.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/dbfaccess.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 DBFACCESS_H
#define DBFACCESS_H
#include <filesystem>
#include <string>
namespace game {
struct CMidgardID;
}
namespace utils {
class DbfFile;
/**
* Reads identifier from game database.
* @param[inout] id identifier to store results.
* @param[in] database game database to read from, must be opened before read.
* @param row row number to access
* @param[in] columnName database column name to access
* @returns false in case of invalid row number or nonexisting column name.
*/
bool dbRead(game::CMidgardID& id,
const DbfFile& database,
size_t row,
const std::string& columnName);
/**
* Reads integer value from game database.
* @param[inout] result variable to store results.
* @param[in] database game database to read from, must be opened before read.
* @param row row number to access
* @param[in] columnName database column name to access
* @returns false in case of invalid row number or nonexisting column name.
*/
bool dbRead(int& result, const DbfFile& database, size_t row, const std::string& columnName);
bool dbValueExists(const std::filesystem::path& dbfFilePath,
const std::string& columnName,
const std::string& value);
} // namespace utils
#endif // DBFACCESS_H
| 2,097
|
C++
|
.h
| 53
| 36.396226
| 93
| 0.738446
|
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,646
|
encyclopediapopup.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/encyclopediapopup.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 ENCYCLOPEDIAPOPUP_H
#define ENCYCLOPEDIAPOPUP_H
#include "interfdialog.h"
#include "middatacache.h"
#include "smartptr.h"
#include "uievent.h"
namespace game {
struct CEncyclopediaPopupData;
struct CPhase;
struct IEncLayout;
struct CEncParamBase;
struct CEncyclopediaPopup
: public CInterfDialog
, public CMidDataCache2::INotify
{
CEncyclopediaPopupData* data;
};
assert_size(CEncyclopediaPopup, 20);
struct CEncyclopediaPopupData
{
UiEvent uiEvent;
CPhase* phase;
IEncLayout* encLayout;
bool stickyEncy;
char padding[3];
};
assert_size(CEncyclopediaPopupData, 36);
namespace CEncyclopediaPopupApi {
struct Api
{
using Constructor = CEncyclopediaPopup*(__thiscall*)(CEncyclopediaPopup* thisptr,
CEncParamBase* encParam,
CPhase* phase);
Constructor constructor;
};
Api& get();
} // namespace CEncyclopediaPopupApi
namespace editor {
struct CEncyclopediaPopupData;
struct CEncyclopediaPopup : public CInterfDialog
{
CEncyclopediaPopupData* data;
};
assert_size(CEncyclopediaPopup, 16);
struct CEncyclopediaPopupData
{
CPhase* phase;
SmartPointer unknown4;
UiEvent uiEvent;
IEncLayout* encLayout;
bool stickyEncy;
char padding[3];
};
assert_size(CEncyclopediaPopupData, 44);
struct Api
{
using Constructor = CEncyclopediaPopup*(__thiscall*)(CEncyclopediaPopup* thisptr,
CEncParamBase* encParam,
CPhase* phase,
int a4);
Constructor constructor;
};
Api& get();
} // namespace editor
} // namespace game
#endif // ENCYCLOPEDIAPOPUP_H
| 2,633
|
C++
|
.h
| 84
| 25.571429
| 85
| 0.693587
|
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,647
|
itemexequipment.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemexequipment.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 ITEMEXEQUIPMENT_H
#define ITEMEXEQUIPMENT_H
namespace game {
struct IItemExEquipment
{
void* vftable;
};
} // namespace game
#endif // ITEMEXEQUIPMENT_H
| 982
|
C++
|
.h
| 27
| 34.407407
| 72
| 0.766316
|
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,648
|
aimovestackaction.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aimovestackaction.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 AIMOVESTACKACTION_H
#define AIMOVESTACKACTION_H
#include "aitacticactionsimple.h"
#include "categorylist.h"
namespace game {
struct CAiMoveStackAction : CAiTacticActionSimple
{
int unknown;
int unknown4;
int unknown8;
int unknown12;
int unknown16;
int unknown20;
int unknown24;
int unknown28;
int unknown32;
CategoryList unknown36;
int unknown52;
bool unknown56;
bool unknown57;
bool unknown58;
char padding;
};
assert_size(CAiMoveStackAction, 84);
assert_offset(CAiMoveStackAction, unknown36, sizeof(CAiTacticActionSimple) + 36);
namespace CAiMoveStackActionApi {
struct Vftable
{
const IAiTacticActionVftable* action;
const IAiReactionVftable* reaction;
};
const Vftable& vftable();
} // namespace CAiMoveStackActionApi
} // namespace game
#endif // AIMOVESTACKACTION_H
| 1,672
|
C++
|
.h
| 53
| 28.735849
| 81
| 0.768657
|
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,649
|
midgardmap.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midgardmap.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 MIDGARDMAP_H
#define MIDGARDMAP_H
#include "midgardid.h"
#include "midscenarioobject.h"
#include "pointset.h"
namespace game {
struct CVisitorAddPlayer;
struct LTerrainCategory;
struct IMidgardObjectMap;
struct LGroundCategory;
struct CMidgardMap : public IMidScenarioObject
{
int mapSize;
};
assert_size(CMidgardMap, 12);
namespace CMidgardMapApi {
struct Api
{
using ChangeTerrain = bool(__thiscall*)(CMidgardMap* thisptr,
CVisitorAddPlayer* visitor,
const LTerrainCategory* terrain,
PointSet* tiles,
PointSet* unknown,
IMidgardObjectMap* objectMap);
ChangeTerrain changeTerrain;
/** Returns ground type of map tile at specified position. */
using GetGround = bool(__thiscall*)(const CMidgardMap* thisptr,
LGroundCategory* ground,
const CMqPoint* position,
const IMidgardObjectMap* objectMap);
GetGround getGround;
};
Api& get();
} // namespace CMidgardMapApi
} // namespace game
#endif // MIDGARDMAP_H
| 2,102
|
C++
|
.h
| 54
| 30.62963
| 76
| 0.652088
|
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,650
|
nativeraceinfo.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/nativeraceinfo.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 NATIVERACEINFO_H
#define NATIVERACEINFO_H
#include "raceinfo.h"
#include "rsgid.h"
namespace hooks {
class NativeRaceInfo final : public rsg::RaceInfo
{
public:
NativeRaceInfo(const rsg::CMidgardID& raceId,
const rsg::CMidgardID& guardianId,
const rsg::CMidgardID& nobleId,
rsg::RaceType raceType,
rsg::LeaderNames&& leaderNames,
std::vector<rsg::CMidgardID>&& leaderIds)
: leaderNames{std::move(leaderNames)}
, leaderIds{std::move(leaderIds)}
, raceId{raceId}
, guardianId{guardianId}
, nobleId{nobleId}
, raceType{raceType}
{ }
~NativeRaceInfo() override = default;
const rsg::CMidgardID& getRaceId() const override
{
return raceId;
}
rsg::RaceType getRaceType() const override
{
return raceType;
}
const rsg::CMidgardID& getGuardianUnitId() const override
{
return guardianId;
}
const rsg::CMidgardID& getNobleLeaderId() const override
{
return nobleId;
}
const std::vector<rsg::CMidgardID>& getLeaderIds() const override
{
return leaderIds;
}
const rsg::LeaderNames& getLeaderNames() const override
{
return leaderNames;
}
private:
rsg::LeaderNames leaderNames;
std::vector<rsg::CMidgardID> leaderIds;
rsg::CMidgardID raceId;
rsg::CMidgardID guardianId;
rsg::CMidgardID nobleId;
rsg::RaceType raceType;
};
} // namespace hooks
#endif // NATIVERACEINFO_H
| 2,391
|
C++
|
.h
| 74
| 26.851351
| 72
| 0.686062
|
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,651
|
itemutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/itemutils.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 ITEMUTILS_H
#define ITEMUTILS_H
namespace game {
struct IMidgardObjectMap;
struct IItem;
struct CItemBase;
struct CMidgardID;
struct IItemExtension;
struct IItemExPotionBoost;
struct TypeDescriptor;
} // namespace game
namespace hooks {
const game::CItemBase* getGlobalItemById(const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* itemId);
game::CMidgardID getAttackId(const game::IItem* item);
/** Analogue of game::IItemCastTo* functions. */
game::IItemExtension* castItem(const game::IItem* item, const game::TypeDescriptor* type);
game::IItemExPotionBoost* castItemToPotionBoost(const game::IItem* item);
} // namespace hooks
#endif // ITEMUTILS_H
| 1,536
|
C++
|
.h
| 38
| 37.657895
| 90
| 0.764943
|
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,652
|
functordispatch0.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/functordispatch0.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 FUNCTORDISPATCH0_H
#define FUNCTORDISPATCH0_H
#include "d2assert.h"
namespace game {
struct CBFunctorDispatch0Vftable;
struct CBFunctorDispatch0
{
CBFunctorDispatch0Vftable* vftable;
};
struct CBFunctorDispatch0Vftable
{
using RunCallback = void(__thiscall*)(CBFunctorDispatch0* thisptr);
RunCallback runCallback;
};
assert_vftable_size(CBFunctorDispatch0Vftable, 1);
template <typename T>
struct CBFunctorDispatch0wRetVftable;
template <typename T>
struct CBFunctorDispatch0wRet
{
CBFunctorDispatch0wRetVftable<T>* vftable;
};
template <typename T>
struct CBFunctorDispatch0wRetVftable
{
/** Calls functor-specific callback function that returns T. */
using RunCallback = T(__thiscall*)(CBFunctorDispatch0wRet<T>* thistr);
RunCallback runCallback;
};
assert_vftable_size(CBFunctorDispatch0wRetVftable<void*>, 1);
} // namespace game
#endif // FUNCTORDISPATCH0_H
| 1,724
|
C++
|
.h
| 50
| 32.32
| 74
| 0.789284
|
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,653
|
umunit.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/umunit.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 UMUNIT_H
#define UMUNIT_H
#include "smartptr.h"
#include "textandid.h"
#include "ummodifier.h"
#include "ussoldier.h"
#include "usunit.h"
#include <cstddef>
namespace game {
struct CUmUnitData;
struct GlobalData;
struct CDBTable;
struct CUmUnit
{
IUsUnit usUnit;
IUsSoldier usSoldier;
CUmModifier umModifier;
CUmUnitData* data;
};
assert_size(CUmUnit, 24);
struct CUmUnitData
{
ModifierValue hp;
bool isPercentHp;
char padding[3];
ModifierValue regeneration;
ModifierValue armor;
SmartPtr<LAttackSource> immunity;
SmartPtr<LImmuneCat> immuneCat;
SmartPtr<LAttackClass> immunityC;
SmartPtr<LImmuneCat> immuneCatC;
TextAndId desc;
};
assert_size(CUmUnitData, 68);
static inline CUmUnit* castSoldierToUmUnit(const IUsSoldier* soldier)
{
return reinterpret_cast<CUmUnit*>((uintptr_t)soldier - offsetof(CUmUnit, usSoldier));
}
namespace CUmUnitApi {
struct Api
{
using Constructor = CUmUnit*(__thiscall*)(CUmUnit* thisptr,
const CMidgardID* modifierId,
CDBTable* dbTable,
const GlobalData** globalData);
Constructor constructor;
using CopyConstructor = CUmUnit*(__thiscall*)(CUmUnit* thisptr, const CUmUnit* src);
CopyConstructor copyConstructor;
using DataConstructor = CUmUnitData*(__thiscall*)(CUmUnitData* thisptr);
DataConstructor dataConstructor;
using DataCopyConstructor = CUmUnitData*(__thiscall*)(CUmUnitData* thisptr,
const CUmUnitData* src);
DataCopyConstructor dataCopyConstructor;
using ReadData = void(__stdcall*)(CDBTable* dbTable,
CUmUnitData* value,
const GlobalData** globalData);
ReadData readData;
};
Api& get();
struct Vftable
{
const IUsUnitVftable* usUnit;
const IUsSoldierVftable* usSoldier;
const CUmModifierVftable* umModifier;
};
Vftable& vftable();
} // namespace CUmUnitApi
} // namespace game
#endif // UMUNIT_H
| 2,963
|
C++
|
.h
| 87
| 28.206897
| 89
| 0.695271
|
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,654
|
effectinterfhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/effectinterfhooks.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 EFFECTINTERFHOOKS_H
#define EFFECTINTERFHOOKS_H
namespace game {
struct ITask;
struct CMidgardID;
struct LEventEffectCategory;
namespace editor {
struct CEffectInterf;
}
} // namespace game
namespace hooks {
game::editor::CEffectInterf* __stdcall createEffectInterfFromCategoryHooked(
game::ITask* task,
void* unknown,
const game::CMidgardID* eventId,
const game::LEventEffectCategory* category);
}
#endif // EFFECTINTERFHOOKS_H
| 1,273
|
C++
|
.h
| 36
| 33.222222
| 76
| 0.777055
|
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,655
|
mqtexture.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqtexture.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 MQTEXTURE_H
#define MQTEXTURE_H
#include "d2assert.h"
namespace game {
struct IMqTextureVftable;
struct SurfaceDecompressData;
struct IMqTexture
{
IMqTextureVftable* vftable;
};
struct IMqTextureVftable
{
using Destructor = void(__thiscall*)(IMqTexture* thisptr, char flags);
Destructor destructor;
/**
* Draws texture into decompressed surface memory.
* Actual method signature unknown.
*/
using Draw = void(__stdcall*)(IMqTexture* thisptr, SurfaceDecompressData* decompressData);
Draw draw;
/**
* Returns true if surface contains changes and needs to be redrawn.
* Actual method signature unknown.
*/
using IsDirty = bool(__stdcall*)(const IMqTexture* thisptr);
IsDirty isDirty;
};
assert_vftable_size(IMqTextureVftable, 3);
} // namespace game
#endif // MQTEXTURE_H
| 1,666
|
C++
|
.h
| 48
| 31.75
| 94
| 0.749222
|
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,656
|
middiplomacy.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/middiplomacy.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 MIDDIPLOMACY_H
#define MIDDIPLOMACY_H
#include "midscenarioobject.h"
#include "d2vector.h"
#include <cstdint>
namespace game {
struct LRaceCategory;
/*
Relation contents:
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| B| W| | | | | turn when alliance was made | previous relation | current relation | A|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
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
A - races are in alliance
W - races are always at war
B - AI can not break alliance
*/
struct DiplomacyRelation
{
std::uint8_t race1CategoryId;
std::uint8_t race2CategoryId;
char padding[2];
std::uint32_t relation;
};
assert_size(DiplomacyRelation, 8);
struct CMidDiplomacy : public IMidScenarioObject
{
Vector<DiplomacyRelation> relations;
};
assert_size(CMidDiplomacy, 24);
namespace CMidDiplomacyApi {
struct Api
{
using GetRelation = std::uint32_t*(__thiscall*)(const CMidDiplomacy* thisptr,
std::uint32_t* relation,
const LRaceCategory* race1,
const LRaceCategory* race2);
/** Returns current diplomacy relation in range [0 : 100] between two races. */
GetRelation getCurrentRelation;
/** Returns previous diplomacy relation in range [0 : 100] between two races. */
GetRelation getPreviousRelation;
using GetBool = bool(__thiscall*)(const CMidDiplomacy* thisptr,
const LRaceCategory* race1,
const LRaceCategory* race2);
/** Returns true if race1 and race2 are in alliance. */
GetBool areAllies;
/** Returns turn number when two races made an alliance. */
using GetAllianceTurn = std::uint32_t*(__thiscall*)(const CMidDiplomacy* thisptr,
std::uint32_t* turn,
const LRaceCategory* race1,
const LRaceCategory* race2);
GetAllianceTurn getAllianceTurn;
/** Returns true if race1 and race2 are always at war. */
GetBool areAlwaysAtWar;
/** Returns true if diplomacy relations prohibit AI-controlled race from breaking alliance. */
GetBool aiCouldNotBreakAlliance;
using CheckRelationType = bool(__stdcall*)(const std::uint32_t* relation);
/** Returns true if relation value is in range [0 : D_WAR]. */
CheckRelationType areRelationsAtWar;
/** Returns true if relation value is in range (D_WAR : D_NEUTRAL]. */
CheckRelationType areRelationsNeutral;
/** Returns true if relation value is in range (D_NEUTRAL : 100]. */
CheckRelationType areRelationsPeaceful;
};
Api& get();
}
}
#endif // MIDDIPLOMACY_H
| 3,825
|
C++
|
.h
| 86
| 36.965116
| 98
| 0.620365
|
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,657
|
batattacktransformself.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattacktransformself.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 BATATTACKTRANSFORMSELF_H
#define BATATTACKTRANSFORMSELF_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
struct IAttack;
/** Represents self-tranform attack. */
struct CBatAttackTransformSelf : public IBatAttack
{
IBatAttack* altAttack;
CMidgardID unitId;
CMidgardID id2;
int attackNumber;
IAttack* attack;
};
assert_size(CBatAttackTransformSelf, 24);
namespace CBatAttackTransformSelfApi {
IBatAttackVftable* vftable();
} // namespace CBatAttackTransformSelfApi
} // namespace game
#endif // BATATTACKTRANSFORMSELF_H
| 1,385
|
C++
|
.h
| 39
| 33.282051
| 72
| 0.779775
|
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,658
|
midcondownresource.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midcondownresource.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 MIDCONDOWNRESOURCE_H
#define MIDCONDOWNRESOURCE_H
namespace game {
struct CMidEvCondition;
struct String;
struct IMidgardObjectMap;
struct LEventCondCategory;
struct ITask;
struct CMidgardID;
struct ITestCondition;
struct CDialogInterf;
namespace editor {
struct CCondInterf;
}
} // namespace game
namespace hooks {
game::CMidEvCondition* createMidCondOwnResource();
void __stdcall midCondOwnResourceGetInfoString(game::String* info,
const game::IMidgardObjectMap* objectMap,
const game::CMidEvCondition* eventCondition);
game::editor::CCondInterf* createCondOwnResourceInterf(game::ITask* task,
void* a2,
const game::CMidgardID* eventId);
game::ITestCondition* createTestOwnResource(game::CMidEvCondition* eventCondition);
bool checkOwnResourceConditionsValid(game::CDialogInterf* dialog,
const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* eventId);
} // namespace hooks
#endif // MIDCONDOWNRESOURCE_H
| 2,028
|
C++
|
.h
| 47
| 35.617021
| 92
| 0.693753
|
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,659
|
netmessages.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netmessages.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 NETMESSAGES_H
#define NETMESSAGES_H
#include "categoryids.h"
#include "d2list.h"
#include "netmsg.h"
namespace game {
struct CPhaseGame;
struct CMidgardID;
/** Send by client from game menu to check game version of a server. */
struct CMenusReqVersionMsg : public CNetMsg
{ };
assert_size(CMenusReqVersionMsg, 4);
/** Send by server to clients in response to CMenusReqVersionMsg. */
struct CGameVersionMsg : public CNetMsg
{
int gameVersion; /**< Initialized with CMidServerLogicCoreData::gameVersion value. */
};
assert_size(CGameVersionMsg, 8);
/** Send by client from game menu to get scenario information from server. */
struct CMenusReqInfoMsg : public CNetMsg
{ };
assert_size(CMenusReqInfoMsg, 4);
/** Send by server to clients in response to CMenusReqInfoMsg. */
struct CMenusAnsInfoMsg : public CNetMsg
{
char* scenarioName;
char* scenarioDescription;
DifficultyLevelId difficultyLevel;
int suggestedLevel;
List<RaceId> raceIds;
int startingGold;
int startingMana;
int gameTurn;
int maxPlayers;
bool unknown5;
char padding[3];
};
assert_size(CMenusAnsInfoMsg, 56);
namespace NetMessagesApi {
struct Api
{
/**
* Assumption: sends network message about item exchange from client to server.
* Sends CStackExchangeItemMsg.
* @param[in] thisptr pointer to CPhaseGame object that will send the message.
* @param[in] fromObjectId id of the object transfer item from.
* @param[in] toObjectId id of the object that receives item.
* @param[in] itemId id of the item to exchange.
* @param a5 meaning unknown, currently set to 1.
*/
using SendStackExchangeItemMsg = void(__thiscall*)(CPhaseGame* thisptr,
const CMidgardID* fromObjectId,
const CMidgardID* toObjectId,
const CMidgardID* itemId,
char a5);
SendStackExchangeItemMsg sendStackExchangeItemMsg;
/**
* Sends network message about item being sold to merchant.
* Sends CSiteSellItemMsg.
* @param[in] thisptr pointer to CPhaseGame object that will send the message.
* @param[in] siteId id of the merchant object.
* @param[in] stackId id of the stack that sells item.
* @param[in] itemId id of the item to sell.
*/
using SendSiteSellItemMsg = void(__thiscall*)(CPhaseGame* thisptr,
const CMidgardID* siteId,
const CMidgardID* stackId,
const CMidgardID* itemId);
SendSiteSellItemMsg sendSiteSellItemMsg;
};
Api& get();
CNetMsgVftable* getMenusReqVersionVftable();
CNetMsgVftable* getMenusReqInfoVftable();
} // namespace NetMessagesApi
} // namespace game
#endif // NETMESSAGES_H
| 3,787
|
C++
|
.h
| 94
| 33.393617
| 89
| 0.68037
|
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,660
|
netmsg.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netmsg.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 NETMSG_H
#define NETMSG_H
#include "d2assert.h"
#include <cstdint>
namespace game {
struct CNetMsgVftable;
struct CMqStream;
/**
* Network messages common header part.
* Each ingame message that is being sent or received over network starts with it.
* CNetMsg fills and checks header in its serialize method.
*/
struct NetMessageHeader
{
/** Equals to netMessageNormalType for game specific messages. */
std::uint32_t messageType;
/** Length of message in bytes, including header. */
std::uint32_t length;
/**
* Raw name of CNetMsg or its derived class.
* Obtained as @code{.cpp}typeid(msg).raw_name();@endcode which is Windows specific.
* @see https://docs.microsoft.com/en-us/cpp/cpp/type-info-class for additional info.
*/
char messageClassName[36];
};
assert_size(NetMessageHeader, 44);
/** Game specific messages treated as normal in DirectPlay terms. */
static constexpr std::uint32_t netMessageNormalType{0xffff};
/** Maximum allowed net message length in bytes. */
static constexpr std::uint32_t netMessageMaxLength{0x80000};
/** Used for sending messages between players in single, DPlay and Lobby sessions. */
static constexpr std::uint32_t broadcastNetPlayerId{0};
static constexpr std::uint32_t serverNetPlayerId{1};
static constexpr std::uint32_t singleNetPlayerId{0xffffff};
template <typename T = CNetMsgVftable>
struct CNetMsgT
{
const T* vftable;
};
struct CNetMsg : public CNetMsgT<>
{ };
assert_size(CNetMsg, 4);
struct CNetMsgVftable
{
using Destructor = void(__thiscall*)(CNetMsg* thisptr, char flags);
Destructor destructor;
using Serialize = void(__thiscall*)(CNetMsg* thisptr, CMqStream* stream);
Serialize serialize;
};
assert_vftable_size(CNetMsgVftable, 2);
namespace CNetMsgApi {
struct Api
{
using Destructor = void(__thiscall*)(CNetMsg* thisptr);
Destructor destructor;
};
Api& get();
CNetMsgVftable* vftable();
} // namespace CNetMsgApi
} // namespace game
#endif // NETMSG_H
| 2,826
|
C++
|
.h
| 79
| 33.316456
| 89
| 0.75633
|
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,661
|
intintmap.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/intintmap.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 INTINTMAP_H
#define INTINTMAP_H
#include "d2map.h"
#include "d2pair.h"
namespace game {
using IntIntMap = Map<int, int>;
using IntIntMapNode = MapNode<int, int>;
using IntIntMapIterator = MapIterator<int, int>;
namespace IntIntMapApi {
struct Api
{
using Insert =
Pair<IntIntMapIterator, bool>*(__thiscall*)(IntIntMap* thisptr,
Pair<IntIntMapIterator, bool>* result,
Pair<int, int>* value);
Insert insert;
using Find = IntIntMapIterator*(__thiscall*)(const IntIntMap* thisptr,
IntIntMapIterator* result,
const int* value);
Find find;
};
Api& get();
} // namespace IntIntMapApi
} // namespace game
#endif // INTINTMAP_H
| 1,677
|
C++
|
.h
| 43
| 32.093023
| 90
| 0.660505
|
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,662
|
stackbattleactionmsg.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/stackbattleactionmsg.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 STACKBATTLEACTIONMSG_H
#define STACKBATTLEACTIONMSG_H
#include "battlemsgdata.h"
#include "netmsg.h"
namespace game {
struct CStackBattleActionMsg : public CNetMsg
{
int unknown;
BattleMsgData battleMsgData;
BattleAction action;
CMidgardID targetUnitId;
CMidgardID attackerUnitId;
int unknown3;
};
assert_size(CStackBattleActionMsg, 3944);
namespace CStackBattleActionMsgApi {
CNetMsgVftable* vftable();
} // namespace CStackBattleActionMsgApi
} // namespace game
#endif // STACKBATTLEACTIONMSG_H
| 1,352
|
C++
|
.h
| 38
| 33.236842
| 72
| 0.781442
|
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,663
|
netmsghooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netmsghooks.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 NETMSGHOOKS_H
#define NETMSGHOOKS_H
namespace game {
struct CMqStream;
struct CNetMsg;
struct CStackBattleActionMsg;
} // namespace game
namespace hooks {
void __fastcall stackBattleActionMsgSerializeHooked(game::CStackBattleActionMsg* thisptr,
int /*%edx*/,
game::CMqStream* stream);
void __fastcall netMsgDtorHooked(game::CNetMsg* thisptr, int /*%edx*/);
} // namespace hooks
#endif // NETMSGHOOKS_H
| 1,334
|
C++
|
.h
| 32
| 36.6875
| 89
| 0.712741
|
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,664
|
netcustomsession.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netcustomsession.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 NETCUSTOMSESSION_H
#define NETCUSTOMSESSION_H
#include "mqnetsession.h"
#include <string>
#include <vector>
namespace game {
struct IMqNetPlayer;
}
namespace hooks {
struct CNetCustomService;
struct CNetCustomPlayerClient;
struct CNetCustomPlayerServer;
struct CNetCustomSession : public game::IMqNetSession
{
CNetCustomSession(CNetCustomService* service, const char* name, bool host)
: name{name}
, service{service}
, server{nullptr}
, maxPlayers{2}
, host{host}
{ }
bool setMaxPlayers(int maxPlayers);
std::string name;
std::vector<CNetCustomPlayerClient*> players;
CNetCustomPlayerServer* server;
CNetCustomService* service;
int maxPlayers;
bool host;
};
game::IMqNetSession* createCustomNetSession(CNetCustomService* service,
const char* sessionName,
bool host);
} // namespace hooks
#endif // NETCUSTOMSESSION_H
| 1,812
|
C++
|
.h
| 52
| 30.153846
| 78
| 0.722127
|
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,665
|
movepathhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/movepathhooks.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 MOVEPATHHOOKS_H
#define MOVEPATHHOOKS_H
#include "d2list.h"
#include "mqpoint.h"
namespace game {
struct IMidgardObjectMap;
struct CMidgardID;
struct CMidgardMap;
struct CMidgardPlan;
} // namespace game
namespace hooks {
void __stdcall showMovementPathHooked(const game::IMidgardObjectMap* objectMap,
const game::CMidgardID* stackId,
game::List<game::CMqPoint>* path,
const game::CMqPoint* lastReachablePoint,
const game::CMqPoint* pathEnd,
bool a6);
int __stdcall computeMovementCostHooked(const game::CMqPoint* mapPosition,
const game::IMidgardObjectMap* objectMap,
const game::CMidgardMap* midgardMap,
const game::CMidgardPlan* plan,
const game::CMidgardID* stackId,
const char* a6,
const char* a7,
bool leaderAlive,
bool plainsBonus,
bool forestBonus,
bool waterBonus,
bool waterOnly,
bool forbidWaterOnlyOnLand);
} // namespace hooks
#endif // MOVEPATHHOOKS_H
| 2,364
|
C++
|
.h
| 50
| 32.38
| 81
| 0.56418
|
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,666
|
menurace.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menurace.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 MENURACE_H
#define MENURACE_H
#include "menubase.h"
#include "racelist.h"
#include "raceset.h"
namespace game {
struct IMqImage2;
struct CMenuRaceData
{
int unknown;
RaceSet racesToSkip;
char unknown2[24];
int screenIndex;
SmartPtr<IMqImage2> backgroundImage;
char unknown4;
bool scrollBack;
char padding[2];
};
assert_size(CMenuRaceData, 72);
assert_offset(CMenuRaceData, backgroundImage, 60);
/**
* Base class for race selection menus.
* Represents DLG_CHOOSE_RACE from Interf.dlg.
*/
struct CMenuRace : public CMenuBase
{
CMenuRaceData* menuRaceData;
};
assert_size(CMenuRace, 16);
namespace CMenuRaceApi {
struct Api
{
/** Used for changing race selection screens, background images, transition animations. */
using ScrollButtonCallback = void(__thiscall*)(CMenuRace* thisptr);
ScrollButtonCallback buttonNextCallback;
ScrollButtonCallback buttonPrevCallback;
using UpdateButtons = void(__stdcall*)(CMenuRace* thisptr);
UpdateButtons updateButtons;
/** Updates description text based on specified race category. */
using UpdateRaceDescription = void(__stdcall*)(CDialogInterf* dialogInterf,
const LRaceCategory* raceCategory);
UpdateRaceDescription updateRaceDescription;
/** Returns race category that corresponds to screen index of CMenuRace. */
using GetRaceCategory = LRaceCategory*(__stdcall*)(LRaceCategory* raceCategory,
int screenIndex);
GetRaceCategory getRaceCategory;
/** Returns background image name for specified race category. */
using GetRaceBgndImageName = const char*(__stdcall*)(const LRaceCategory* raceCategory);
GetRaceBgndImageName getRaceBgndImageName;
/**
* Returns race screen transition animation name based on race category and scroll direction.
*/
using GetTransitionAnimationName = const char*(__stdcall*)(const LRaceCategory* raceCategory,
bool scrollBack);
GetTransitionAnimationName getTransitionAnimationName;
/**
* Fills list with races that are not present on selected scenario map
* and will be skipped during race selection.
*/
using SetRacesToSkip = void(__stdcall*)(RaceSet* racesToSkip,
const RaceCategoryList* scenarioRaces);
SetRacesToSkip setRacesToSkip;
};
Api& get();
} // namespace CMenuRaceApi
} // namespace game
#endif // MENURACE_H
| 3,388
|
C++
|
.h
| 85
| 34.176471
| 97
| 0.716113
|
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,667
|
batattackusepotion.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattackusepotion.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 BATATTACKUSEPOTION_H
#define BATATTACKUSEPOTION_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
struct CBatAttackUsePotion : CBatAttackBase
{
CMidgardID unitId;
CMidgardID itemId;
};
assert_size(CBatAttackUsePotion, 12);
} // namespace game
#endif // BATATTACKUSEPOTION_H
| 1,125
|
C++
|
.h
| 31
| 34.258065
| 72
| 0.773689
|
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,668
|
aipriority.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aipriority.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 AIPRIORITY_H
#define AIPRIORITY_H
namespace game {
struct IAiPriority
{
const void* vftable;
int priority;
};
} // namespace game
#endif // AIPRIORITY_H
| 986
|
C++
|
.h
| 28
| 33.142857
| 72
| 0.759706
|
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,669
|
spinbuttoninterf.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/spinbuttoninterf.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 SPINBUTTONINTERF_H
#define SPINBUTTONINTERF_H
#include "d2string.h"
#include "functordispatch1.h"
#include "interface.h"
#include "mqpoint.h"
namespace game {
struct CButtonInterf;
struct CImage2TextBackground;
struct CSpinButtonInterf;
struct CDialogInterf;
struct CSpinButtonInterfData
{
int textBoxChildIndex;
SmartPtr<CBFunctorDispatch1<CSpinButtonInterf*>> onOptionChanged;
Vector<String> options;
int selectedOption;
/**
* Increments selected option.
* Button on the right side of the spin box, first button in the .dlg SPIN description.
*/
CButtonInterf* increment;
/**
* Decrements selected option.
* Button on the left side of the spin box, second button in the .dlg SPIN description.
*/
CButtonInterf* decrement;
CImage2TextBackground* image2TextBgnd;
CMqPoint bgndImagePos;
};
assert_size(CSpinButtonInterfData, 52);
assert_offset(CSpinButtonInterfData, increment, 32);
/**
* Spin button ui element.
* Represents SPIN from Interf.dlg or ScenEdit.dlg files.
*/
struct CSpinButtonInterf : public CInterface
{
CSpinButtonInterfData* data;
};
assert_size(CSpinButtonInterf, 12);
namespace CSpinButtonInterfApi {
struct Api
{
/** Sets up specified integer values as spin button options. */
using SetValues = void(__thiscall*)(CSpinButtonInterf* thisptr, const Vector<int>* values);
SetValues setValues;
/** Sets up specified string as spin button options. */
using SetOptions = void(__thiscall*)(CSpinButtonInterf* thisptr, const Vector<String>* options);
SetOptions setOptions;
/** Sets up option with specified index as currently selected. */
using SetSelectedOption = void(__thiscall*)(CSpinButtonInterf* thisptr, int option);
SetSelectedOption setSelectedOption;
/**
* Assigns functor that is called each time selected spin button option is changed.
* Searches for spin button by its name in the provided dialog.
* @returns found spin button with bound callback set or nullptr if not found.
*/
using AssignFunctor = CSpinButtonInterf*(__stdcall*)(CDialogInterf* dialog,
const char* buttonName,
const char* dialogName,
SmartPointer* functor);
AssignFunctor assignFunctor;
};
Api& get();
} // namespace CSpinButtonInterfApi
} // namespace game
#endif // SPINBUTTONINTERF_H
| 3,334
|
C++
|
.h
| 86
| 33.697674
| 100
| 0.719901
|
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,670
|
tooltip.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/tooltip.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 TOOLTIP_H
#define TOOLTIP_H
#include "d2string.h"
namespace game {
/** Actual class name unknown. */
struct Tooltip
{
String text;
int unknown;
};
assert_size(Tooltip, 20);
} // namespace game
#endif // TOOLTIP_H
| 1,048
|
C++
|
.h
| 31
| 31.774194
| 72
| 0.753465
|
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,671
|
battleviewerinterfhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/battleviewerinterfhooks.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 BATTLEVIEWERINTERFHOOKS_H
#define BATTLEVIEWERINTERFHOOKS_H
#include "d2set.h"
namespace game {
struct CBattleViewerInterf;
struct CMqPoint;
struct IBatViewer;
struct BattleMsgData;
struct CMidgardID;
struct BatViewerTargetDataSet;
struct CBatBigFace;
enum class BattleAction : int;
} // namespace game
namespace hooks {
bool __fastcall markAttackTargetsHooked(game::CBattleViewerInterf* thisptr,
int /*%edx*/,
const game::CMqPoint* mousePosition,
bool setBigFace);
void __fastcall battleViewerInterfUpdateHooked(game::IBatViewer* thisptr,
int /*%edx*/,
const game::BattleMsgData* battleMsgData,
const game::CMidgardID* unitId,
const game::Set<game::BattleAction>* actions,
const game::BatViewerTargetDataSet* targetData);
void __fastcall battleViewerInterfUpdateBattleItemsHooked(game::CBattleViewerInterf* thisptr,
int /*%edx*/,
bool canUseItem);
void __fastcall batBigFaceUpdateHooked(game::CBatBigFace* thisptr,
int /*%edx*/,
const game::BattleMsgData* battleMsgData);
} // namespace hooks
#endif // BATTLEVIEWERINTERFHOOKS_H
| 2,411
|
C++
|
.h
| 50
| 35.68
| 95
| 0.612766
|
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,672
|
scenarioheader.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/scenarioheader.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 SCENARIOHEADER_H
#define SCENARIOHEADER_H
#include "categoryids.h"
#include "d2assert.h"
#include <cstddef>
#include <cstdint>
namespace game {
struct CMidgardID;
/** Describes race in scenario file header. */
struct RaceInfo
{
RaceId race;
char unknown[36];
};
assert_size(RaceInfo, 40);
#pragma pack(push)
#pragma pack(1)
/**
* Describes scenario file.
* Structure size should be about 3156 bytes, according to header validity checks code.
* See https://github.com/VladimirMakeev/D2SGFormat for additional info about header format.
*/
struct ScenarioFileHeader
{
char description[256];
char author[21];
bool official;
char name[256];
int mapSize;
DifficultyLevelId difficulty;
int turnNumber;
int unknown;
char campaignId[11];
int unknown2;
char unknown3;
char defaultPlayerName[256];
RaceId race;
char unknown4[815];
int unknownData;
int prngValues[250]; /**< Values used for pseudo-random number generation. */
int paddingSize;
int racesTotal;
RaceInfo races[5];
char padding[43];
char padding2[260];
};
#pragma pack(pop)
assert_size(ScenarioFileHeader, 3156);
assert_offset(ScenarioFileHeader, author, 256);
assert_offset(ScenarioFileHeader, official, 277);
assert_offset(ScenarioFileHeader, name, 278);
assert_offset(ScenarioFileHeader, mapSize, 534);
assert_offset(ScenarioFileHeader, difficulty, 538);
assert_offset(ScenarioFileHeader, campaignId, 550);
assert_offset(ScenarioFileHeader, racesTotal, 2649);
assert_offset(ScenarioFileHeader, races, 2653);
namespace ScenarioFileHeaderApi {
struct Api
{
/**
* Reads scenario file and parses its header performing validity checks.
* @param[in] a1 meaning unknown.
* @param[in] filePath full path to scenario file (.sg).
* @param[inout] scenarioFileId pointer parsed scenario file id from header is stored here.
* @param[inout] header scenario file header to populate.
* @param a5 unknown
* @param a6 unknown
* @param a7 unknown
* @returns true on success, false if scenario file can't be read or header data invalid.
*/
using ReadAndCheckHeader = bool(__stdcall*)(void* a1,
const char* filePath,
CMidgardID* scenarioFileId,
ScenarioFileHeader* header,
int a5,
int a6,
int a7);
ReadAndCheckHeader readAndCheckHeader;
};
Api& get();
} // namespace ScenarioFileHeaderApi
} // namespace game
#endif // SCENARIOHEADER_H
| 3,550
|
C++
|
.h
| 101
| 29.425743
| 95
| 0.689083
|
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,673
|
enclayoutcityhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/enclayoutcityhooks.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 ENCLAYOUTCITYHOOKS_H
#define ENCLAYOUTCITYHOOKS_H
namespace game {
struct IMidgardObjectMap;
struct CDialogInterf;
struct CFortification;
struct CEncLayoutCity;
struct IMidObject;
struct CMidUnitGroup;
} // namespace game
namespace hooks {
void __fastcall encLayoutCityUpdateHooked(game::CEncLayoutCity* thisptr,
int /*%edx*/,
const game::IMidgardObjectMap* objectMap,
const game::CFortification* fort,
game::CDialogInterf* dialog);
void __fastcall encLayoutCityOnObjectChangedHooked(game::CEncLayoutCity* thisptr,
int /*%edx*/,
const game::IMidObject* obj);
void __stdcall encLayoutCityUpdateGroupUiHooked(const game::IMidgardObjectMap* objectMap,
const game::CMidUnitGroup* group,
game::CDialogInterf* dialog,
const char* txtStackNameFormat,
const char* imgStackNameFormat,
bool isStackGroup);
} // namespace hooks
#endif // ENCLAYOUTCITYHOOKS_H
| 2,187
|
C++
|
.h
| 45
| 35.711111
| 89
| 0.609185
|
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,674
|
taskchangecolor.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/taskchangecolor.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 TASKCHANGECOLOR_H
#define TASKCHANGECOLOR_H
#include "taskmapchange.h"
namespace game {
struct LTerrainCategory;
namespace editor {
struct CMapInterf;
enum class SelectedTerrain : int
{
Heretic,
Dwarf,
Human,
Undead,
Elf,
};
struct CTaskChangeColorData
{
SelectedTerrain selectedTerrain;
};
assert_size(CTaskChangeColorData, 4);
/** Changes map terrain. */
struct CTaskChangeColor : public CTaskMapChange
{
CTaskChangeColorData* data;
};
assert_size(CTaskChangeColor, 28);
namespace CTaskChangeColorApi {
struct Api
{
using Constructor = CTaskChangeColor*(__thiscall*)(CTaskChangeColor* thisptr,
CTaskManager* taskManager,
CMapInterf* mapInterf,
SelectedTerrain selectedTerrain,
BrushSize selectedBrush);
Constructor constructor;
/** Returns terrain category depending on terrain selection. */
using GetTerrain = LTerrainCategory*(__stdcall*)(LTerrainCategory* terrain,
SelectedTerrain selectedTerrain);
GetTerrain getTerrain;
};
Api& get();
} // namespace CTaskChangeColorApi
} // namespace editor
} // namespace game
#endif // TASKCHANGECOLOR_H
| 2,206
|
C++
|
.h
| 63
| 28.365079
| 87
| 0.68
|
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,675
|
usleaderimpl.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/usleaderimpl.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 USLEADERIMPL_H
#define USLEADERIMPL_H
#include "currency.h"
#include "leadercategory.h"
#include "midgardid.h"
#include "usleader.h"
namespace game {
struct TUsLeaderImplData
{
CMidgardID unitId;
CMidgardID prevUnitImplId;
Bank enrollCost;
LLeaderCategory category;
};
assert_size(TUsLeaderImplData, 32);
/** Implementation of leader interface. */
struct TUsLeaderImpl : public IUsLeader
{
TUsLeaderImplData* data;
};
assert_size(TUsLeaderImpl, 8);
} // namespace game
#endif // USLEADERIMPL_H
| 1,343
|
C++
|
.h
| 41
| 30.634146
| 72
| 0.770302
|
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,676
|
attackutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/attackutils.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 ATTACKUTILS_H
#define ATTACKUTILS_H
namespace game {
struct CMidgardID;
struct IAttack;
struct CAttackImpl;
enum class AttackClassId : int;
enum class AttackReachId : int;
} // namespace game
namespace hooks {
game::IAttack* getGlobalAttack(const game::CMidgardID* attackId);
game::CAttackImpl* getAttackImpl(const game::IAttack* attack);
int getBoostDamage(int level);
int getLowerDamage(int level);
int getLowerInitiative(int level);
bool attackHasPower(game::AttackClassId id); // Power is chance to hit / accuracy
bool attackHasDamage(game::AttackClassId id);
bool attackHasHeal(game::AttackClassId id);
bool attackHasInfinite(game::AttackClassId id);
bool attackHasCritHit(game::AttackClassId id);
bool attackHasAltAttack(game::AttackClassId id);
bool attackHasAltAttack(const game::IAttack* attack);
bool attackHasDrain(game::AttackClassId id); // Uses IAttack::getDrain
bool isMeleeAttack(const game::IAttack* attack);
bool isMeleeAttack(game::AttackReachId id);
int getAttackMaxTargets(game::AttackReachId id);
/**
* Attack uses ComputeDamage function, thus its damage:
* - is mitigated by armor
* - can be boosted / lowered
* - can be modified
* - can critically hit
* - can have custom damage ratio
*/
bool isNormalDamageAttack(game::AttackClassId id);
/** Attack uses modifiable value of IAttack::getQtyDamage. */
bool isModifiableDamageAttack(game::AttackClassId id);
} // namespace hooks
#endif // ATTACKUTILS_H
| 2,262
|
C++
|
.h
| 57
| 38.105263
| 81
| 0.789162
|
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,677
|
mqnetplayerclient.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqnetplayerclient.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 MQNETPLAYERCLIENT_H
#define MQNETPLAYERCLIENT_H
#include "mqnetplayer.h"
namespace game {
struct IMqNetPlayerClientVftable;
/** Interface for network clients. */
struct IMqNetPlayerClient : public IMqNetPlayerT<IMqNetPlayerClientVftable>
{ };
struct IMqNetPlayerClientVftable : public IMqNetPlayerVftable
{
/**
* Sets client player name.
* CNetDPlayPlayerClient calls IDirectPlay4::SetPlayerName here.
*/
using SetName = bool(__thiscall*)(IMqNetPlayerClient* thisptr, const char* name);
SetName setName;
/** Returns true if this client player hosts the game. */
using IsHost = bool(__thiscall*)(IMqNetPlayerClient* thisptr);
IsHost isHost;
};
assert_vftable_size(IMqNetPlayerClientVftable, 11);
} // namespace game
#endif // MQNETPLAYERCLIENT_H
| 1,614
|
C++
|
.h
| 41
| 36.756098
| 85
| 0.765835
|
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,678
|
midcondvarcmp.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midcondvarcmp.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 MIDCONDVARCMP_H
#define MIDCONDVARCMP_H
namespace game {
struct CMidEvCondition;
struct String;
struct IMidgardObjectMap;
struct LEventCondCategory;
struct ITask;
struct CMidgardID;
struct ITestCondition;
struct CDialogInterf;
namespace editor {
struct CCondInterf;
}
} // namespace game
namespace hooks {
game::CMidEvCondition* createMidCondVarCmp();
void __stdcall midCondVarCmpGetInfoString(game::String* info,
const game::IMidgardObjectMap* objectMap,
const game::CMidEvCondition* eventCondition);
game::editor::CCondInterf* createCondVarCmpInterf(game::ITask* task,
void* a2,
const game::CMidgardID* eventId);
game::ITestCondition* createTestVarCmp(game::CMidEvCondition* eventCondition);
} // namespace hooks
#endif // MIDCONDVARCMP_H
| 1,756
|
C++
|
.h
| 44
| 34.090909
| 87
| 0.712522
|
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,679
|
phase.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/phase.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 PHASE_H
#define PHASE_H
#include "d2assert.h"
namespace game {
struct CMidClient;
struct IMidgardObjectMap;
struct CMidgardID;
struct CInterface;
struct CPhaseData
{
CMidClient* midClient;
CInterface* encyclopediaPopup;
};
assert_size(CPhaseData, 8);
struct CPhase
{
void* vftable;
CPhaseData* data;
};
assert_size(CPhase, 8);
namespace CPhaseApi {
struct Api
{
using GetObjectMap = IMidgardObjectMap*(__thiscall*)(CPhase* thisptr);
GetObjectMap getObjectMap;
using GetCurrentPlayerId = const CMidgardID*(__thiscall*)(CPhase* thisptr);
GetCurrentPlayerId getCurrentPlayerId;
};
Api& get();
} // namespace CPhaseApi
} // namespace game
#endif // PHASE_H
| 1,520
|
C++
|
.h
| 50
| 28.12
| 79
| 0.765636
|
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,680
|
smartptr.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/smartptr.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 SMARTPTR_H
#define SMARTPTR_H
namespace game {
/** Assumption: implementation of Boost refcount_ptr used in game. */
template <typename T>
struct SmartPtr
{
int* referenceCount;
T* data;
};
using SmartPointer = SmartPtr<void>;
namespace SmartPointerApi {
struct Api
{
/**
* Sets SmartPointer data or releases it, freeing memory if referenceCount equals zero.
* Calls virtual destructor with flag 1 to free object memory.
* @param[in] thisptr SmartPointer to initialize or free.
* @param[in] data pointer to managed memory.
*/
using CreateOrFree = void(__thiscall*)(SmartPointer* thisptr, void* data);
CreateOrFree createOrFree;
/**
* Sets SmartPointer data or releases it, freeing memory if referenceCount equals zero.
* Directly frees the memory allocated by the managed object.
* @param[in] thisptr SmartPointer to initialize or free.
* @param[in] data pointer to managed memory.
*/
using CreateOrFreeNoDestructor = void(__thiscall*)(SmartPointer* thisptr, void* data);
CreateOrFreeNoDestructor createOrFreeNoDtor;
using Copy = SmartPointer*(__thiscall*)(SmartPointer* thisptr, SmartPointer* other);
Copy copy;
};
Api& get();
} // namespace SmartPointerApi
} // namespace game
#endif // SMARTPTR_H
| 2,122
|
C++
|
.h
| 55
| 35.418182
| 91
| 0.743552
|
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,681
|
mq_c_s.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mq_c_s.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 MQ_C_S_H
#define MQ_C_S_H
#include "d2vector.h"
namespace game {
/** Structure with fast element lookup used in game. */
template <typename T>
struct mq_c_s
{
const void* vftable;
Vector<T> data;
};
} // namespace game
#endif // MQ_C_S_H
| 1,072
|
C++
|
.h
| 31
| 32.580645
| 72
| 0.745894
|
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,682
|
menunewskirmishsingle.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menunewskirmishsingle.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 MENUNEWSKIRMISHSINGLE_H
#define MENUNEWSKIRMISHSINGLE_H
#include "menunewskirmish.h"
namespace game {
/**
* Single player skirmish menu.
* Represents DLG_CHOOSE_SKIRMISH from Interf.dlg.
*/
struct CMenuNewSkirmishSingle : public CMenuNewSkirmish
{ };
assert_size(CMenuNewSkirmishSingle, 12);
namespace CMenuNewSkirmishSingleApi {
struct Api
{
/**
* Initializes CMenuNewSkirmishSingle object, sets vftable.
* @param[in] thisptr pointer to existing CMenuNewSkirmishSingle object.
* @param a1 meaning unknown.
* @returns thisptr.
*/
using Constructor = CMenuNewSkirmishSingle*(__thiscall*)(CMenuNewSkirmishSingle* thisptr,
CMenuPhase* menuPhase);
Constructor constructor;
};
Api& get();
struct Vftable
{
void* unknown[38];
};
Vftable* vftable();
} // namespace CMenuNewSkirmishSingleApi
} // namespace game
#endif // MENUNEWSKIRMISHSINGLE_H
| 1,776
|
C++
|
.h
| 51
| 31.176471
| 93
| 0.74007
|
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,683
|
groundcat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/groundcat.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 GROUNDCAT_H
#define GROUNDCAT_H
#include "categories.h"
namespace game {
struct LGroundCategoryTable : CEnumConstantTable<GroundId>
{ };
struct LGroundCategory : public Category<GroundId>
{ };
namespace GroundCategories {
struct Categories
{
LGroundCategory* plain;
LGroundCategory* water;
LGroundCategory* forest;
LGroundCategory* mountain;
};
Categories& get();
} // namespace GroundCategoryCategories
} // namespace game
#endif // GROUNDCAT_H
| 1,293
|
C++
|
.h
| 38
| 31.868421
| 72
| 0.772508
|
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,684
|
midgardplan.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midgardplan.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 MIDGARDPLAN_H
#define MIDGARDPLAN_H
#include "d2vector.h"
#include "midgardid.h"
#include "midscenarioobject.h"
#include "mqpoint.h"
#include <cstdint>
namespace game {
struct MidgardPlanElement
{
std::uint16_t y;
std::uint16_t x;
CMidgardID elementId;
};
assert_size(MidgardPlanElement, 8);
using PlanElements = Vector<MidgardPlanElement>;
struct CMidgardPlan : public IMidScenarioObject
{
CMidgardID unknownId;
int mapSize;
char data[5184]; /**< 144 * 36. Accessed as: 36 * posY + (posX >> 2) */
PlanElements elements;
PlanElements elements2;
};
assert_size(CMidgardPlan, 5232);
namespace CMidgardPlanApi {
struct Api
{
/**
* Searches for map object with specified type at position.
* @returns id of found object or nullptr if nothing found.
*/
using GetObjectId = const CMidgardID*(__thiscall*)(const CMidgardPlan* thisptr,
const CMqPoint* mapPosition,
const IdType* type);
GetObjectId getObjectId;
/** Returns true if plan contains object of one of the specified types at position. */
using IsPositionContainsObjects = bool(__thiscall*)(const CMidgardPlan* thisptr,
const CMqPoint* mapPosition,
const IdType* objectTypes,
std::uint32_t typesTotal);
IsPositionContainsObjects isPositionContainsObjects;
};
Api& get();
} // namespace CMidgardPlanApi
} // namespace game
#endif // MIDGARDPLAN_H
| 2,480
|
C++
|
.h
| 65
| 31.292308
| 90
| 0.669583
|
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,685
|
midanim2system.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midanim2system.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 MIDANIM2SYSTEM_H
#define MIDANIM2SYSTEM_H
#include "midcommandqueue2.h"
#include "twospeedanimator.h"
namespace game {
struct IMidgardObjectMap;
struct IMidAnim2;
using IMidAnim2Ptr = SmartPtr<IMidAnim2>;
struct CMidAnim2System
{
struct Impl
: public CTwoSpeedAnimator::ITwoSpeedAnimation
, public CMidCommandQueue2::INotifyCQ
{
List<IMidAnim2Ptr> animations;
ListIterator<IMidAnim2Ptr> currentAnimation;
CMidgardID playerId;
IdList playerIdList;
CMidgardID playerIdCopy;
CTwoSpeedAnimator* slowAnimator;
CTwoSpeedAnimator* fastAnimator;
CMidCommandQueue2* commandQueue;
IMidgardObjectMap* objectMap;
bool unknown9;
bool unknown10;
char padding2[2];
CMidAnim2System* animSystem;
};
CMidAnim2System::Impl* impl;
};
assert_size(CMidAnim2System::Impl, 84);
assert_size(CMidAnim2System, 4);
} // namespace game
#endif // MIDANIM2SYSTEM_H
| 1,800
|
C++
|
.h
| 52
| 30.480769
| 72
| 0.745685
|
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,686
|
eventconditioncat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/eventconditioncat.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 EVENTCONDITIONCAT_H
#define EVENTCONDITIONCAT_H
#include "categories.h"
namespace game {
struct LEventCondCategoryTable : public CEnumConstantTable<EventConditionId>
{ };
struct LEventCondCategory : public Category<EventConditionId>
{ };
namespace EventCondCategories {
struct Categories
{
LEventCondCategory* frequency;
LEventCondCategory* location;
LEventCondCategory* enterCity;
LEventCondCategory* ownCity;
LEventCondCategory* killStack;
LEventCondCategory* ownItem;
LEventCondCategory* leaderOwnItem;
LEventCondCategory* diplomacy;
LEventCondCategory* alliance;
LEventCondCategory* lootRuin;
LEventCondCategory* transformLand;
LEventCondCategory* visitSite;
LEventCondCategory* leaderToZone;
LEventCondCategory* leaderToCity;
LEventCondCategory* itemToLocation;
LEventCondCategory* stackExists;
LEventCondCategory* varInRange;
};
Categories& get();
/** Returns address of LEventCondCategory::vftable used in game. */
const void* vftable();
} // namespace EventCondCategories
namespace LEventCondCategoryTableApi {
using Api = CategoryTableApi::Api<LEventCondCategoryTable, LEventCondCategory>;
Api& get();
/** Returns address of LEventCondCategoryTable::vftable used in game. */
const void* vftable();
} // namespace LEventCondCategoryTableApi
} // namespace game
#endif // EVENTCONDITIONCAT_H
| 2,204
|
C++
|
.h
| 59
| 34.627119
| 79
| 0.791353
|
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,687
|
stdfileimpl.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/stdfileimpl.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 STDFILEIMPL_H
#define STDFILEIMPL_H
#include "d2assert.h"
namespace game {
struct IStdFileImplVftable;
/**
* Interface for low-level data streaming.
* Derived types used for streaming into memory buffer (CStdFileBuffer) or file (CStdFileHandle).
*/
struct IStdFileImpl
{
IStdFileImplVftable* vftable;
};
struct IStdFileImplVftable
{
using Destructor = void(__thiscall*)(IStdFileImpl* thisptr, char flags);
Destructor destructor;
/** Returns true if stream is opened and ready. */
using GetBool = bool(__thiscall*)(const IStdFileImpl* thisptr);
GetBool isOpened;
/** Closes the stream. */
using Close = void(__thiscall*)(IStdFileImpl* thisptr);
Close close;
/** Sets stream position. */
using SetFilePointer = void(__thiscall*)(IStdFileImpl* thisptr,
unsigned int distance,
unsigned int moveMethod);
SetFilePointer setFilePointer;
using GetUint = unsigned int(__thiscall*)(const IStdFileImpl* thisptr);
/** Returns current stream position. */
GetUint getFilePointer;
/** Returns size of file or buffer. */
GetUint getFileSize;
/** Returns true if stream position points at the end. */
GetBool isFilePointerAtEnd;
/**
* Writes specified number of bytes from buffer into stream.
* @returns number of bytes written.
*/
using Write = unsigned int(__thiscall*)(IStdFileImpl* thisptr,
const void* buffer,
unsigned int numBytes);
Write write;
/**
* Reads stream contents into buffer with specified size.
* @returns number of bytes read.
*/
using Read = unsigned int(__thiscall*)(IStdFileImpl* thisptr,
void* buffer,
unsigned int numBytes);
Read read;
/**
* Writes specified string, adds '\r' symbols after each '\n' if needed.
* @returns number of bytes written.
*/
using WriteString = unsigned int(__thiscall*)(IStdFileImpl* thisptr, const char* string);
WriteString writeString;
/**
* Reads string contents into bufer with specified size.
* @returns number of bytes read.
*/
using ReadString = unsigned int(__thiscall*)(IStdFileImpl* thisptr,
char* string,
unsigned int numBytes);
ReadString readString;
/**
* Returns stream handle.
* Returns nullptr for CStdFileBuffer, Win32 HANDLE for CStdFileHandle.
*/
using GetHandle = void*(__thiscall*)(IStdFileImpl* thisptr);
GetHandle getHandle;
};
assert_vftable_size(IStdFileImplVftable, 12);
} // namespace game
#endif // STDFILEIMPL_H
| 3,693
|
C++
|
.h
| 93
| 32.107527
| 97
| 0.651579
|
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,688
|
imgfactory.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/imgfactory.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 IMGFACTORY_H
#define IMGFACTORY_H
#include "d2string.h"
#include "d2vector.h"
#include "mqimage2.h"
#include "smartptr.h"
namespace game {
struct CImgFactory
{
struct ImageVftable;
struct Image
{
ImageVftable* vftable;
};
struct IdManagerVftable;
struct IdManager
{
IdManagerVftable* vftable;
int value;
};
struct FactoryLoaderVftable;
struct FactoryLoader
{
FactoryLoaderVftable* vftable;
};
};
using IdManagerSmartPtr = SmartPtr<CImgFactory::IdManager>;
struct CImgFactory::ImageVftable : public IMqImage2Vftable
{
using GetImage = IMqImage2*(__thiscall*)(const Image* thisptr, std::uint32_t imageIndex);
GetImage getImage;
using IsUnknownReset = bool(__thiscall*)(const Image* thisptr);
IsUnknownReset isUnknownReset;
};
assert_vftable_size(CImgFactory::ImageVftable, 11);
struct CImgFactory::IdManagerVftable
{
using Destructor = void(__thiscall*)(CImgFactory::IdManager* thisptr, char flags);
Destructor destructor;
/** Returns sum of IdManager::value and a2. */
using Method1 = int(__thiscall*)(CImgFactory::IdManager* thisptr, int a2);
Method1 method1;
/**
* Returns difference between a2 and IdManager::value if a2 is greater.
* Otherwise, returns a2 as is.
*/
using Method2 = int(__thiscall*)(CImgFactory::IdManager* thisptr, int a2);
Method2 method2;
};
assert_vftable_size(CImgFactory::IdManagerVftable, 3);
struct CImgFactory::FactoryLoaderVftable
{
using Destructor = void(__thiscall*)(CImgFactory::FactoryLoader* thisptr, char flags);
Destructor destructor;
using LoadImageNames = void(__thiscall*)(CImgFactory::FactoryLoader* thisptr,
const char* imageName,
Vector<String>* imageNames);
LoadImageNames loadImageNames;
};
assert_vftable_size(CImgFactory::FactoryLoaderVftable, 2);
struct CImgFactoryAnimLoaderWeakDup : public CImgFactory::FactoryLoader
{
CImgFactory::FactoryLoader* factoryLoader;
};
assert_size(CImgFactoryAnimLoaderWeakDup, 8);
} // namespace game
#endif // IMGFACTORY_H
| 3,001
|
C++
|
.h
| 85
| 30.847059
| 93
| 0.726833
|
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,689
|
midmsgsender.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midmsgsender.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 MIDMSGSENDER_H
#define MIDMSGSENDER_H
#include "d2assert.h"
namespace game {
struct IMidMsgSenderVftable;
struct CMidgardID;
struct CCommandMsg;
struct CBatLogic;
struct BattleMsgData;
struct IMidMsgSender
{
IMidMsgSenderVftable* vftable;
};
struct IMidMsgSenderVftable
{
using Destructor = void(__thiscall*)(IMidMsgSender* thisptr, char flags);
Destructor destructor;
/** Sends objects changes using CRefreshInfo and CCmdEraseObj messages. */
using SendObjectsChanges = bool(__thiscall*)(IMidMsgSender* thisptr);
SendObjectsChanges sendObjectsChanges;
/** Sets player id to the message and calls 'sendMessage'. */
using SendPlayerMessage = int(__thiscall*)(IMidMsgSender* thisptr,
CCommandMsg* commandMsg,
const CMidgardID* playerId,
char a4);
SendPlayerMessage sendPlayerMessage;
/**
* Sends command message.
* CMidServerLogic checks for player info, message queue
* and command message type before sending.
*/
using SendMessage = int(__thiscall*)(IMidMsgSender* thisptr, CCommandMsg* commandMsg, char a3);
SendMessage sendMessage;
/** Starts battle between two unit groups. */
using StartBattle = int(__thiscall*)(IMidMsgSender* thisptr,
bool duelMode,
const CMidgardID* attackerGroupId,
const CMidgardID* defenderGroupId);
StartBattle startBattle;
/** Ends battle and applies battle results. */
using EndBattle = char(__thiscall*)(IMidMsgSender* thisptr,
CBatLogic* batLogic,
BattleMsgData* battleMsgData);
EndBattle endBattle;
/** Adds a single fast battle action to the AI message queue. */
using FastBattleAction = bool(__thiscall*)(IMidMsgSender* thisptr,
const BattleMsgData* battleMsgData,
const CMidgardID* unitId);
FastBattleAction fastBattleAction;
/**
* Meaning assumed.
* Set to 1 before sending CCmdUpdateLeadersMsg in the method of CEffectPlayerTurn class.
* Reset to 0 in another method of CEffectPlayerTurn.
*/
using SetUpgradeLeaders = bool(__thiscall*)(IMidMsgSender* thisptr, bool value);
SetUpgradeLeaders setUpgradeLeaders;
/** Sets player with specified as scenario winner. In case of empty id all players lose. */
using WinScenario = bool(__thiscall*)(IMidMsgSender* thisptr, const CMidgardID* winnerPlayerId);
WinScenario winScenario;
/**
* Meaning assumed.
* Sends CCmdExportLeaderMsg command.
*/
using ExportLeaders = bool(__thiscall*)(IMidMsgSender* thisptr);
ExportLeaders exportLeaders;
};
assert_vftable_size(IMidMsgSenderVftable, 10);
} // namespace game
#endif // MIDMSGSENDER_H
| 3,865
|
C++
|
.h
| 87
| 35.977011
| 100
| 0.669681
|
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,690
|
d2set.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/d2set.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 D2SET_H
#define D2SET_H
#include "d2tree.h"
namespace game {
/** Implementation of std::set<T> used in game. */
template <typename T, typename Allocator = void*>
using Set = Tree<T, Allocator>;
template <typename T>
using SetNode = TreeNode<T>;
template <typename T>
using SetIterator = TreeIterator<T>;
} // namespace game
#endif // D2SET_H
| 1,170
|
C++
|
.h
| 31
| 35.935484
| 72
| 0.756852
|
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,691
|
mempool.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mempool.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 MEMPOOL_H
#define MEMPOOL_H
namespace game::Memory {
struct Api
{
/** Allocates memory using ingame custom allocator (SmartHeap ?). */
using Allocate = void*(__cdecl*)(int sizeBytes);
Allocate allocate;
/** Frees allocated memory if pointer is not null. */
using FreeNonZero = void(__cdecl*)(void*);
FreeNonZero freeNonZero;
};
Api& get();
} // namespace game::Memory
#endif // MEMPOOL_H
| 1,239
|
C++
|
.h
| 33
| 35.090909
| 72
| 0.739783
|
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,692
|
midserverlogic.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midserverlogic.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 MIDSERVERLOGIC_H
#define MIDSERVERLOGIC_H
#include "d2set.h"
#include "idset.h"
#include "midmsgsender.h"
#include "midserverlogiccore.h"
namespace game {
struct CMidServerLogic;
struct CMidServer;
struct CStreamBits;
struct AiLogic;
struct CMidgardScenarioMap;
/*
* All the fields initially point to the same parent logic. Is this some kind of enumerable
* collection pattern?
*/
struct CMidServerLogicData
{
CMidServerLogic* logic;
CMidServerLogic** logic2;
CMidServerLogic** logic3;
};
assert_size(CMidServerLogicData, 12);
struct CMidServerLogicData2
{
CMidgardID unknownId;
int unknown;
int unknown2;
Vector<void*> array;
Vector<void*> array2;
Vector<void*> array3;
Vector<void*> array4;
Vector<void*> array5;
Vector<void*> array6;
Set<CMidgardID> list;
Set<void> list2;
};
assert_size(CMidServerLogicData2, 164);
assert_offset(CMidServerLogicData2, array, 12);
assert_offset(CMidServerLogicData2, array2, 28);
assert_offset(CMidServerLogicData2, array3, 44);
assert_offset(CMidServerLogicData2, array4, 60);
assert_offset(CMidServerLogicData2, array5, 76);
assert_offset(CMidServerLogicData2, array6, 92);
assert_offset(CMidServerLogicData2, list, 108);
assert_offset(CMidServerLogicData2, list2, 136);
struct CMidServerLogic
: public CMidServerLogicCore
, public IMidMsgSender
{
CMidServer* midServer;
int unknown2;
int unknown3;
CMidServerLogicData data;
Vector<AiLogic*> aiLogic;
AiLogic* currentAi;
List<CMidgardID> playersIdList;
CStreamBits* streamBits;
int unknown7;
CMidServerLogicData2 data2;
int unknown8;
int unknown9;
bool turnNumberIsZero;
char padding[3];
List<void*> list;
int unknown11;
int unknown12;
std::uint32_t aiMessageId;
int unknown14;
bool upgradeLeaders;
char padding2[3];
int unknown16;
CMidgardID winnerPlayerId;
List<void*> list2;
char unknown17;
char padding3[3];
BattleMsgData* battleMsgData;
};
assert_size(CMidServerLogic, 324);
assert_offset(CMidServerLogic, CMidServerLogic::IMidMsgSender::vftable, 8);
assert_offset(CMidServerLogic, data, 24);
assert_offset(CMidServerLogic, aiLogic, 36);
assert_offset(CMidServerLogic, playersIdList, 56);
assert_offset(CMidServerLogic, data2, 80);
assert_offset(CMidServerLogic, unknown8, 244);
assert_offset(CMidServerLogic, unknown11, 272);
assert_offset(CMidServerLogic, list2, 300);
assert_offset(CMidServerLogic, unknown17, 316);
static inline CMidServerLogic* castMidMsgSenderToMidServerLogic(const IMidMsgSender* sender)
{
return reinterpret_cast<CMidServerLogic*>(
(uintptr_t)sender - offsetof(CMidServerLogic, CMidServerLogic::IMidMsgSender::vftable));
}
namespace CMidServerLogicApi {
struct Api
{
using GetObjectMap = CMidgardScenarioMap*(__thiscall*)(const CMidServerLogic* thisptr);
GetObjectMap getObjectMap;
using SendRefreshInfo = bool(__thiscall*)(const CMidServerLogic* thisptr,
const Set<CMidgardID>* objectsList,
std::uint32_t playerNetId);
SendRefreshInfo sendRefreshInfo;
using StackExchangeItem = void(__thiscall*)(CMidServerLogicData* thisptr,
const CMidgardID* playerId,
const CMidgardID* fromStackId,
const CMidgardID* toStackId,
const IdSet* itemIds);
StackExchangeItem stackExchangeItem;
};
Api& get();
struct Vftable
{
const void* mqNetTraffic;
const IMidMsgSenderVftable* midMsgSender;
};
Vftable& vftable();
} // namespace CMidServerLogicApi
} // namespace game
#endif // MIDSERVERLOGIC_H
| 4,641
|
C++
|
.h
| 137
| 28.927007
| 96
| 0.726745
|
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,693
|
mqdb.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/mqdb.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 MQDB_H
#define MQDB_H
#include "d2list.h"
#include "d2map.h"
#include "d2pair.h"
#include "d2string.h"
#include "d2unorderedmap.h"
#include "d2vector.h"
#include "mq_c_s.h"
#include "quickstring.h"
#include "smartptr.h"
namespace game {
struct MQDBPackedImage;
/** Table of contents (ToC) record inside of .ff file. */
struct MQDBTocRecord
{
/** Unique record id */
std::uint32_t recordId;
/** Size of contents in this record, in bytes */
std::uint32_t size;
/** Total record size, in bytes */
std::uint32_t allocatedSize;
/** Offset from the start of the file to associated MQRC record */
std::uint32_t recordContentsOffset;
};
assert_size(MQDBTocRecord, 16);
/** Implementation of std::unordered_map<std::uint32_t, MQDBTocRecord> used in game */
using MQDBRecordMap = UnorderedMap<std::uint32_t /* record id */,
MQDBTocRecord,
Pair<Pair<char, char[3]>, int>>;
assert_size(MQDBRecordMap, 44);
struct MQDBFile
{
String filePath;
String error;
void* fileHandle; /**< Actual type is HANDLE */
int unk8;
int fileOffset;
int freeId;
MQDBRecordMap tocRecords; /**< Table of Contents records */
MQDBRecordMap notUnused;
};
assert_size(MQDBFile, 136);
using RecordNameIdPair = Pair<quick_string<256u> /* record name */, std::uint32_t /* record id */>;
assert_size(RecordNameIdPair, 264);
using mq_o_c_s = mq_c_s<RecordNameIdPair>;
assert_size(mq_o_c_s, 20);
struct MQDBData
{
MQDBFile** mqdb;
mq_o_c_s* stringPairs; /**< For fast ToC record access by its name */
};
assert_size(MQDBData, 8);
struct MQDBDataWrapper
{
MQDBData* data;
};
assert_size(MQDBDataWrapper, 4);
using IndexOptOffsetSizePair = Pair<std::uint32_t /* offset */, std::uint32_t /* size */>;
using IndexOptRecordIdFlippedPair = Pair<std::uint32_t /* record id */, bool /* flipped */>;
struct MQDBImageData
{
MQDBDataWrapper* imagesData;
/** Actual type is HANDLE */
void* imagesOptHandle;
/** Offset to '-images.opt' record data from the beginning of file. -1 if there is no record. */
int imagesOptDataOffset;
/** Actual type is HANDLE */
void* animsOptHandle;
/** Offset to '-anims.opt' record data from the beginning of file. -1 if there is no record. */
int animsOptDataOffset;
// Next 3 vectors have the same length and should be accessed using same index,
// they describe images
/** Valid record ids from '-index.opt' contents */
Vector<std::uint32_t> indexOptRecordIds;
/** Image names corresponding to valid record ids from '-index.opt' contents */
Vector<String> indexOptStrings;
Vector<IndexOptOffsetSizePair> indexOptPairs;
// Next 2 vectors have the same length and should be accessed using same index,
// they describe animation frames
// Animation frames are marked with invalid record id (-1) inside of '-index.opt' contents.
Vector<String> indexOptStringsNoIdx;
Vector<IndexOptOffsetSizePair> indexOptPairsNoIdx;
Map<IndexOptRecordIdFlippedPair, SmartPtr<MQDBPackedImage>> loadedImages;
List<Pair<int /* indexOptRecordId */, int /* flipped */>> list;
char unknown5[72];
};
assert_size(MQDBImageData, 216);
struct MQDBImageDataWrapper
{
MQDBImageData* data;
};
assert_size(MQDBImageDataWrapper, 4);
} // namespace game
#endif // MQDB_H
| 4,205
|
C++
|
.h
| 113
| 33.654867
| 100
| 0.715937
|
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,694
|
midevconditionhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midevconditionhooks.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 MIDEVCONDITIONHOOKS_H
#define MIDEVCONDITIONHOOKS_H
namespace game {
struct CMidEvCondition;
struct LEventCondCategory;
struct String;
struct IMidgardObjectMap;
} // namespace game
namespace hooks {
game::CMidEvCondition* __stdcall createEventConditionFromCategoryHooked(
const game::LEventCondCategory* category);
void __stdcall eventConditionGetInfoStringHooked(game::String* info,
const game::IMidgardObjectMap* objectMap,
const game::CMidEvCondition* eventCondition);
void __stdcall eventConditionGetDescriptionHooked(game::String* description,
const game::LEventCondCategory* category);
void __stdcall eventConditionGetBriefHooked(game::String* brief,
const game::LEventCondCategory* category);
} // namespace hooks
#endif // MIDEVCONDITIONHOOKS_H
| 1,778
|
C++
|
.h
| 38
| 39.947368
| 94
| 0.71346
|
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,695
|
menunewskirmishsinglehooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menunewskirmishsinglehooks.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 MENUNEWSKIRMISHSINGLEHOOKS_H
#define MENUNEWSKIRMISHSINGLEHOOKS_H
namespace game {
struct CMenuNewSkirmishSingle;
struct CMenuPhase;
} // namespace game
namespace hooks {
game::CMenuNewSkirmishSingle* __fastcall menuNewSkirmishSingleCtorHooked(
game::CMenuNewSkirmishSingle* thisptr,
int /*%edx*/,
game::CMenuPhase* menuPhase);
}
#endif // MENUNEWSKIRMISHSINGLEHOOKS_H
| 1,207
|
C++
|
.h
| 31
| 36.806452
| 73
| 0.780342
|
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,696
|
stringarray.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/stringarray.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 STRINGARRAY_H
#define STRINGARRAY_H
#include "d2assert.h"
#include "d2vector.h"
namespace game {
struct String;
using StringArray = Vector<String>;
assert_size(StringArray, 16);
namespace StringArrayApi {
struct Api
{
using Destructor = void(__thiscall*)(StringArray* thisptr);
Destructor destructor;
using Reserve = void(__thiscall*)(StringArray* thisptr, unsigned int count);
Reserve reserve;
/**
* Adds new string element to the end of the array.
* @param[in] thisptr pointer to array to add to.
* @param[in] string element to push.
* @returns unknown.
*/
using PushBack = void*(__thiscall*)(StringArray* thisptr, const String* string);
PushBack pushBack;
};
/** Returns StringArray functions according to determined version of the game. */
Api& get();
} // namespace StringArrayApi
} // namespace game
#endif // STRINGARRAY_H
| 1,717
|
C++
|
.h
| 47
| 33.744681
| 84
| 0.74215
|
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,697
|
exchangeinterfhooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/exchangeinterfhooks.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 EXCHANGEINTERFHOOKS_H
#define EXCHANGEINTERFHOOKS_H
namespace game {
struct CExchangeInterf;
struct IMidScenarioObject;
} // namespace game
namespace hooks {
void __fastcall exchangeInterfOnObjectChangedHooked(game::CExchangeInterf* thisptr,
int /*%edx*/,
game::IMidScenarioObject* obj);
} // namespace hooks
#endif // EXCHANGEINTERFHOOKS_H
| 1,272
|
C++
|
.h
| 30
| 37.166667
| 83
| 0.716019
|
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,698
|
aiblockingstats.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aiblockingstats.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 AIBLOCKINGSTACKS_H
#define AIBLOCKINGSTACKS_H
#include "idlist.h"
namespace game {
struct CAiBlockingStacksVftable;
struct CAiLog;
struct CAiBlockingStacks
{
CAiBlockingStacksVftable* vftable;
IdList list;
CAiLog* aiLog;
};
assert_size(CAiBlockingStacks, 24);
struct CAiBlockingStacksVftable
{
using Destructor = void(__thiscall*)(CAiBlockingStacks* thisptr, char flags);
Destructor destructor;
};
} // namespace game
#endif // AIBLOCKINGSTACKS_H
| 1,296
|
C++
|
.h
| 38
| 31.894737
| 81
| 0.77502
|
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,699
|
attack.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/attack.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 ATTACK_H
#define ATTACK_H
#include "attackclasscat.h"
#include "attackreachcat.h"
#include "attacksourcecat.h"
#include "d2assert.h"
#include "idvector.h"
#include "midobject.h"
#include "textandid.h"
#include <cstdint>
namespace game {
struct IAttackVftable;
struct CAttackData;
/** Base class for units attacks. */
struct IAttack : IMidObjectT<IAttackVftable>
{ };
struct IAttackVftable : IMidObjectVftable
{
using GetCStr = const char*(__thiscall*)(const IAttack* thisptr);
GetCStr getName;
GetCStr getDescription;
using GetAttackClass = LAttackClass*(__thiscall*)(const IAttack* thisptr);
GetAttackClass getAttackClass;
using GetAttackSource = LAttackSource*(__thiscall*)(const IAttack* thisptr);
GetAttackSource getAttackSource;
using GetInitiative = int(__thiscall*)(const IAttack* thisptr);
GetInitiative getInitiative;
/** Power is chance to hit / accuracy. */
using GetPower = int*(__thiscall*)(const IAttack* thisptr, int* power);
GetPower getPower;
using GetAttackReach = LAttackReach*(__thiscall*)(const IAttack* thisptr);
GetAttackReach getAttackReach;
using GetInt = int(__thiscall*)(const IAttack* thisptr);
GetInt getQtyDamage;
GetInt getQtyHeal;
/** Meaning assumed. */
using GetDrain = int(__thiscall*)(const IAttack* thisptr, int damage);
GetDrain getDrain;
GetInt getLevel;
using GetId = const CMidgardID*(__thiscall*)(const IAttack* thisptr);
GetId getAltAttackId;
using GetBool = bool(__thiscall*)(const IAttack* thisptr);
GetBool getInfinite;
using GetWards = IdVector*(__thiscall*)(const IAttack* thisptr);
GetWards getWards;
GetBool getCritHit;
using GetData = void(__thiscall*)(const IAttack* thisptr, CAttackData* value);
GetData getData;
};
assert_vftable_size(IAttackVftable, 17);
/** Contains values and references to CAttackImplData fields. */
struct CAttackData
{
CMidgardID attackId;
int initiative;
int power;
int qtyDamage;
int qtyHeal;
TextAndId* name;
TextAndId* description;
LAttackClass* attackClass;
LAttackSource* attackSource;
LAttackReach* attackReach;
int level;
CMidgardID altAttack;
bool infinite;
union
{
struct
{
std::uint8_t damageRatio;
bool damageRatioPerTarget;
bool damageSplit;
};
char padding[3];
};
IdVector wards;
bool critHit;
union
{
struct
{
std::uint8_t critDamage;
std::uint8_t critPower;
};
char padding2[3];
};
};
namespace IAttackApi {
const IAttackVftable* vftable();
} // namespace IAttackApi
} // namespace game
#endif // ATTACK_H
| 3,573
|
C++
|
.h
| 111
| 27.846847
| 82
| 0.714494
|
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,700
|
attackreachcat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/attackreachcat.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 ATTACKREACHCAT_H
#define ATTACKREACHCAT_H
#include "categories.h"
namespace game {
struct LAttackReachTable : CEnumConstantTable<AttackReachId>
{ };
struct LAttackReach : public Category<AttackReachId>
{ };
namespace AttackReachCategories {
struct Categories
{
LAttackReach* all;
LAttackReach* any;
LAttackReach* adjacent;
};
Categories& get();
/** Returns address of LAttackReach::vftable used in game. */
const void* vftable();
} // namespace AttackReachCategories
namespace LAttackReachTableApi {
using Api = CategoryTableApi::Api<LAttackReachTable, LAttackReach>;
Api& get();
/** Returns address of LAttackReachTable::vftable used in game. */
const void* vftable();
} // namespace LAttackReachTableApi
} // namespace game
#endif // ATTACKREACHCAT_H
| 1,602
|
C++
|
.h
| 45
| 33.577778
| 72
| 0.775974
|
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,701
|
formattedtext.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/formattedtext.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 FORMATTEDTEXT_H
#define FORMATTEDTEXT_H
#include "d2color.h"
#include "d2list.h"
#include "d2vector.h"
#include "smartptr.h"
namespace game {
struct CMqRect;
struct CMqPoint;
struct SurfaceDecompressData;
struct IFormatString;
struct IFormattedTextVftable;
struct IFormattedText
{
IFormattedTextVftable* vftable;
};
struct IFormattedTextVftable
{
using Destructor = void(__thiscall*)(IFormattedText* thisptr, char flags);
Destructor destructor;
using GetFormatString = IFormatString*(__thiscall*)(IFormattedText* thisptr);
GetFormatString getFormatString;
using Draw = CMqPoint*(__thiscall*)(IFormattedText* thisptr,
CMqPoint* textSize,
SurfaceDecompressData* surfaceData,
const char* text,
CMqRect* area,
int a6);
Draw draw;
using Method2 =
int*(__thiscall*)(IFormattedText* thisptr, int a2, char* str, unsigned int a4, int a5);
Method2 method2;
using Method3 = unsigned int(__thiscall*)(IFormattedText* thisptr,
int a2,
unsigned int a3,
int a4);
Method3 method3;
using Method4 = unsigned int(__thiscall*)(IFormattedText* thisptr, int a2, char* str, int a4);
Method4 method4;
using GetFirstTokenWithNoSpecifierParts = void(__stdcall*)(Vector<char*>* charPtrArray,
char* str,
int dummy);
GetFirstTokenWithNoSpecifierParts getFirstTokenWithNoSpecifierParts;
using Method6 = void(__thiscall*)(IFormattedText* thisptr,
Vector<void*>* ptrArray,
char* str,
CMqRect* area);
Method6 method6;
using GetFirstTokenWithNoSpecifierPartsInRange = void(__stdcall*)(Vector<char*>* stringPtrArray,
int dummy,
const char* string,
const char* end);
GetFirstTokenWithNoSpecifierPartsInRange getFirstTokenWithNoSpecifierPartsInRange;
using GetHeightWithLineSpacingUntil = int(__thiscall*)(IFormattedText* thisptr,
char* textString,
unsigned int a3);
GetHeightWithLineSpacingUntil getHeightWithLineSpacingUntil;
using GetTextSize = CMqPoint*(__thiscall*)(IFormattedText* thisptr,
CMqPoint* size,
const char* text);
GetTextSize getTextSize;
using GetTextWidth = int(__thiscall*)(IFormattedText* thisptr, const char* text);
GetTextWidth getTextWidth;
using GetTextHeight = int(__thiscall*)(IFormattedText* thisptr, const char* text, int width);
GetTextHeight getTextHeight;
using GetTextColorsFromString = void(__stdcall*)(const char* string, List<Color>* textColors);
GetTextColorsFromString getTextColorsFromString;
using GetTextBgndColorsFromString = void(__stdcall*)(const char* string,
List<Color>* bgndColors);
GetTextBgndColorsFromString getTextBgndColorsFromString;
using GetTextOutlineColorsFromString = void(__stdcall*)(const char* string,
List<Color>* outlineColors);
GetTextOutlineColorsFromString getTextOutlineColorsFromString;
using GetFirstFmtSpecifierPtr = char*(__stdcall*)(char* str);
GetFirstFmtSpecifierPtr getFirstFmtSpecifierPtr;
using SetTextColor = void(__thiscall*)(IFormattedText* thisptr, Color value);
SetTextColor setTextColor;
using SetBgndColor = void(__thiscall*)(IFormattedText* thisptr, Color value);
SetBgndColor setBgndColor;
using SetOutlineColor = void(__thiscall*)(IFormattedText* thisptr, Color value);
SetOutlineColor setOutlineColor;
using SetUnknown4 = void(__thiscall*)(IFormattedText* thisptr, bool value);
SetUnknown4 setUnknown4;
};
assert_vftable_size(IFormattedTextVftable, 21);
using FormattedTextPtr = SmartPtr<IFormattedText>;
namespace IFormattedTextApi {
struct Api
{
using GetFormattedText = FormattedTextPtr*(__stdcall*)(FormattedTextPtr* fmtTextPtr);
GetFormattedText getFormattedText;
};
Api& get();
} // namespace IFormattedTextApi
} // namespace game
#endif // FORMATTEDTEXT_H
| 5,675
|
C++
|
.h
| 114
| 36.877193
| 100
| 0.622331
|
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,702
|
interfaceutils.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/interfaceutils.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 INTERFACEUTILS_H
#define INTERFACEUTILS_H
#include <string>
namespace game {
struct LAttackSource;
struct IEncUnitDescriptor;
struct CMidUnitDescriptor;
struct CUnitTypeDescriptor;
struct CLeaderUnitDescriptor;
struct CDynUpgrade;
struct TUsUnitImpl;
struct CPictureInterf;
struct IMqImage2;
struct CBorderedImg;
enum class AttackSourceId : int;
enum class AttackClassId : int;
enum class BorderType : int;
} // namespace game
namespace hooks {
const game::CMidUnitDescriptor* castToMidUnitDescriptor(const game::IEncUnitDescriptor* descriptor);
const game::CUnitTypeDescriptor* castToUnitTypeDescriptor(
const game::IEncUnitDescriptor* descriptor);
const game::CLeaderUnitDescriptor* castToLeaderUnitDescriptor(
const game::IEncUnitDescriptor* descriptor);
const game::TUsUnitImpl* getUnitImpl(const game::IEncUnitDescriptor* descriptor);
bool hasCriticalHitLeaderAbility(const game::IEncUnitDescriptor* descriptor);
std::string getNumberText(int value, bool percent);
std::string getBonusNumberText(int bonus, bool percent, bool reverse);
std::string addBonusNumberText(const std::string& base, int bonus, bool percent, bool reverse);
std::string getModifiedNumberText(int value, int base, bool percent);
std::string getModifiedNumberTextFull(int value, int base, bool percent);
std::string getModifiedNumberTextReverseBonus(int value, int base, bool percent);
std::string getModifiedNumberTextTotal(int value, int base, bool percent);
std::string getModifiedNumberTextTotalReverseBonus(int value, int base, bool percent);
std::string getModifiedStringText(const std::string& value, bool modified);
std::string getRemovedAttackWardText(const std::string& value);
std::string getAttackSourceText(const game::LAttackSource* source);
std::string getAttackSourceText(game::AttackSourceId id);
std::string getAttackClassText(game::AttackClassId id);
bool getDynUpgradesToDisplay(game::IEncUnitDescriptor* descriptor,
const game::CDynUpgrade** upgrade1,
const game::CDynUpgrade** upgrade2);
void addDynUpgradeLevelToField(std::string& text, const char* field, int level);
void addDynUpgradeTextToField(std::string& text, const char* field, int upgrade1, int upgrade2);
void setCenteredImage(game::CPictureInterf* picture, game::IMqImage2* image);
game::CBorderedImg* createBorderedImage(game::IMqImage2* image, game::BorderType borderType);
} // namespace hooks
#endif // INTERFACEUTILS_H
| 3,284
|
C++
|
.h
| 66
| 47.318182
| 100
| 0.800998
|
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,703
|
batattackdoppelganger.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattackdoppelganger.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 BATATTACKDOPPELGANGER_H
#define BATATTACKDOPPELGANGER_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
struct IAttack;
/** Represents doppelganger attacks. */
struct CBatAttackDoppelganger : public CBatAttackBase
{
CMidgardID unitId;
CMidgardID attackImplUnitId;
int attackNumber; /**< 1 if this is a unit's primary attack, 2 for secondary. */
IAttack* altAttackImpl;
bool hasTargetsToTransformInto;
bool unknown2;
char padding[2];
IBatAttack* altAttack;
};
assert_size(CBatAttackDoppelganger, 28);
namespace CBatAttackDoppelgangerApi {
IBatAttackVftable* vftable();
} // namespace CBatAttackDoppelgangerApi
} // namespace game
#endif // BATATTACKDOPPELGANGER_H
| 1,541
|
C++
|
.h
| 42
| 34.261905
| 84
| 0.774866
|
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,704
|
midstack.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midstack.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 MIDSTACK_H
#define MIDSTACK_H
#include "aipriority.h"
#include "idvector.h"
#include "mapelement.h"
#include "midinventory.h"
#include "midscenarioobject.h"
#include "midunitgroup.h"
#include "ordercat.h"
#include <cstddef>
#include <cstdint>
namespace game {
struct CMidUnitGroupStack : public CMidUnitGroup
{ };
struct CMidInventoryStack : public CMidInventory
{
int unknown;
};
/** Index map for CMidStack::leaderEquippedItems */
enum EquippedItemIdx
{
Banner = 0,
Tome,
Battle1,
Battle2,
Artifact1,
Artifact2,
Boots,
};
/**
* Holds stack related data in scenario file and game.
* Stack is a group of 6 units, one of which is a leader.
*/
struct CMidStack
: public IMapElement
, public IMidScenarioObject
{
IAiPriority aiPriority;
CMidgardID sourceTemplateId;
CMidgardID leaderId;
bool leaderAlive;
char padding[3];
CMidUnitGroupStack group;
CMidInventoryStack inventory;
IdVector leaderEquippedItems;
CMidgardID ownerId;
CMidgardID subraceId;
CMidgardID insideId;
std::uint8_t movement;
std::uint8_t facing;
std::uint8_t upgCount;
bool invisible;
bool aiIgnore;
char padding2[3];
LOrderCategory order;
CMidgardID orderTargetId;
LOrderCategory aiOrder;
CMidgardID aiOrderTargetId;
int creatLvl;
int nbBattle;
};
assert_size(CMidStack, 200);
assert_offset(CMidStack, CMidStack::IMapElement::vftable, 0);
assert_offset(CMidStack, CMidStack::IMidScenarioObject::vftable, 20);
assert_offset(CMidStack, id, 24);
assert_offset(CMidStack, leaderId, 40);
assert_offset(CMidStack, inventory, 100);
assert_offset(CMidStack, leaderEquippedItems, 124);
assert_offset(CMidStack, orderTargetId, 172);
namespace CMidStackApi {
struct Api
{
using SetPosition = bool(__thiscall*)(CMidStack* thisptr,
const IMidgardObjectMap* objectMap,
const CMqPoint* position,
bool checkArea);
SetPosition setPosition;
using SetOwner = bool(__thiscall*)(CMidStack* thisptr,
const IMidgardObjectMap* objectMap,
const CMidgardID* ownerId,
const CMidgardID* subraceId);
SetOwner setOwner;
};
Api& get();
const IMapElementVftable* vftable();
} // namespace CMidStackApi
} // namespace game
#endif // MIDSTACK_H
| 3,308
|
C++
|
.h
| 106
| 26.179245
| 77
| 0.704331
|
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,705
|
menucustomlobby.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menucustomlobby.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 MENUCUSTOMLOBBY_H
#define MENUCUSTOMLOBBY_H
#include "lobbycallbacks.h"
#include "menubase.h"
#include "uievent.h"
#include <memory>
#include <string>
#include <vector>
namespace game {
struct NetMsgEntryData;
struct CMenuFlashWait;
} // namespace game
namespace hooks {
struct RoomInfo
{
std::string name;
std::string hostName;
std::string password;
int totalSlots;
int usedSlots;
};
struct CMenuCustomLobby : public game::CMenuBase
{
game::UiEvent roomsListEvent;
std::vector<RoomInfo> rooms; // cached data
std::unique_ptr<UiUpdateCallbacks> uiCallbacks;
std::unique_ptr<RoomsListCallbacks> roomsCallbacks;
game::NetMsgEntryData** netMsgEntryData;
game::CMenuFlashWait* waitMenu;
bool loggedIn;
};
game::CMenuBase* __stdcall createCustomLobbyMenu(game::CMenuPhase* menuPhase);
void customLobbyShowError(const char* message);
void customLobbyProcessLogin(CMenuCustomLobby* menu, const char* accountName);
void customLobbyProcessLogout(CMenuCustomLobby* menu);
void customLobbySetRoomsInfo(CMenuCustomLobby* menu, std::vector<RoomInfo>&& rooms);
void customLobbyProcessJoinError(CMenuCustomLobby* menu, const char* message);
bool customLobbyCheckRoomPassword(CMenuCustomLobby* menu, const char* password);
} // namespace hooks
#endif // MENUCUSTOMLOBBY_H
| 2,139
|
C++
|
.h
| 58
| 34.5
| 84
| 0.784124
|
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,706
|
attackimpl.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/attackimpl.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 ATTACKIMPL_H
#define ATTACKIMPL_H
#include "attack.h"
#include "textandid.h"
#include <cstddef>
#include <cstdint>
namespace game {
struct GlobalData;
struct CDBTable;
struct CAttackImplData
{
int initiative;
int power;
int qtyDamage;
int qtyHeal;
TextAndId name;
TextAndId description;
LAttackClass attackClass;
LAttackSource attackSource;
LAttackReach attackReach;
int level;
CMidgardID altAttack;
bool infinite;
union
{
struct
{
std::uint8_t damageRatio;
bool damageRatioPerTarget;
bool damageSplit;
};
char padding[3];
};
IdVector wards;
bool critHit;
union
{
struct
{
std::uint8_t critDamage;
std::uint8_t critPower;
};
char padding2[3];
};
};
assert_size(CAttackImplData, 100);
assert_offset(CAttackImplData, attackSource, 44);
assert_offset(CAttackImplData, attackReach, 56);
assert_offset(CAttackImplData, critHit, 96);
/** Holds attack data read from GAttacks.dbf. */
struct CAttackImpl : public IAttack
{
CAttackImplData* data;
};
assert_size(CAttackImpl, 12);
namespace CAttackImplApi {
struct Api
{
using Constructor = CAttackImpl*(__thiscall*)(CAttackImpl* thisptr,
const CDBTable* dbTable,
const GlobalData** globalData);
Constructor constructor;
using Constructor2 = CAttackImpl*(__thiscall*)(CAttackImpl* thisptr, const CAttackData* data);
Constructor2 constructor2;
using InitData = CAttackImplData*(__thiscall*)(CAttackImplData* thisptr);
InitData initData;
};
Api& get();
/** Returns address of CAttackImpl::vftable used in game. */
const IAttackVftable* vftable();
} // namespace CAttackImplApi
} // namespace game
#endif // ATTACKIMPL_H
| 2,727
|
C++
|
.h
| 91
| 24.945055
| 98
| 0.693776
|
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,707
|
batattackdrain.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/batattackdrain.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 BATATTACKDRAIN_H
#define BATATTACKDRAIN_H
#include "batattack.h"
#include "midgardid.h"
namespace game {
struct IAttack;
/** Represents vampiric attacks. */
struct CBatAttackDrain : public CBatAttackBase
{
CMidgardID unitId;
CMidgardID id2;
int attackNumber;
IAttack* attack;
};
assert_size(CBatAttackDrain, 20);
namespace CBatAttackDrainApi {
IBatAttackVftable* vftable();
} // namespace CBatAttackDrainApi
} // namespace game
#endif // BATATTACKDRAIN_H
| 1,302
|
C++
|
.h
| 38
| 32.105263
| 72
| 0.771748
|
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,708
|
usnoble.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/usnoble.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 USNOBLE_H
#define USNOBLE_H
#include "usunitextension.h"
namespace game {
struct IUsNoble : public IUsUnitExtension
{ };
} // namespace game
#endif // USNOBLE_H
| 987
|
C++
|
.h
| 26
| 36.076923
| 72
| 0.764398
|
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,709
|
capital.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/capital.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 CAPITAL_H
#define CAPITAL_H
#include "fortification.h"
namespace game {
/** Holds capital city related data in scenario file and game. */
struct CCapital : public CFortification
{ };
assert_size(CCapital, 144);
} // namespace game
#endif // CAPITAL_H
| 1,078
|
C++
|
.h
| 28
| 36.642857
| 72
| 0.762224
|
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,710
|
lobbyclient.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/lobbyclient.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 LOBBYCLIENT_H
#define LOBBYCLIENT_H
#include <MessageIdentifiers.h>
namespace hooks {
extern const char* serverGuidColumnName;
extern const char* passwordColumnName;
enum ClientMessages
{
ID_CHECK_FILES_INTEGRITY = ID_USER_PACKET_ENUM + 1,
ID_FILES_INTEGRITY_RESULT,
};
/**
* Tries to register new account using credentials provided.
* @returns true if register request message was successfully send to the server.
*/
bool tryCreateAccount(const char* accountName,
const char* nickname,
const char* password,
const char* pwdRecoveryQuestion,
const char* pwdRecoveryAnswer);
/**
* Tries to login user with provided credentials.
* @returns true if login request message was successfully send to the server.
*/
bool tryLoginAccount(const char* accountName, const char* password);
/** Logouts currently logged user. */
void logoutAccount();
void setCurrentLobbyPlayer(const char* accountName);
/** Tries to create and enter a new room. */
bool tryCreateRoom(const char* roomName, const char* serverGuid, const char* password = nullptr);
/** Requests a list of rooms for specified account. */
bool trySearchRooms(const char* accountName = nullptr);
/** Tries to join existing room by its name. */
bool tryJoinRoom(const char* roomName);
/** Tries to change number of public slots in current room. */
bool tryChangeRoomPublicSlots(unsigned int publicSlots);
/** Tries to request files integrity check from the server. */
bool tryCheckFilesIntegrity(const char* hash);
} // namespace hooks
#endif // LOBBYCLIENT_H
| 2,445
|
C++
|
.h
| 58
| 38.827586
| 97
| 0.749895
|
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,711
|
deathanimcat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/deathanimcat.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 DEATHANIMCAT_H
#define DEATHANIMCAT_H
#include "categories.h"
namespace game {
struct LDeathAnimCategoryTable : CEnumConstantTable<DeathAnimationId>
{ };
struct LDeathAnimCategory : public Category<DeathAnimationId>
{ };
namespace DeathAnimCategories {
struct Categories
{
LDeathAnimCategory* elf;
LDeathAnimCategory* ghost;
LDeathAnimCategory* neutral;
LDeathAnimCategory* dragon;
LDeathAnimCategory* dwarf;
LDeathAnimCategory* human;
LDeathAnimCategory* undead;
LDeathAnimCategory* heretic;
};
Categories& get();
} // namespace DeathAnimCategories
} // namespace game
#endif // DEATHANIMCAT_H
| 1,458
|
C++
|
.h
| 42
| 32.285714
| 72
| 0.778648
|
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,712
|
uimanager.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/uimanager.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 UIMANAGER_H
#define UIMANAGER_H
#include "d2assert.h"
#include "smartptr.h"
#include <cstdint>
namespace game {
struct CMqPoint;
struct CMqUIControllerSimple;
struct CMqUIKernelSimple;
struct UiEvent;
struct CUIManagerData
{
CMqUIControllerSimple* uiController;
CMqUIKernelSimple* uiKernel;
};
assert_size(CUIManagerData, 8);
struct CUIManager
{
const void* vftable;
CUIManagerData* data;
};
assert_size(CUIManager, 8);
using UIManagerPtr = SmartPtr<CUIManager>;
namespace CUIManagerApi {
struct Api
{
using Get = UIManagerPtr*(__stdcall*)(UIManagerPtr* managerPtr);
Get get;
template <typename Callback>
using CreateEventFunctor = SmartPointer*(__stdcall*)(SmartPointer* functor,
int zero,
void* userData,
Callback* callback);
struct TimerEventCallback
{
using Callback = void(__thiscall*)(void* thisptr);
Callback callback;
int unknown;
};
/**
* Creates functor to be used in timer event.
* All functor creating functions here are reused since they implement the same logic.
* The only difference is the template arguments that were used in the original game code.
*/
using CreateTimerEventFunctor = CreateEventFunctor<TimerEventCallback>;
CreateTimerEventFunctor createTimerEventFunctor;
/**
* Creates event with user specified callback to be called periodically.
* Creates uiEvent with type UiEventType::Timer.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event. Actual type SmartPtr<CBFunctorDispatch0>.
* @param timeoutMs event triggering rate, in milliseconds.
* @returns pointer to uiEvent.
*/
using CreateTimerEvent = UiEvent*(__thiscall*)(CUIManager* thisptr,
UiEvent* uiEvent,
SmartPointer* functor,
std::uint32_t timeoutMs);
CreateTimerEvent createTimerEvent;
struct UpdateEventCallback
{
using Callback = bool(__thiscall*)(void* thisptr);
Callback callback;
};
/** Creates functor to be used in update event. */
using CreateUpdateEventFunctor = CreateEventFunctor<UpdateEventCallback>;
CreateUpdateEventFunctor createUpdateEventFunctor;
using CreateUiEvent = UiEvent*(__thiscall*)(CUIManager* thisptr,
UiEvent* uiEvent,
SmartPointer* functor);
/**
* Creates event with constant updates, callback is called from game message processing loop.
* Creates uiEvent with type UiEventType::Update.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event.
* Actual type SmartPtr<CBFunctorDispatch0wRet<bool>>.
* @returns pointer to uiEvent.
*/
CreateUiEvent createUpdateEvent;
/**
* Creates event with user callback that is called when window loses or receives focus.
* Creates uiEvent with type UiEventType::VisibilityChange.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event.
* Actual type SmartPtr<CBFunctorDispatch1<bool>>.
* @returns pointer to uiEvent.
*/
CreateUiEvent createVisibilityChangeEvent;
/**
* Creates event with user callback that is called when keyboard key is pressed.
* Creates uiEvent with type UiEventType::KeyPress.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event.
* Actual type SmartPtr<CBFunctorDispatch3<unsigned int, unsigned int, unsigned int>>.
* @returns pointer to uiEvent.
*/
CreateUiEvent createKeypressEvent;
/**
* Creates event with user callback that is called when mouse key is pressed.
* Creates uiEvent with type UiEventType::MousePress.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event.
* Actual type SmartPtr<CBFunctorDispatch3<unsigned short, unsigned short, const tagPOINT &>>.
* @returns pointer to uiEvent.
*/
CreateUiEvent createMousePressEvent;
/**
* Creates event with user callback that is called when mouse changes position.
* Creates uiEvent with type UiEventType::MouseButtonPress.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event.
* Actual type SmartPtr<CBFunctorDispatch2<unsigned short, const tagPOINT &>>.
* @returns pointer to uiEvent.
*/
CreateUiEvent createMouseMoveEvent;
/**
* Creates event with user callback that is called when player attempts to close game window.
* Creates uiEvent with type UiEventType::Close.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event.
* Actual type SmartPtr<CBFunctorDispatch0wRet<bool>>.
* @returns pointer to uiEvent.
*/
CreateUiEvent createCloseEvent;
using MessageEventCallback = void(__thiscall*)(void* thisptr, unsigned int, long);
/** Creates functor to be used in message event. */
using CreateMessageEventFunctor = CreateEventFunctor<MessageEventCallback>;
CreateMessageEventFunctor createMessageEventFunctor;
/**
* Creates event with user callback that is called when message previously created by
* RegisterMessage is received.
* Creates uiEvent with type UiEventType::Message.
* @param[inout] uiEvent event structure to store result. Caller is responsible to call
* destructor.
* @param[in] functor callback associated with event.
* Actual type SmartPtr<CBFunctorDispatch2<unsigned int, long>>.
* @param messageId message identifier from RegisterWindowMessage.
* @returns pointer to uiEvent.
*/
using CreateMessageEvent = UiEvent*(__thiscall*)(CUIManager* thisptr,
UiEvent* uiEvent,
SmartPointer* functor,
std::uint32_t messageId);
CreateMessageEvent createMessageEvent;
using GetMousePosition = CMqPoint*(__thiscall*)(const CUIManager* thisptr, CMqPoint* value);
GetMousePosition getMousePosition;
/**
* Registers message with specified name for use in message events.
* @param[in] messageName name of message to register.
* @returns message identifier.
*/
using RegisterMessage = std::uint32_t(__thiscall*)(CUIManager* thisptr,
const char* messageName);
RegisterMessage registerMessage;
};
Api& get();
} // namespace CUIManagerApi
} // namespace game
#endif // UIMANAGER_H
| 8,293
|
C++
|
.h
| 184
| 37.081522
| 99
| 0.683135
|
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,713
|
campaignstream.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/campaignstream.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 CAMPAIGNSTREAM_H
#define CAMPAIGNSTREAM_H
#include "stringpairarrayptr.h"
namespace game {
struct IMidgardStream;
struct IMidgardStreamEnv;
/** Wrapper that streams campaign scenarios objects. */
struct CampaignStream
{
IMidgardStream* stream;
IMidgardStreamEnv* streamEnv;
bool dbfStreamOpened;
char padding[3];
const char** dbfFileName;
StringPairArrayPtr ptr;
};
namespace CampaignStreamApi {
struct Api
{
using Constructor = CampaignStream*(__thiscall*)(CampaignStream* thisptr,
IMidgardStreamEnv* streamEnv,
const char** dbfFileName,
StringPairArrayPtr* ptr);
Constructor constructor;
using HasErrors = bool(__thiscall*)(const CampaignStream* thisptr);
HasErrors hasErrors;
using Destructor = void(__thiscall*)(CampaignStream* thisptr);
Destructor destructor;
};
Api& get();
} // namespace CampaignStreamApi
} // namespace game
#endif // CAMPAIGNSTREAM_H
| 1,900
|
C++
|
.h
| 51
| 31.607843
| 82
| 0.704793
|
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,714
|
menuprotocol.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/menuprotocol.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 MENUPROTOCOL_H
#define MENUPROTOCOL_H
#include "d2list.h"
#include "d2pair.h"
#include "d2string.h"
#include "menubase.h"
#include <guiddef.h>
namespace game {
struct ProtocolInfo
{
bool unknown;
char padding[3];
Pair<size_t, void*> info;
GUID guid;
String name;
};
assert_size(ProtocolInfo, 44);
struct CMenuProtocolData
{
List<ProtocolInfo> protocols;
};
assert_size(CMenuProtocolData, 16);
/**
* Network protocol selection screen.
* Represents DLG_PROTOCOL from Interf.dlg.
*/
struct CMenuProtocol : public CMenuBase
{
CMenuProtocolData* data;
};
assert_size(CMenuProtocol, 16);
namespace CMenuProtocolApi {
struct Api
{
using Constructor = CMenuProtocol*(__thiscall*)(CMenuProtocol* thisptr, CMenuPhase* menuPhase);
Constructor constructor;
/** Shows existing network protocols. */
using DisplayCallback = void(__thiscall*)(CMenuProtocol* thisptr,
String* string,
bool a3,
int selectedIndex);
DisplayCallback displayCallback;
/** Creates IMqNetService depending on player choice and advances to a next menu screen. */
using ButtonHandler = void(__thiscall*)(CMenuProtocol* thisptr);
ButtonHandler continueHandler;
/** Allocates memory and calls CMenuProtocol constructor. */
using CreateMenu = CMenuProtocol*(__stdcall*)(CMenuPhase* menuPhase);
CreateMenu createMenu;
};
Api& get();
} // namespace CMenuProtocolApi
} // namespace game
#endif // MENUPROTOCOL_H
| 2,415
|
C++
|
.h
| 71
| 29.521127
| 99
| 0.713672
|
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,715
|
netcustomplayer.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/netcustomplayer.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 NETCUSTOMPLAYER_H
#define NETCUSTOMPLAYER_H
#include "mqnetplayer.h"
#include "networkpeer.h"
#include <cstdint>
#include <string>
namespace game {
struct IMqNetSystem;
struct IMqNetReception;
} // namespace game
namespace hooks {
struct CNetCustomSession;
struct CNetCustomPlayer : public game::IMqNetPlayer
{
// Ports for SLNet peer, should be on the same IP as lobby client
static constexpr std::uint16_t serverPort{60000};
static constexpr std::uint16_t clientPort{60001};
CNetCustomPlayer(CNetCustomSession* session,
game::IMqNetSystem* netSystem,
game::IMqNetReception* netReception,
const char* name,
NetworkPeer::PeerPtr&& peer,
std::uint32_t netId);
~CNetCustomPlayer();
auto getPeer()
{
return netPeer.peer.get();
}
std::string name;
NetworkPeer netPeer;
CNetCustomSession* session;
game::IMqNetSystem* netSystem;
game::IMqNetReception* netReception;
std::uint32_t netId;
};
void playerLog(const std::string& message);
} // namespace hooks
#endif // NETCUSTOMPLAYER_H
| 1,980
|
C++
|
.h
| 56
| 30.803571
| 72
| 0.720042
|
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,716
|
subracecat.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/subracecat.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 SUBRACECAT_H
#define SUBRACECAT_H
#include "categories.h"
namespace game {
struct LSubRaceCategoryTable : public CEnumConstantTable<SubRaceId>
{ };
struct LSubRaceCategory : public Category<SubRaceId>
{ };
namespace SubraceCategories {
struct Categories
{
LSubRaceCategory* custom;
LSubRaceCategory* human;
LSubRaceCategory* dwarf;
LSubRaceCategory* heretic;
LSubRaceCategory* undead;
LSubRaceCategory* neutral;
LSubRaceCategory* neutralHuman;
LSubRaceCategory* neutralElf;
LSubRaceCategory* neutralGreenSkin;
LSubRaceCategory* neutralDragon;
LSubRaceCategory* neutralMarsh;
LSubRaceCategory* neutralWater;
LSubRaceCategory* neutralBarbarian;
LSubRaceCategory* neutralWolf;
LSubRaceCategory* elf;
};
Categories& get();
/** Returns address of LSubRaceCategory::vftable used in game. */
const void* vftable();
} // namespace SubraceCategories
namespace LSubRaceCategoryTableApi {
using Api = CategoryTableApi::Api<LSubRaceCategoryTable, LSubRaceCategory>;
Api& get();
/** Returns address of LSubRaceCategoryTable::vftable used in game. */
const void* vftable();
} // namespace LSubRaceCategoryTableApi
} // namespace game
#endif // SUBRACECAT_H
| 2,040
|
C++
|
.h
| 57
| 33.140351
| 75
| 0.781282
|
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,717
|
enclayoutunithooks.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/enclayoutunithooks.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 ENCLAYOUTUNITHOOKS_H
#define ENCLAYOUTUNITHOOKS_H
namespace game {
struct CMqRect;
struct CMidgardID;
struct IMidgardObjectMap;
struct CInterface;
struct IEncUnitDescriptor;
struct CEncParamBase;
struct CEncLayoutUnit;
struct CEncLayoutUnitData;
} // namespace game
namespace hooks {
game::CEncLayoutUnit* __fastcall encLayoutUnitCtorHooked(game::CEncLayoutUnit* thisptr,
int /*%edx*/,
const game::IMidgardObjectMap* objectMap,
game::CInterface* parent,
const game::CMqRect* area,
const game::CMidgardID* unitId,
const game::CEncParamBase* encParam,
const game::CMidgardID* playerId);
game::CEncLayoutUnit* __fastcall encLayoutUnitCtor2Hooked(game::CEncLayoutUnit* thisptr,
int /*%edx*/,
game::IEncUnitDescriptor* descriptor,
game::CInterface* parent,
const game::CMqRect* area,
const game::CEncParamBase* encParam);
game::CEncLayoutUnitData* __fastcall encLayoutUnitDataCtorHooked(game::CEncLayoutUnitData* thisptr,
int /*%edx*/);
void __fastcall encLayoutUnitDataDtorHooked(game::CEncLayoutUnitData* thisptr, int /*%edx*/);
void __fastcall encLayoutUnitInitializeHooked(game::CEncLayoutUnit* thisptr,
int /*%edx*/,
const game::CEncParamBase* encParam);
void __fastcall encLayoutUnitUpdateHooked(game::CEncLayoutUnit* thisptr, int /*%edx*/);
} // namespace hooks
#endif // ENCLAYOUTUNITHOOKS_H
| 2,972
|
C++
|
.h
| 54
| 37.851852
| 99
| 0.565187
|
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,718
|
ummodifier.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/ummodifier.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 UMMODIFIER_H
#define UMMODIFIER_H
#include "midgardid.h"
namespace game {
struct CUmModifierVftable;
struct CUmModifierData;
struct ModifierValue;
struct GlobalData;
struct IUsUnit;
struct LUnitCategory;
/**
* Stored as global instance by TUnitModifier.
* Most of the methods can be called on that instance (which is not applied to unit),
* to check it before applying, or for specific needs like providing city armor bonus.
* A copy is created every time it needs to be applied to unit.
*/
struct CUmModifier
{
const CUmModifierVftable* vftable;
CUmModifierData* data;
};
assert_size(CUmModifier, 8);
struct ModifierValue
{
bool initialized;
char padding[3];
int value;
};
assert_size(ModifierValue, 8);
/**
* Modifier element types (bitflags).
* Correspond to ModifierElementType enum (values are not identical).
*/
// clang-format off
enum class ModifierElementTypeFlag : int
{
None = 0b0000000000000000,
// Used by CUmStack
MoveAllowance = 0b0000000000000001,
ScoutingRange = 0b0000000000000010,
Leadership = 0b0000000000000100,
MoveAbility = 0b0000000000001000,
LeaderAbility = 0b0000000000010000,
// Used by CUmAttack
QtyDamage = 0b0000000000100000,
Power = 0b0000000001000000,
Initiative = 0b0000000010000000,
// Used by CUmUnit
Hp = 0b0000000100000000,
Regeneration = 0b0000001000000000,
Armor = 0b0000010000000000,
ImmunityAlways = 0b0000100000000000,
ImmunityOnce = 0b0001000000000000,
ImmunityclassAlways = 0b0010000000000000,
ImmunityclassOnce = 0b0100000000000000,
// Used by CUmAttack
AttackDrain = 0b1000000000000000,
};
// clang-format on
struct CUmModifierVftable
{
using Destructor = void(__thiscall*)(CUmModifier* thisptr, bool freeMemory);
Destructor destructor;
/** Called on global instance to create a copy to be applied to a unit. */
using Copy = CUmModifier*(__thiscall*)(const CUmModifier* thisptr);
Copy copy;
/**
* Called on global instance to check if can be applied if stack leader has specified
* leadership.
*/
using CanApplyWithLeadership = bool(__thiscall*)(const CUmModifier* thisptr,
const int* leadership);
CanApplyWithLeadership canApplyWithLeadership;
/** Called on global instance to check if it can be applied to unit. */
using CanApplyToUnit = bool(__thiscall*)(const CUmModifier* thisptr, const IUsUnit* unit);
CanApplyToUnit canApplyToUnit;
/** Called on global instance (for example, to check if banner can have it). */
using CanApplyToUnitCategory = bool(__thiscall*)(const CUmModifier* thisptr,
const LUnitCategory* unitCategory);
CanApplyToUnitCategory canApplyToUnitCategory;
/** Called on global instance (for example, to check if it matches spell category). */
using GetBool = bool(__thiscall*)(const CUmModifier* thisptr);
GetBool isLower;
GetBool isBoost;
/** Called on global instance (for example, to add city armor bonus). */
using HasElement = bool(__thiscall*)(const CUmModifier* thisptr, ModifierElementTypeFlag type);
HasElement hasElement;
/** Called on global instance (for example, to add city armor bonus). */
using GetFirstElementValue = int(__thiscall*)(const CUmModifier* thisptr);
GetFirstElementValue getFirstElementValue;
using GetDescription = const char*(__thiscall*)(const CUmModifier* thisptr);
GetDescription getDescription;
/** Takes unit impl id from previous unit and sets it for self. */
using UpdateUnitImplId = void(__thiscall*)(CUmModifier* thisptr);
UpdateUnitImplId updateUnitImplId;
};
assert_vftable_size(CUmModifierVftable, 11);
struct CUmModifierData
{
CUmModifier* next;
IUsUnit* prev;
CMidgardID modifierId;
};
assert_size(CUmModifierData, 12);
namespace CUmModifierApi {
struct Api
{
using Constructor = CUmModifier*(__thiscall*)(CUmModifier* thisptr,
const CMidgardID* modifierId,
const GlobalData** globalData);
Constructor constructor;
using CopyConstructor = CUmModifier*(__thiscall*)(CUmModifier* thisptr, const CUmModifier* src);
CopyConstructor copyConstructor;
using Destructor = void(__thiscall*)(CUmModifier* thisptr);
Destructor destructor;
using SetPrev = void(__thiscall*)(CUmModifier* thisptr, const IUsUnit* value);
SetPrev setPrev;
};
Api& get();
} // namespace CUmModifierApi
} // namespace game
#endif // UMMODIFIER_H
| 5,614
|
C++
|
.h
| 140
| 35.235714
| 100
| 0.707698
|
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,719
|
aistratplayerneutral.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/aistratplayerneutral.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 AISTRATPLAYERNEUTRAL_H
#define AISTRATPLAYERNEUTRAL_H
#include "aistratplayer.h"
namespace game {
struct CAiStratPlayerNeutral : public IAiStratPlayer
{ };
} // namespace game
#endif // AISTRATPLAYERNEUTRAL_H
| 1,035
|
C++
|
.h
| 26
| 37.923077
| 72
| 0.775673
|
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,720
|
midcommandqueue2.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midcommandqueue2.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 MIDCOMMANDQUEUE2_H
#define MIDCOMMANDQUEUE2_H
#include "idlist.h"
#include "uievent.h"
namespace game {
struct CCommandMsg;
struct CoreCommandUpdate;
struct CCommandCanIgnore;
struct NetMsgEntryData;
struct CMidCommandQueue2
{
struct INotifyCQVftable;
struct INotifyCQ
{
INotifyCQVftable* vftable;
};
/** Net message map. */
struct CNMMap
{
CMidCommandQueue2* commandQueue;
NetMsgEntryData** netMsgEntryData;
};
CoreCommandUpdate* commandUpdate;
CCommandCanIgnore* commandCanIgnore;
CNMMap* netMessageMap;
/** Command messages to process. */
List<CCommandMsg*> commandsList;
/** There are commands in commandsList that needs to be processed. */
bool pendingCommands;
/** CoreCommandUpdate was applied to commandsList. */
bool commandUpdateApplied;
char padding[2];
/**
* Subscribers that are notified about new commands.
* See CMidCommandQueue2OnMessage
*/
List<INotifyCQ*> notifyList;
ListIterator<INotifyCQ*> currentNotify;
bool unknown14;
char padding2[3];
unsigned int commandQueueMsgId;
UiEvent commandQueueEvent;
};
assert_size(CMidCommandQueue2, 92);
assert_size(CMidCommandQueue2::CNMMap, 8);
struct CMidCommandQueue2::INotifyCQVftable
{
using Destructor = void(__thiscall*)(CMidCommandQueue2::INotifyCQ* thisptr, char flags);
Destructor destructor;
using Notify = void(__thiscall*)(CMidCommandQueue2::INotifyCQ* thisptr);
Notify notify;
};
assert_vftable_size(CMidCommandQueue2::INotifyCQVftable, 2);
} // namespace game
#endif // MIDCOMMANDQUEUE2_H
| 2,448
|
C++
|
.h
| 73
| 29.986301
| 92
| 0.7518
|
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,721
|
imgstore2texture.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/imgstore2texture.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 IMGSTORE2TEXTURE_H
#define IMGSTORE2TEXTURE_H
#include "mqtexture.h"
namespace game {
struct FFImg;
struct CImgStore2Texture : public IMqTexture
{
FFImg* ffImage;
};
assert_size(CImgStore2Texture, 8);
} // namespace game
#endif // IMGSTORE2TEXTURE_H
| 1,082
|
C++
|
.h
| 30
| 34.1
| 72
| 0.771073
|
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,722
|
midbag.h
|
VladimirMakeev_D2ModdingToolset/mss32/include/midbag.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 MIDBAG_H
#define MIDBAG_H
#include "aipriority.h"
#include "mapelement.h"
#include "midgardid.h"
#include "midinventory.h"
#include "midscenarioobject.h"
#include <cstddef>
namespace game {
/** Represents treasure chests in scenario file and game. */
struct CMidBag : public IMidScenarioObject
{
IMapElement mapElement;
IAiPriority aiPriority;
CMidInventory inventory;
int image;
};
assert_size(CMidBag, 60);
assert_offset(CMidBag, mapElement, 8);
assert_offset(CMidBag, aiPriority, 28);
assert_offset(CMidBag, inventory, 36);
} // namespace game
#endif // MIDBAG_H
| 1,409
|
C++
|
.h
| 41
| 32.390244
| 72
| 0.767083
|
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.