1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
Commit Graph

617 Commits

Author SHA1 Message Date
Ivan Savenko
fd04320815
Merge pull request #4267 from IvanSavenko/sonar_fix
Fixed new issues detected by SonarCloud
2024-07-16 12:23:08 +03:00
Ivan Savenko
3134d8383c
Merge pull request #4207 from Laserlicht/map_format_additional
[1.6] Map format additional infos
2024-07-16 12:15:58 +03:00
Ivan Savenko
c00a1e1b0c Fixed new issues detected by SonarCloud 2024-07-15 07:46:40 +00:00
Ivan Savenko
6b8f94e6e7 Merge remote-tracking branch 'vcmi/master' into develop 2024-07-11 17:43:44 +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
Laserlicht
02bd52041b extend map format 2024-06-29 13:13:59 +02:00
Tomasz Zieliński
d7a4ea9f32 Draw random artifact as an atomic operation 2024-06-24 20:06:50 +02:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
Ivan Savenko
c68f2da977 Fix initialization of gold pile from random resource with fixed amount 2024-06-17 20:08:07 +00:00
Andrey Filipenkov
bf832d4b13 fix building editor with Apple Clang 15 2024-06-13 06:38:15 +03:00
Ivan Savenko
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
Ivan Savenko
5d6470e527
Merge pull request #4025 from IvanSavenko/shared_ptr_lib
[1.6] Use shared_ptr for library entities
2024-05-30 19:14:06 +03:00
Ivan Savenko
49138e3de9 Fixes Adrienne starting without Inferno spell in campaign 2024-05-29 14:28:36 +00:00
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
Ivan Savenko
84bc6c42db Added 'Serializeable' base class for classes serializeable by pointer 2024-05-16 18:40:59 +00:00
Ivan Savenko
0ce78cae06
Merge pull request #3926 from IvanSavenko/optimize_map_list_load
[1.5.1] Improve performance of parsing of map headers for map list
2024-05-11 21:56:58 +03:00
Ivan Savenko
31401e219f Fix possible crash on nullptr dereference 2024-05-11 13:19:07 +00:00
Ivan Savenko
3acc1f1845 Improve performance of parsing of map headers for map list 2024-05-10 14:30:39 +00:00
Ivan Savenko
6ba6e0d55b Moved serialization of ModCompatibilityInfo from MapFormat 2024-04-23 17:15:59 +03:00
Ivan Savenko
a6dead7725 Fixed loading of text strings for hota quests 2024-04-22 13:49:17 +03:00
Tomasz Zieliński
9305f360d1 Actually, lava will only have 3 obstacle sets without mods 2024-04-13 20:56:05 +02:00
Tomasz Zieliński
50ae067a60 Build fix 2024-04-13 19:33:47 +02:00
Tomasz Zieliński
f491f10d81 Final tweaks 2024-04-13 19:21:01 +02:00
Tomasz Zieliński
4fa7f0e93d Also allow filtering biomes by faction(s) 2024-04-12 10:25:13 +02:00
Tomasz Zieliński
a356fdaf2a Allow filtering obstacles by faction aligmnment 2024-04-11 18:10:14 +02:00
Tomasz Zieliński
d9a598ad9c Merge remote-tracking branch 'origin/develop' into biome_system 2024-04-08 15:01:17 +02:00
Tomasz Zieliński
3e3959d360 Move all OH3 objects and obstacle sets to a mod 2024-04-08 12:50:41 +02:00
Tomasz Zieliński
86cffb3a77 Removed unused variable 2024-04-06 18:12:44 +02:00
Tomasz Zieliński
73ec53a9e0 Fix build 2024-04-06 15:29:15 +02:00
Tomasz Zieliński
b0cff23c37 Cleanup 2024-04-06 15:06:08 +02:00
Tomasz Zieliński
305e2bdf2f Load obstacle sets from json in mods 2024-04-05 08:31:05 +02:00
Tomasz Zieliński
b1a5693612 Proof of concept with OH3 obstacles 2024-04-04 21:39:01 +02:00
Tomasz Zieliński
8ed940d538 cleanup 2024-04-03 22:24:19 +02:00
Tomasz Zieliński
9f048888dd Restore previous removeObject 2024-04-03 22:17:36 +02:00
Tomasz Zieliński
12da0196a0 Restrict reindexing to random maps 2024-04-03 20:05:35 +02:00
Tomasz Zieliński
2a213f2276 Reindex objects to show interactive objects on top 2024-04-03 14:48:04 +02:00
Tomasz Zieliński
263d439605 Fix uninitialized variable 2024-03-24 07:54:11 +01:00
Ivan Savenko
922966dcf8 Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00
Ivan Savenko
08a27663f9 Reworked JsonNode constructors to more logical form 2024-02-26 12:55:49 +02:00
Ivan Savenko
54796c7c56 Rename toJson to toString/toCompactString for consistency 2024-02-26 12:55:49 +02:00
Ivan Savenko
c3957c2c2a Moved json files to new directory, split on per-class basis 2024-02-14 13:08:24 +02:00
Ivan Savenko
7790acae3a Fix save compatiblity with 1.4 2024-02-11 17:31:30 +02:00
Ivan Savenko
fd17133da3 Fix editor build 2024-02-06 00:40:26 +02:00
Ivan Savenko
9e09fe08e1 Fixed duplicated hero check - was used too early, before hero type is
loaded
2024-02-05 21:55:48 +02:00
Ivan Savenko
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
Ivan Savenko
4af4d1a75e Remove excessive logging 2024-02-05 21:11:00 +02:00
Ivan Savenko
2e4895766a Implemented tracking of objects destroyed by players 2024-01-31 01:37:33 +02:00
Ivan Savenko
2a193effcc Merge branch 'master' into 'develop' 2024-01-25 16:23:13 +02:00
Ivan Savenko
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