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

129 Commits

Author SHA1 Message Date
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
Ivan Savenko
e862b9c868 Fix crash on opening creature window with bonuses that don't have icon 2024-07-19 19:37:22 +00:00
Ivan Savenko
0d44bf1506 Fix build 2024-07-19 12:30:10 +00:00
Ivan Savenko
b256919dab Implemented per-surface alpha for images that have palettes with alpha 2024-07-19 12:03:29 +00:00
Ivan Savenko
c40eea6e10 Fix fade-in animation - per-surface alpha was not set correctly 2024-07-19 10:46:20 +00:00
Ivan Savenko
9f3663b7d4 Remove unused method 2024-07-19 10:08:50 +00:00
Ivan Savenko
4f8f217b49 Moved range highlight transforms to config file 2024-07-19 10:08:50 +00:00
Ivan Savenko
81c7c0ce24 Fixed loading of flipped and duplicate images in animations 2024-07-19 10:08:50 +00:00
Ivan Savenko
73e052b1d0 Fix merge 2024-07-19 10:08:50 +00:00
Ivan Savenko
e4bed98674 Replaced raw json nodes with ImageLocator class 2024-07-19 10:08:50 +00:00
Ivan Savenko
2f68beead1 Remove old code 2024-07-19 10:08:50 +00:00
Ivan Savenko
fd726523a2 Remove creations of custom animations in runtime 2024-07-19 10:08:50 +00:00
Ivan Savenko
5409936509 Fix build with older SDL 2024-07-19 10:08:50 +00:00
Ivan Savenko
0d6ec0d224 Reviewed usage of EBlitMode, now specified clearly in all cases 2024-07-19 10:08:50 +00:00
Ivan Savenko
f11c5f62e1 Remove no longer needed code 2024-07-19 10:08:50 +00:00
Ivan Savenko
b850b6339f Flipped images are now tracked by RenderHandler 2024-07-19 10:08:50 +00:00
Ivan Savenko
9f31ec5326 Restore previously disabled icons registry 2024-07-19 10:08:50 +00:00
Ivan Savenko
a8a330f39f Remove unused code and no longer needed caching 2024-07-19 10:08:50 +00:00
Ivan Savenko
47de9a62dc Created separate classes for shared, unchangeable image and image
manipulators owned by UI elements
2024-07-19 10:08:50 +00:00
Ivan Savenko
2b3e4e01ca Remove unused code 2024-07-19 10:08:50 +00:00
Ivan Savenko
600b06b74d Moved all handling of image loading to render handler 2024-07-19 10:08:50 +00:00
Ivan Savenko
a1fb3b8b01 Reduce direct access to CAnimation, removed various caching schemes 2024-07-19 10:08:50 +00:00
Ivan Savenko
56f1725234 All images are now loaded via RenderHandler class 2024-07-19 10:08:50 +00: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
Ivan Savenko
dd045e2dc7 Fix crash on transparency test on null surface 2024-06-17 17:09:19 +00:00
Ivan Savenko
2b9ad0fdfa Fix time handling 2024-04-30 15:31:35 +03:00
Ivan Savenko
9a71614588 Simplify code 2024-04-30 12:01:03 +03:00
Ivan Savenko
0d8d75afd4 Spaces -> tabs 2024-04-30 11:38:13 +03:00
Ivan Savenko
9187beb7ee
Merge branch 'joystick_support' into joystick_support 2024-04-30 11:27:55 +03:00
Ivan Savenko
fca53e4dbc Do not show "(client)" in window title 2024-04-25 18:53:12 +03:00
kdmcser
60c4ddb515 change hardware cursor to software cursor when joystick available 2024-04-21 22:51:47 +08:00
kdmcser
cee8d34fc5 Merge branch 'develop' into joystick_support 2024-04-15 22:37:15 +08:00
kdmcser
beaebb3a5f a simple implement for game controller 2024-04-13 13:12:25 +08:00
Laserlicht
ff866bdfce
scalingMode to config 2024-04-04 21:10: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
2a193effcc Merge branch 'master' into 'develop' 2024-01-25 16:23:13 +02:00
Ivan Savenko
9920783628 Avoid crash on invalid H3 data 2024-01-20 18:50:59 +02:00
Ivan Savenko
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49:54 +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
781328f282 Convert C-style casts to the more verbose C++ style 2024-01-10 00:30:35 +00: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
Ivan Savenko
3383221f0b Show error message on failure to create renderer 2024-01-05 21:46:44 +02:00
Alexander Wilms
f01ec55d21 Use the "nullptr" literal.
"nullptr" should be used to denote the null pointer
2023-10-27 18:18:59 +00:00
Johannes Schauer Marin Rodrigues
a1a5bc28c2
convert line endings from CRLF (Windows) to LF (Linux/Unix)
Mixed line endings cause problems when exporting patches with
git-format-patch and then trying to "git am" a patch with mixed and
non-matching line endings. In such a situation git will fail to apply
the patch.

This commit runs the dos2unix tools on the remaining files with CRLF
(\r\n) line endings to convert them to line-feeds (\n) only.

Files that are Windows specific like *.vcxproj and *.props files were
not converted.

Closes: #3073
2023-10-19 16:23:21 +02:00
Nordsoft91
041ffceb07
Merge pull request #2952 from Alexander-Wilms/develop
Enable VSync to prevent screen tearing while scrolling across map
2023-10-01 14:08:00 +02:00
Laserlicht
293214bb61
height fix 2023-09-29 00:08:25 +02:00
Alexander Wilms
23d1638d70 Add VSync to settings 2023-09-26 18:55:25 +02:00
Alexander Wilms
73ea52c615 Enable VSync to prevent screen tearing while scrolling across map
Fixes #2935
2023-09-26 18:55:25 +02:00
Laserlicht
a2174dc83f
fix window open while sound playing 2023-09-19 11:20:16 +02:00