1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
c0fb1d1b3b Replace some raw pointers with unique's or optional 2025-04-29 12:11:10 +03:00
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
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
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
037efdf5fc Improvements to type safety of Identifier class
- Constructor of Identifier from integer is now explicit
- Lobby hero/town selection now uses Identifiers instead of int's
- Removed serialization workaround for hero portraits
- Added dummy objects for custom heroes portraits for ID resolver to use
- HeroInstance now stores portrait ID only in case of custom portrait
- Fixed loading of campaign heroes portraits on RoE maps
2023-10-04 18:05:23 +03:00
62cd8b12d4 Converted several namespace enums to enum class 2023-08-25 13:38:02 +03:00
85262cf4f5 Moved CGameState files into a separate directory 2023-06-26 17:15:59 +03:00