1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-23 22:40:07 +02:00

299 Commits

Author SHA1 Message Date
Ivan Savenko
f70ad2c15b Reorganized artifact-related classes
- files now generally contain only 1 class (except for tightly coupled
classes)
- files are now located in lib/entities/artifact directory
- removed excessive includes

No changes to functionality
2025-04-29 13:29:08 +03:00
Ivan Savenko
4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
Ivan Savenko
f3a57f754c Fix loading of SoD & later maps 2025-04-27 14:57:31 +03:00
Ivan Savenko
a89cf280e3 Fix campaigns progression 2025-04-27 14:57:31 +03:00
Ivan Savenko
912c2eae94 Fix regressions 2025-04-27 14:57:31 +03:00
Ivan Savenko
cd7732456a Remove pointer to objects from TerrainTile 2025-04-27 14:57:30 +03:00
Ivan Savenko
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
Ivan Savenko
16a06179cf Use ArtifactInstanceID in CGArtifact 2025-04-27 14:57:30 +03:00
Ivan Savenko
ab11d2b075 Remove quests from CMap, now solely owned by quest objects 2025-04-27 14:57:30 +03:00
Ivan Savenko
c02a8a84fd Stacks of armed instance are now unique_ptr 2025-04-27 14:57:30 +03:00
Ivan Savenko
bdae7285ae Objects list is now private member of CMap 2025-04-27 14:57:30 +03:00
Ivan Savenko
745040def3 Access to heroes storage in CMap is now done via public methods 2025-04-27 14:57:30 +03:00
Ivan Savenko
1f502c0548 CMap towns and heroes on map fields are now private 2025-04-27 14:57:30 +03:00
Ivan Savenko
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
Ivan Savenko
2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00
Ivan Savenko
797646cc05 Quests in map now use shared_ptr instead of const ptr 2025-04-27 14:57:30 +03:00
Ivan Savenko
9f713a0914 Rename int3::valid to isValid for consistency 2025-03-03 10:46:00 +00:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko
2362c6da21 Fixes for multiple new issues from Sonar 2025-02-21 15:57:39 +00:00
Ivan Savenko
b2642bb7d7
Merge pull request #5422 from IvanSavenko/disposed_heroes_fix
[1.7] Do not allow heroes banned for player as starting heroes
2025-02-20 16:33:04 +02:00
Ivan Savenko
4b824d05e2 Do not allow heroes banned for player as starting heroes
- `disposedHeroes` is now in map header, for use in map selection
- heroes that are marked as unavailable for player will now be hidden
from starting hero selection
2025-02-14 10:43:55 +00:00
Ivan Savenko
0337ef90ec Fix and cleanup event loading, clarify remaining hota keys 2025-02-13 19:48:37 +00:00
Ivan Savenko
f9fe8fc312 Cleanup hota object loading code 2025-02-13 19:10:29 +00:00
Ivan Savenko
091029e0bb Support for parsing HotA 1.7.2 h3m's and h3c's 2025-02-13 19:10:29 +00:00
Ivan Savenko
a12ea45276 Support of parsing of all hota 1.7.1 h3m's and h3c's 2025-02-13 19:10:29 +00:00
Ivan Savenko
d996726fe7 Support for parsing HotA 1.7.0 maps 2025-02-13 19:10:29 +00:00
Ivan Savenko
09db3e4bef Reworked resource piles loading to fix wog maps with mithril 2025-01-25 11:40:21 +00:00
Ivan Savenko
e4505f20b9 Remove no longer used map checksum computation 2025-01-24 19:26:40 +00:00
Ivan Savenko
733b1b339c Remove broken automatic addition of dependency for wog maps 2024-11-07 12:08:28 +00:00
Ivan Savenko
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
Ivan Savenko
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
Ivan Savenko
a97deea563
Merge pull request #4824 from IvanSavenko/translate_fix
Fixes for issues with translations
2024-10-28 12:56:50 +02:00
Ivan Savenko
638bc174c3 Fix crash on exporting maps for translation 2024-10-25 21:41:24 +00:00
Ivan Savenko
8a5ac73438 Basic support for configurable flaggable objects
Converted CGLighthouse class into FlaggableMapObject

Bonus provided by Lighthouse/Flaggable is now defined in config and is
accessible to mods.
2024-10-25 16:48:10 +00:00
Ivan Savenko
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
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
Ivan Savenko
a8f8c3f4b1 Replaced most of accesses to CGObjectInstance::pos with anchorPoint() 2024-10-09 15:43:46 +00:00
Laserlicht
a826b88641
Merge branch 'develop' into spell 2024-10-07 12:55:23 +02:00
Laserlicht
2052a26031 code review 2024-09-28 14:25:11 +02:00
SoundSSGood
586a32a616 CArtifactSet cleanup 2024-09-23 23:39:19 +03:00
SoundSSGood
b9ae7f1138 CMap put move and remove artifact method 2024-09-23 23:30:38 +03:00
Ivan Savenko
503b87561e Converted all h3 banks to rewardable, remove most of hardcoded checks 2024-09-12 12:11:18 +00:00
Ivan Savenko
8225eb454e Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
Ivan Savenko
a72715ad31
Merge pull request #4563 from SoundSSGood/vcmiScrolls
Improvements to the artifact creation
2024-09-05 17:10:13 +03:00
SoundSSGood
7466d7452d vcmiscrolls 2024-09-05 15:51:45 +03:00
SoundSSGood
b06426ac43 CMap removed from CArtifactSet level 2024-09-04 15:12:40 +03:00
Laserlicht
0280254810 tarnum icon 2024-08-31 22:05:36 +02:00
Laserlicht
2fef4b5d69 voice override 2024-08-31 14:17:25 +02:00
Ivan Savenko
20d5b33ea6 Remove marketModes as member
marketModes are now generated in runtime and are not a member of
IMarket. Was not a bad change, but towns load buildings before town type
is randomized, leading to case where market modes are not actually known
when building is added to town (like random towns with market built)

Since altar requires CArtifactSet for work, IMarket will now always
contain it, but it will only be accessible if market supports altar
mode.
2024-08-27 14:07:00 +00:00
SoundSSGood
58bb2b58e3 IMarket suggestions
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-08-20 18:49:48 +03:00