1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00
Commit Graph

38 Commits

Author SHA1 Message Date
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
7be31c94f2 Fixes from code review 2024-12-05 21:16:06 +01:00
f7b0c7405b Fix "padding variables" for object deletion 2024-12-03 17:40:35 +01:00
e9be46af98 Merge branch 'develop' into timed_events_objects_removal 2024-12-03 17:27:24 +01:00
c3c5f73a63 Restore save compatibility with 1.5 2024-11-07 12:08:08 +00:00
d39dad6cb4 Fix build 2024-10-30 17:03:48 +00:00
a39469d165 Add save compatibility 2024-10-30 16:57:03 +00:00
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
3bff68958e Change deleted objects format to use ObjectInstanceID 2024-09-28 22:58:05 +02:00
e56b8e86e5 Do not use VisitableObjects - BlockedObjects should suffice 2024-09-26 21:25:02 +02:00
9004b88c7e Mapping of deletable coordinates to objects on map start 2024-09-26 20:05:46 +02:00
cf5ce96aeb Backend implementation of object removal possibility by timed map events 2024-09-23 21:45:50 +02:00
350749a1a6 Removed no longer used netpacks 2024-08-14 14:13:50 +00:00
5523e08cb7 Players affected by event is now stored as std::set instead of bitmask 2024-08-14 14:13:49 +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
K
d3c198678c reorder fields to shrink struct TerrainTile from 96 to 80 bytes
When I was playing a very large map, computer's turn took up to 2 minutes and that give me time to fire up perf and profile the code while waiting.

I noticed that 1.7% of time was spent in function CPathfinderHelper::getNeighbors and half of that on a single load from an array backing multi_array of TerrainTiles. That signals the CMap::terrain is too big to fit in CPU caches.

This patch reorders fields in TerrainTile struct, shrinking it from 96 bytes to 80 bytes and hopefully helping to keep more tiles in the cache and speeding things up a little bit.
2024-07-07 12:53:29 +00:00
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
87059be67b Added range checks to values read from h3m.
Fixes reading of morale/luck values (-3..3) as unsigned leading to
overflow.
2024-02-05 21:27:55 +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
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: 
2023-10-19 16:23:21 +02:00
56eefab255 Fix headers 2023-09-28 13:28:24 +02:00
00c8c2eb82 Event message meta string 2023-09-27 23:28:17 +02:00
6e3817f18c Events serialization 2023-09-10 01:54:55 +02:00
62595cb039 Split massive CMap.h a bit 2023-05-31 23:01:57 +03:00
c455986a55 Fix regressions in RMG & map editor 2023-01-10 01:05:28 +02:00
4f3ea0d1d9 Renamed Terrain.h/cpp -> TerrainHandler.h/cpp 2023-01-10 00:01:35 +02:00
f386f42166 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
#	lib/battle/CBattleInfoEssentials.cpp
#	lib/rmg/ObstaclePlacer.cpp
#	lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
ebe45d512d Moved roads and rivers to TerrainTypeHandler, by analogy to TerrainType. 2022-09-23 16:24:01 +02:00
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
7ba271edf1 Rotation rebase2 ()
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
aaa07e4d2e New terrain support - part 1 ()
Initial support of new terrains
2022-09-11 11:31:26 +03:00
9d9c026c85 Code style: serialize everything on own lines for easier debugging () 2017-07-31 16:35:42 +03:00
37d0dad70a Merge branch 'develop' into feature/VCMIMapFormat1
Conflicts:
	lib/CArtHandler.cpp
2016-01-01 20:28:52 +03:00
05a34fb417 Use "Favorable" instead of "Favourable" everywhere for consistency
Original game of course used american english version so we stick to it.
2015-12-06 02:23:41 +03:00
6552acdff6 Check coastal tile OTF 2015-12-05 12:36:29 +03:00
c3ce4b25df Removed all #include's of CMap.h from headers.
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00