Ivan Savenko
284273379e
Merge pull request #3536 from IvanSavenko/serialization_refactor
...
Refactoring of serialization versioning handling
2024-01-22 19:49:24 +02:00
Andrii Danylchenko
33f8f6dc53
Merge pull request #3409 from vcmi/fix-headless
...
Fix headless
2024-01-21 14:51:10 +02:00
Ivan Savenko
d8a96066c6
Merge pull request #3533 from Laserlicht/battle_text
...
fix battle text position
2024-01-21 10:10:26 +02:00
Andrii Danylchenko
0c1664dbe7
NKAI: various AI fixes after tests in headless
2024-01-20 22:55:30 +02:00
Andrii Danylchenko
cc7fc4a2c6
Fix headless mode
2024-01-20 22:55:27 +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
6b760089a4
Merge pull request #3473 from IvanSavenko/const_lib
...
[1.5] Remove non-const global variables from library
2024-01-20 19:22:46 +02:00
Laserlicht
3084cb2e46
fix battle text position
...
fix space
2024-01-20 14:35:21 +01:00
Ivan Savenko
d04241b10a
Code cleanup
2024-01-19 23:02:00 +02:00
Ivan Savenko
1f7e53a609
Code style fixes
2024-01-19 21:21:23 +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
Ivan Savenko
496c13b34a
Stabilization
2024-01-19 13:56:06 +02:00
Ivan Savenko
9af7c63a26
Fix build
2024-01-19 13:56:05 +02:00
Ivan Savenko
ea1f05d15a
Stabilization
2024-01-19 13:55:22 +02:00
Ivan Savenko
e67e4430ba
Removed most of non-const static fields in lib. Reduced header includes.
2024-01-19 13:55:22 +02:00
Ivan Savenko
a15366f5a5
Make IObjectInterface::cb non-static
2024-01-19 13:55:21 +02:00
Ivan Savenko
2c4cad7d9c
Slight simplification of bonus system node class
2024-01-19 13:54:49 +02:00
Ivan Savenko
d5c4478816
Remove most of non-const access to VLC entities
2024-01-19 13:54:49 +02:00
Ivan Savenko
bd5682ecc3
Merge remote-tracking branch 'vcmi/master' into develop
2024-01-19 13:49:54 +02:00
Ivan Savenko
b2527c3775
Do not attempt to answer non-existing query
2024-01-18 22:21:07 +02:00
Ivan Savenko
3e8f110482
Merge pull request #3515 from SoundSSGood/backpack-statusbar
...
Backpack statusbar
2024-01-18 16:05:42 +02:00
Ivan Savenko
b698b6e79d
Merge pull request #3512 from Alexander-Wilms/use-auto-with-template-factory-functions-for-smart-pointers
...
Use auto with template factory functions for smart pointers
2024-01-18 16:05:05 +02:00
Ivan Savenko
9025744cc5
Merge pull request #3510 from Alexander-Wilms/remove-semicolons-from-macros
...
Remove trailing semicolons from more macros
2024-01-18 16:03:55 +02:00
SoundSSGood
a753319ad0
backpack window statusbar
2024-01-18 15:55:54 +02:00
Laserlicht
a1f4fcb78a
hide adventuremap
2024-01-18 00:47:18 +01:00
Alexander Wilms
b364f707cd
Fix issues introduced by automated replacement of redundant types
2024-01-17 20:12:57 +00:00
Alexander Wilms
7a1cee1a60
Fix error: 'auto' not allowed in non-static struct member
2024-01-17 14:49:28 +00:00
Alexander Wilms
73019c204d
Replace redundant types with auto
for the lvalues of template factory functions for smart pointers
...
grep -r --include \*.h --include \*.cpp "= std::" * | grep -v auto | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return" | grep -v double | grep -v si64 | grep -v si32 | grep -v ui32 | grep \< | grep -v float | tr -d '\t' | grep -v assert > redundant_types.txt
import re
with open("redundant_types.txt") as f:
for line in f:
line = line.strip()
path = line.split(":", 1)[0]
original_code = ":".join(line.split(":")[1:]).strip()
print()
print(path)
print(original_code)
prefix = "auto "
if original_code.startswith("static"):
static = True
else:
static = False
cpp_type = " ".join(original_code.split("=")[0].strip().split(" ")[0:-1])
print(cpp_type)
if static:
new_code = "static auto "+ " ".join(original_code.split(" ")[2:])
else:
new_code = "auto "+ " ".join(original_code.split(" ")[1:])
print(new_code)
if True:
with open(path, "r") as f:
filedata = f.read()
filedata = filedata.replace(original_code, new_code)
with open(path, "w") as f:
f.write(filedata)
2024-01-17 12:50:00 +00:00
Ivan Savenko
e849e4170a
Merge pull request #3486 from Alexander-Wilms/replace-redundant-types-with-auto
...
Replace redundant types with `auto`
2024-01-17 13:31:05 +02:00
Alexander Wilms
1b85abb508
Use auto instead of redundant type in initializations using new
...
grep -r --include \*.h --include \*.cpp "=" * | grep -v "auto\|int\|char\|bool\|float|\double\|for\|if\|googletest\|fuzzylite\|size_t\|using\|return\|{\|}\|= \"\|= tr(\|virtual\|void" | grep -Po ".*[^ ]+ [^ ]+ [^ ]*[ ]*=.*;" | grep -v "float\|nullptr" | grep "new" | grep -v "AI/FuzzyLite" | grep \( | grep "= new" > redundant_types.txt
import re
with open("redundant_types.txt") as f:
for line in f:
line = line.strip()
path = line.split(":", 1)[0]
original_code = line.split(":")[1].strip()
if "new " in original_code:
cpp_type = original_code.split(" ")[0]
if original_code.count(cpp_type) == 2:
print()
print(path)
print(original_code)
new_code = "auto "+" ".join(original_code.split(" ")[1:])
print(new_code)
with open(path, "r") as f:
filedata = f.read()
filedata = filedata.replace(original_code, new_code)
with open(path, "w") as f:
f.write(filedata)
2024-01-16 21:40:53 +00:00
Alexander Wilms
ccac73fb69
Remove trailing semicolons from more macros
2024-01-16 19:46:21 +00:00
Alexander Wilms
cca08e29da
Remove duplicate semicolons
2024-01-16 19:02:39 +00:00
Ivan Savenko
6270c81c1a
Add logging to trace crash
2024-01-16 15:21:49 +02:00
Ivan Savenko
b9f4c557fa
Fix cursor on visiting sea objects from land
2024-01-16 00:12:51 +02:00
Ivan Savenko
c21913f661
Fixed initialization of move points and mana for dismissed heroes
2024-01-15 23:16:48 +02:00
Ivan Savenko
a582cb554e
Merge pull request #3500 from IvanSavenko/fix_dendroid_bind
...
[1.4.3] Fix handling of Dendroid's Bind ability
2024-01-15 12:02:06 +02:00
Ivan Savenko
b4a1a755a4
Merge pull request #3498 from IvanSavenko/simturns_pathfinder
...
[1.4.3] Fixes for simultaneous turns
2024-01-15 12:00:54 +02:00
Ivan Savenko
0d0d3d8c80
Renamed speed -> getMovementRange, remove misleading default parameter
2024-01-14 17:14:36 +02:00
Ivan Savenko
d3a1cdb97a
Merge pull request #3485 from Laserlicht/fix_selection
...
fix buggy multiplayer selection
2024-01-14 14:23:32 +02:00
Ivan Savenko
b453b9d6d0
Fix UI lock on ending turn while simturns are active
2024-01-13 23:38:43 +02:00
Laserlicht
e25c8c21e0
fix buggy multiplayer selection
2024-01-13 21:51:56 +01:00
Ivan Savenko
fc163898d9
Fixed delayed updates in timer editing, limited to 24 hours at most
2024-01-13 22:31:26 +02:00
Laserlicht
2d511ecf1c
console fix
2024-01-13 18:59:59 +01:00
Ivan Savenko
f6e0f46040
Merge pull request #3467 from dydzio0614/hota-fixes
...
Fix HotA creature abilities (add bonuses allowing implementing them)
2024-01-12 21:55:18 +02:00
Ivan Savenko
7cf738b20e
Merge pull request #3462 from Laserlicht/trim_text
...
limit textboxes
2024-01-12 21:53:30 +02:00
Ivan Savenko
019a4151b9
Merge pull request #3258 from SoundSSGood/trade-panels
...
Market rework
2024-01-12 21:53:13 +02:00
SoundSSGood
4df7de36c1
fixed regression
2024-01-11 14:51:42 +02:00
SoundSSGood
b840cf3650
suggested changes
2024-01-11 12:46:32 +02:00
M
815fa26fb3
Change nix rounding, revert assert comment
2024-01-10 22:18:53 +01:00
Ivan Savenko
d6224eef5b
Merge pull request #3457 from Laserlicht/queue
...
make queue interactable
2024-01-10 15:51:13 +02:00