1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-25 00:37:24 +02:00
Commit Graph

121 Commits

Author SHA1 Message Date
4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
f3a57f754c Fix loading of SoD & later maps 2025-04-27 14:57:31 +03:00
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
a43c3fcb31 Restore save compatibility with 1.6 2025-04-27 14:57:31 +03:00
f025a3a932 Review & cleanup hiding / displaying map objects 2025-04-27 14:57:31 +03:00
e6a8e5d4bd Correctly restore bonus system on deserialization 2025-04-27 14:57:31 +03:00
d1d2cf4189 Fix crashes on game start, gamestate now derives from GameCallbackHolder 2025-04-27 14:57:31 +03:00
ab11d2b075 Remove quests from CMap, now solely owned by quest objects 2025-04-27 14:57:30 +03:00
71bc1054d0 BattleStart pack now uses unique_ptr 2025-04-27 14:57:30 +03:00
bdae7285ae Objects list is now private member of CMap 2025-04-27 14:57:30 +03:00
745040def3 Access to heroes storage in CMap is now done via public methods 2025-04-27 14:57:30 +03:00
1f502c0548 CMap towns and heroes on map fields are now private 2025-04-27 14:57:30 +03:00
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00
797646cc05 Quests in map now use shared_ptr instead of const ptr 2025-04-27 14:57:30 +03:00
eb3b51a6cf Remove save compatibility with 1.5.X 2025-03-18 11:35:15 +00:00
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
e4505f20b9 Remove no longer used map checksum computation 2025-01-24 19:26:40 +00:00
dfe8a95f8c Fix build 2025-01-04 15:09:50 +00:00
ea368c5176 Inlined methods commonly used by pathfinder for better optimization 2025-01-04 15:09:50 +00:00
c3c5f73a63 Restore save compatibility with 1.5 2024-11-07 12:08:08 +00:00
01d787fb5a Removed remaining cases of serialization of VLC entities 2024-10-30 16:48:18 +00:00
b9ae7f1138 CMap put move and remove artifact method 2024-09-23 23:30:38 +03:00
ff8d36c350 It is now possible to define game settings in rmg template 2024-09-05 15:16:28 +00:00
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
b06426ac43 CMap removed from CArtifactSet level 2024-09-04 15:12:40 +03:00
82c37573fa Removed save compatibility with 1.4
All save compatibility checks targeting 1.4 saves have now been removed.
Saves from 1.5 can still be loaded in 1.6

Implemeted few TODO's in serialization that were postponed to avoid
breaking save compatibility in MP for 1.5.X releases.

Fixed missed case for loading black market object from 1.5 saves
2024-08-29 18:51:53 +00:00
K
18a69dfeb5 move CMap::isInTheMap to the header file and make it inline 2024-08-22 14:27:01 +02:00
26fdaacbe5 Map and town events are now processed on start of player turn instead of
on start of new day, in line with H3
2024-08-14 14:13:50 +00:00
1aa391fdf8 Split CGeneralTextHandler file into 1 file per class form
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes

Moved without changes:
Languages.h           -> texts/Languages.h
MetaString.*          -> texts/MetaString.*
TextOperations.*      -> texts/TextOperations.*

Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
                      -> texts/CLegacyConfigParser.*
                      -> texts/TextLocalizationContainer.*
                      -> texts/TextIdentifier.h
2024-07-20 12:55:17 +00:00
2a213f2276 Reindex objects to show interactive objects on top 2024-04-03 14:48:04 +02:00
2e4895766a Implemented tracking of objects destroyed by players 2024-01-31 01:37:33 +02:00
0c07384293 Refactoring of serialization versioning handling
- Removed 'version' field from serialize() method
- Handler classes - Binary(De)Serializer now have 'version' field
- Serialization versioning now uses named enum

Save compatibility with 1.4.X saves should be intact
2024-01-20 20:34:51 +02:00
e67e4430ba Removed most of non-const static fields in lib. Reduced header includes. 2024-01-19 13:55:22 +02:00
a15366f5a5 Make IObjectInterface::cb non-static 2024-01-19 13:55:21 +02:00
ebf2055afc - Unban hero if related Prison is destroyed during map generation
- Move prison counter to PrisonHeroPlacer
2023-12-24 09:36:26 +01:00
c872f8418f Implemented serialization of MapObjectSubID, refactoring of related code 2023-11-17 21:18:34 +02:00
0842f5afee Removed remaining usages of std::vector<bool> 2023-11-15 15:55:18 +02:00
03e1169781 Reduced number of accesses to CGObjectInstance::subID 2023-11-01 14:43:20 +02:00
a1a5bc28c2 convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
0ac893b80f Rumors meta string 2023-09-27 23:22:45 +02:00
f47def3588 refactoring 2023-09-19 13:31:57 +03:00
a30e7ba321 Remove bitmasks of PlayerColor's. Add encode/decode methods 2023-09-04 18:56:16 +03:00
17d3d663ee Converted creature ID and spell ID to new form 2023-08-25 13:38:02 +03:00
03b3771f19 Ban Navigation on maps without water 2023-07-18 10:54:36 +02:00
025b0814c8 + Handled banning spells and artifacts
+ Rename allowedSpell => allowedSpells
2023-07-17 17:21:28 +02:00
bda126a1fd Merge remote-tracking branch 'origin/develop' into ban_stuff_on_water_maps 2023-07-16 18:54:50 +02:00
463efea7bb Fix hero retreating handling & code cleanup 2023-07-15 19:55:30 +03:00
19ace6a849 Moved hero pool logic to the separate files 2023-07-15 19:55:29 +03:00
700d8459ac Checking flags and conditions 2023-07-09 11:16:36 +02:00