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

30 Commits

Author SHA1 Message Date
Evgeniy Meshcheryakov
d9d7d0ea0d Map editor: Transparency fix 2024-10-03 11:55:58 +03:00
Ivan Savenko
fd726523a2 Remove creations of custom animations in runtime 2024-07-19 10:08:50 +00:00
Alexander Wilms
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
Ivan Savenko
08a27663f9 Reworked JsonNode constructors to more logical form 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
6e399eb21a Make some non-const static variables const or constexpr 2024-02-12 13:22:54 +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
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
nordsoft
55900ceb66 Add portraits delegate 2023-10-13 20:15:29 +02:00
Ivan Savenko
0f88b8969b Removed some usages of std string as resource path 2023-09-04 18:22:34 +03:00
Ivan Savenko
8dfdfffd87 Use ResourcePath for audio files 2023-09-04 18:22:34 +03:00
Ivan Savenko
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
Ivan Savenko
738ace99cb Fix animations in editor which use copy-pasted code from client 2023-06-20 19:37:27 +03:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
Konstantin
4feab69867 mapeditor: use vcmi_endian.h
There is no need to redefine this functions, let's use shared
implementation
2023-02-03 00:39:44 +03:00
krs
8f433d345a Refactored resource Convertor to be more easy on the eyes
Added a little more documentation to functions.
Not using anymore dyrectory_iterator but directory_entry.
Private functions made a little more generic, extracting some parametrers to higher levels.
Export Bitmaps is no longer tied to SPRITES folder.
2023-01-20 15:14:52 +02:00
krs
14b031118c exportBitmaps now uses QT libs 2022-11-27 19:35:11 +02:00
krs
ec1a995218 export bitmaps now by default prepends def name to exported PNG 2022-11-27 19:35:11 +02:00
krs
75b4b64b6f Final checks according to review 2022-11-27 19:35:11 +02:00
krs
d516a5f529 More changes following review. 2022-11-27 19:35:10 +02:00
krs
f0b66b6192 Animation.cpp fixes after review 2022-11-27 19:35:10 +02:00
krs
cca1f074bf Convert PCX to PNG, Final touches, everything deactivated. 2022-11-27 19:35:10 +02:00
krs
d1cdd7d59f Reverted changes made in client for Extractor 2022-11-27 19:35:10 +02:00
krs
10ec486251 Extractor moved to Editor 2022-11-27 19:35:10 +02:00
nordsoft
0d9f7d15a2 Fix typo 2022-11-19 00:02:08 +04:00
nordsoft
7bac01f10a More fixes on image loader 2022-11-19 00:01:48 +04:00
nordsoft
3a913140fd Fix loading images 2022-11-18 23:26:19 +04:00
nordsoft
b4a806d7fa Code polishing 2022-10-13 01:51:55 +04:00
nordsoft
bc84ffe8d6 Code review changes 2022-09-25 00:55:05 +04:00
nordsoft
0b9f601d2c Squashing editor 2022-09-18 03:23:17 +04:00