1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Commit Graph

601 Commits

Author SHA1 Message Date
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
Ivan Savenko
8e8d42bfa2 Try to simplify / cleanup code to localize crash 2024-01-20 18:40:03 +02:00
Ivan Savenko
ffd604c114 Removed unnecessary access to IHandler::objects 2024-01-19 13:56:06 +02:00
Ivan Savenko
60ffb81b33 Replaced remaining placeholder code with callbacks 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
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
b1bd44de1e
Merge pull request #3298 from vcmi/random_prison_distributor
Fixes to hero / prison distribution
2024-01-18 16:03:08 +02: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
Alexander Wilms
cca08e29da Remove duplicate semicolons 2024-01-16 19:02:39 +00:00
Ivan Savenko
c7897300c0 Fixed missing translation strings on loading campaign save
- campaign header now contains text container and stores campaign texts
- map header now contains text container instead of inheriting it
- moved text container registration logic to a wraper class
- fixed registration of copied text containers (from copied map header)
2024-01-15 13:10:25 +02:00
Tomasz Zieliński
3aa67b3e5f Merge remote-tracking branch 'origin/beta' into random_prison_distributor 2024-01-13 21:02:08 +01:00
Alexander Wilms
5e9f98b15c Resolve intentionality issues 2024-01-10 00:23:24 +00:00
Alexander Wilms
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
Laserlicht
8b262e49a6
add sort for changedate 2024-01-07 20:17:44 +01:00
Ivan Savenko
480a0f19c0 Fix missing modded spells in magic guilds for h3m maps 2024-01-05 16:47:23 +02:00