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

146 Commits

Author SHA1 Message Date
Ivan Savenko
7d30b660ea
Merge pull request #4359 from Laserlicht/statistic
Writing some statistics and make it possible to export via csv
2024-08-09 15:31:13 +03:00
SoundSSGood
5903b3b42c endBattleConfirm crash fix 2024-08-08 13:57:06 +03:00
Laserlicht
e0ab760a2f code review 2024-08-07 21:26:22 +02:00
Ivan Savenko
a4dd510735
Merge pull request #4358 from IvanSavenko/integer_divide
Add helper functions for integer division rounding
2024-08-06 18:10:03 +03:00
Ivan Savenko
b7391f49f6 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-08-05 10:36:10 +00:00
Ivan Savenko
81e6207df0 Add helper functions for integer division rounding
Added set of functions that perform integer division with different
rounding modes:
- divideAndCeil - rounds up to next integer
- divideAndRound - rounds to nearest integer
- divideAndFloor - rounds to previous integer (equivalent to default
division)

Intended for use in library, where usage of floating point might lead to
desync in multiplayer games.

Replaced some cases that I knew of, including recent handicap PR
2024-08-03 13:52:14 +00:00
Laserlicht
58bfd27aad add some stats 2024-08-02 20:40:24 +02:00
Laserlicht
80dd97364a add additional statistic 2024-08-02 19:38:33 +02:00
Ivan Savenko
15f37f8c4b Fix possible crash on invalid SPELL_LIKE_ATTACK ability 2024-07-29 17:13:31 +00:00
Ivan Savenko
ec63f3eeac
Merge pull request #4314 from IvanSavenko/tower_target_selection
Implemented simple target selection logic for arrow towers
2024-07-26 14:22:13 +03:00
Ivan Savenko
e8aa6efbb9
Merge pull request #4261 from kaja47/shrinkage
Reduce size of Bonus struct from 320 bytes to 296 bytes.
2024-07-22 17:12:08 +03:00
K
c1e6bbddfe Reduce size of Bonus struct from 320 bytes to 296 bytes.
- Internal enums were resized to occupy single byte.
- Duration bitmask uses 16 bit integer directly instead of std::bitset<11> which consumed 8 bytes.
- Fields shuffled to minimise padding and keep the most useful data on first 2 cache lines.
2024-07-22 14:59:31 +02:00
Ivan Savenko
5bd9a32d97 Implemented simple target selection logic for arrow towers 2024-07-21 13:16:33 +00:00
Ivan Savenko
4533271692
Merge pull request #4312 from IvanSavenko/texthandler_split
Split CGeneralTextHandler file into 1 file per class form
2024-07-21 13:49:14 +03:00
Ivan Savenko
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
SoundSSGood
186c6098e8 Fix endBattleConfirm 2024-07-20 15:07:34 +03:00
Ivan Savenko
63bcf7d83c Replaced most of usages of CRandomGenerator with vstd::RNG in library 2024-07-16 13:13:07 +00:00
Ivan Savenko
60a51e98de Remove usage of std::function from CRandomGenerator 2024-07-16 13:13:07 +00:00
SoundSSGood
b42c6dbf44 fixed regressions 2024-07-09 14:27:05 +03:00
SoundSSGood
ef1fbffad4 ArtifactsUIController class 2024-07-09 14:27:05 +03:00
SoundSSGood
f87762bc96 endBattleConfirm 2024-07-09 14:27:04 +03:00
SoundSSGood
6dd76908bc MoveArtifact struct not used now 2024-07-09 14:27:04 +03:00
SoundSSGood
5dbe88d9a4 End of battle BulkMoveArtifacts 2024-07-09 14:27:04 +03: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
MichalZr6
15f86c0284 Fixed issues from review 2024-06-11 16:47:23 +02:00
MichalZr6
65d22f17ae proper logging of drained life and resurrected count
new struct for keeping track of healed HP (also drained life) and resurrected count
2024-06-09 23:54:20 +02:00
Ivan Savenko
2fcbfd978a
Merge pull request #4049 from IvanSavenko/campaign_fix
[1.5.2] Campaign fixes
2024-05-29 18:14:04 +03:00
Ivan Savenko
a8b07477b4 Fix hero kill mission not registered if target hero was the attacker 2024-05-28 15:43:06 +00:00
Ivan Savenko
3afbd03089 Attempt to track down crash on battle end 2024-05-28 14:41:05 +00:00
Ivan Savenko
64ad57470c Fix crash on applying necromancy when battle ended in a draw 2024-05-23 12:46:28 +00:00
Ivan Savenko
f8a206b0c6 Fix serialization of size_t breaking 32<->64 bit compatibility 2024-05-23 12:46:28 +00:00
Ivan Savenko
3ad618e0d8 Fix crash on bonus with invalid spell ID 2024-05-23 12:46:28 +00:00
Ivan Savenko
b8b42978b1 Reduce includes in headers 2024-04-26 13:26:33 +03:00
Ivan Savenko
090a1c7764 TurnTimerHandler is now a unique_ptr 2024-04-26 13:15:39 +03:00
Ivan Savenko
a99d5e6fa1 Simplify code 2024-04-26 12:44:57 +03:00
Ivan Savenko
0b01cc4676 Fix possible crash on out-of-range access 2024-04-22 15:33:01 +03:00
Ivan Savenko
42616cf4e8 Fix text formatting, fix todo's 2024-04-09 16:13:30 +03:00
Ivan Savenko
18ece6dcf6 Remove some usages of server-side translations 2024-04-09 16:13:30 +03:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
Laserlicht
b0b3b9bb84 fix castle replay 2024-02-28 22:26:53 +01:00
Ivan Savenko
7cf5e317a4
Merge pull request #3612 from IvanSavenko/demon_summon_fix
Fixes demon summoning
2024-02-13 16:05:13 +02:00
Ivan Savenko
ece3403fc7 Fixes demon summoning - sacrificed creatures no longer remain after
battle and included into casualties
2024-02-12 21:53:38 +02:00
Ivan Savenko
6db405167d Clarified some (im)possible null dereferences 2024-02-12 13:05:30 +02:00
Ivan Savenko
a97d1d9377 Fix crash on broken ENCHANTED bonus 2024-02-05 21:07:01 +02:00
Laserlicht
e48e8e0f01
fix if attacked 2024-01-27 01:57:28 +01:00
Laserlicht
7f58333ef9
quick combat vs ai 2024-01-25 23:44:41 +01: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
Ivan Savenko
24d25730ad Changed checks for null with checks for hasValue 2024-01-20 16:41:10 +02:00
Ivan Savenko
6e629a6a5f split getBonusLocalFirst into two distinct method:
- const method getFirstBonus that returns single matching bonusToString
- non-const method getLocalBonus that returns bonus from current node
2024-01-19 13:56:06 +02:00