355bf4ec3e
read reservedCampaignHeroes
from vmaps
2024-08-22 16:52:35 +02:00
18a69dfeb5
move CMap::isInTheMap to the header file and make it inline
2024-08-22 14:27:01 +02:00
3a27725fcb
Optimize CMap::isInTheMap
...
replace x >= 0 && x < size by (unsigned)x < size
By converting signed coordinate to unsigned number, negative values became
very large positive ones, larger than every positive signed number and
therefore also bigger than the map size. As a result check against size
also implicitly checks if coordinate is negative.
Compiler cannot do this transformation automatically because it doesn't
know that map dimensions are always positive.
The change shrinks isInTheMap from 19 instructions to 11 on x86.
2024-08-22 11:39:24 +02:00
58bb2b58e3
IMarket suggestions
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com >
2024-08-20 18:49:48 +03:00
39bb6d5f39
IMarket now able to store artifacts
2024-08-20 18:49:47 +03:00
350749a1a6
Removed no longer used netpacks
2024-08-14 14:13:50 +00: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
5523e08cb7
Players affected by event is now stored as std::set instead of bitmask
2024-08-14 14:13:49 +00:00
97f1a310df
Fix miscellaneous issues discovered by Sonar
2024-08-12 18:26:30 +00:00
4aa73b40c9
Split CTownHandler into smaller chunks
2024-07-21 18:21:48 +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
2d3734656d
Fix test
2024-07-19 12:17:06 +00:00
2020d96070
Merge pull request #4071 from IvanSavenko/fix_rng_syncronization
...
[1.6] Fix potential desync if client uses different stdlib with different random number generators
2024-07-19 13:08:09 +03:00
434371195d
JsonNode constructors: Take fileName as argument
...
* Don't print JSON in JsonParser::parse() in case of errors
2024-07-17 13:50:59 +02:00
1c63fefe02
Moved banks randomization to server-side with client netpack
2024-07-16 13:13:39 +00:00
63bcf7d83c
Replaced most of usages of CRandomGenerator with vstd::RNG in library
2024-07-16 13:13:07 +00:00
fd04320815
Merge pull request #4267 from IvanSavenko/sonar_fix
...
Fixed new issues detected by SonarCloud
2024-07-16 12:23:08 +03:00
3134d8383c
Merge pull request #4207 from Laserlicht/map_format_additional
...
[1.6] Map format additional infos
2024-07-16 12:15:58 +03:00
c00a1e1b0c
Fixed new issues detected by SonarCloud
2024-07-15 07:46:40 +00:00
6b8f94e6e7
Merge remote-tracking branch 'vcmi/master' into develop
2024-07-11 17:43:44 +00:00
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
02bd52041b
extend map format
2024-06-29 13:13:59 +02:00
d7a4ea9f32
Draw random artifact as an atomic operation
2024-06-24 20:06:50 +02:00
02e429e973
Fix typos using https://github.com/crate-ci/typos
...
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
3bea383b59
Merge branch 'vcmi/beta' into 'vcmi/develop'
2024-06-21 12:58:36 +00:00
c68f2da977
Fix initialization of gold pile from random resource with fixed amount
2024-06-17 20:08:07 +00:00
bf832d4b13
fix building editor with Apple Clang 15
2024-06-13 06:38:15 +03:00
df83fa33a1
Merge branch 'vcmi/master' into 'vcmi/develop'
2024-05-31 09:34:21 +00:00
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
49138e3de9
Fixes Adrienne starting without Inferno spell in campaign
2024-05-29 14:28:36 +00:00
7461df161c
lib now uses shared_ptr for entities. Removed manual memory management.
2024-05-17 15:04:05 +00:00
84bc6c42db
Added 'Serializeable' base class for classes serializeable by pointer
2024-05-16 18:40:59 +00:00
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
31401e219f
Fix possible crash on nullptr dereference
2024-05-11 13:19:07 +00:00
3acc1f1845
Improve performance of parsing of map headers for map list
2024-05-10 14:30:39 +00:00
6ba6e0d55b
Moved serialization of ModCompatibilityInfo from MapFormat
2024-04-23 17:15:59 +03:00
a6dead7725
Fixed loading of text strings for hota quests
2024-04-22 13:49:17 +03:00
9305f360d1
Actually, lava will only have 3 obstacle sets without mods
2024-04-13 20:56:05 +02:00
50ae067a60
Build fix
2024-04-13 19:33:47 +02:00
f491f10d81
Final tweaks
2024-04-13 19:21:01 +02:00
4fa7f0e93d
Also allow filtering biomes by faction(s)
2024-04-12 10:25:13 +02:00
a356fdaf2a
Allow filtering obstacles by faction aligmnment
2024-04-11 18:10:14 +02:00
d9a598ad9c
Merge remote-tracking branch 'origin/develop' into biome_system
2024-04-08 15:01:17 +02:00
3e3959d360
Move all OH3 objects and obstacle sets to a mod
2024-04-08 12:50:41 +02:00
86cffb3a77
Removed unused variable
2024-04-06 18:12:44 +02:00
73ec53a9e0
Fix build
2024-04-06 15:29:15 +02:00
b0cff23c37
Cleanup
2024-04-06 15:06:08 +02:00
305e2bdf2f
Load obstacle sets from json in mods
2024-04-05 08:31:05 +02:00
b1a5693612
Proof of concept with OH3 obstacles
2024-04-04 21:39:01 +02:00
8ed940d538
cleanup
2024-04-03 22:24:19 +02:00