1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
vcmi/test/mock
Ivan Savenko 3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
..
BattleFake.cpp remove never used code in CBonusSystemNode 2024-08-25 14:15:21 +02:00
BattleFake.h Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
mock_battle_IBattleState.h Removed creatureBank flag from battle, battles now receive BattleLayout 2024-09-12 12:11:18 +00:00
mock_battle_Unit.h Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
mock_BonusBearer.cpp remove never used code in CBonusSystemNode 2024-08-25 14:15:21 +02:00
mock_BonusBearer.h remove never used code in CBonusSystemNode 2024-08-25 14:15:21 +02:00
mock_CPSICallback.cpp
mock_CPSICallback.h
mock_Creature.h Reduce usage of pointers to VLC entities 2024-10-10 12:28:08 +00:00
mock_CreatureService.h
mock_Environment.h Fix tests compilation 2023-09-06 16:03:47 +03:00
mock_events_ApplyDamage.h Fix typos using https://github.com/crate-ci/typos 2024-06-24 03:47:19 +02:00
mock_IBattleInfoCallback.h Unified handling of battle sides ID's 2024-08-11 20:54:44 +00:00
mock_IGameCallback.cpp Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
mock_IGameCallback.h Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
mock_IGameEventCallback.h
mock_IGameInfoCallback.h BattleAI: optional simulation depth 2024-08-21 23:27:42 +03:00
mock_MapService.cpp Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
mock_MapService.h Fix build 2024-01-19 13:56:05 +02:00
mock_scripting_Context.h Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
mock_scripting_Pool.h
mock_scripting_Script.h
mock_scripting_Service.h
mock_ServerCallback.h Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
mock_Services.h Added GameSettings to gamestate, potentially allowing to define game 2024-09-05 15:16:27 +00:00
mock_spells_effects_Registry.h
mock_spells_Mechanics.h Fix build 2024-01-19 13:56:05 +02:00
mock_spells_Problem.h Split CGeneralTextHandler file into 1 file per class form 2024-07-20 12:55:17 +00:00
mock_spells_Spell.h cast only on self 2024-09-28 17:32:53 +02:00
mock_spells_SpellService.h
mock_UnitEnvironment.h
mock_UnitInfo.h Unified handling of battle sides ID's 2024-08-11 20:54:44 +00:00
mock_vstd_CLoggerBase.h
mock_vstd_RNG.h Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
ZoneOptionsFake.h Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00