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

130 Commits

Author SHA1 Message Date
Laserlicht
268e0c8c44 change data structure 2024-07-25 00:28:49 +02:00
Laserlicht
48eacbf830 handicap percent 2024-07-25 00:28:49 +02:00
Laserlicht
97f49030d2 fix 2024-07-25 00:28:49 +02:00
Laserlicht
af2b6a0051 show handicap resources 2024-07-25 00:28:49 +02:00
Laserlicht
8edf77afcc basic handicap support 2024-07-25 00:28:01 +02:00
Ivan Savenko
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00: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
Ivan Savenko
920a39844b Unified naming of method to recolor UI element to current player scheme 2024-07-19 10:08:50 +00:00
Laserlicht
8b1c038415 fix 2024-07-06 23:57:08 +02:00
Laserlicht
81574138c7 show only used fields 2024-07-06 23:22:40 +02:00
Laserlicht
37c783b7c1 code review 2024-07-06 22:55:56 +02:00
Laserlicht
da83f5dc3b fix if only one line 2024-07-06 13:04:00 +02:00
Laserlicht
301da0b75a fix for multiplayer 2024-07-06 13:04:00 +02:00
Laserlicht
27dd00f8ce remember slider location 2024-07-06 13:04:00 +02:00
Laserlicht
684a9519b6 max columns 2024-07-06 13:04:00 +02:00
Laserlicht
b3f0bf1e1d finish slider 2024-07-06 13:04:00 +02:00
Laserlicht
29d4cf274a basic slider 2024-07-06 13:04:00 +02:00
Ivan Savenko
adc3441bda
Merge pull request #3998 from IvanSavenko/refactor_sdl_media
[1.6] Reorganize SDL sound/music/video handling
2024-05-31 12:02:55 +03:00
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
Ivan Savenko
d27b854cb1 Reorganized music, video and sound players:
- All XXXplayers are now in client/media directory
- Reogranized code on one class per file basis
- Extracted interfaces from handlers. Handlers now implement
corresponding interface.
- CCS now only stores pointer to an interface
2024-05-15 17:05:12 +00:00
Ivan Savenko
7790b8969d Simplify TextInput constructor 2024-05-15 12:45:45 +00:00
Ivan Savenko
1abe9007bc Moved CTextInput to a separate file. No changes in logic 2024-05-15 12:45:45 +00:00
Ivan Savenko
07d201502e Refactoring of button class to prepare for configurable button 2024-02-29 13:57:25 +02:00
Ivan Savenko
99cb1df91d Fixes for positioning on popups with components 2024-02-27 13:15:16 +02:00
Ivan Savenko
55b504792e Implemented basic version of login window and persistent connection on
client
2024-01-19 23:49:59 +02:00
Ivan Savenko
bd5682ecc3 Merge remote-tracking branch 'vcmi/master' into develop 2024-01-19 13:49: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
Laserlicht
e25c8c21e0
fix buggy multiplayer selection 2024-01-13 21:51:56 +01:00
Ivan Savenko
7cf738b20e
Merge pull request #3462 from Laserlicht/trim_text
limit textboxes
2024-01-12 21:53:30 +02:00
Laserlicht
24d4816a36
trim text 2024-01-07 23:42:48 +01:00
Laserlicht
8f2f5344a9
correct starting bonus in selection windows 2024-01-07 17:25:33 +01:00
Ivan Savenko
76cb5387c5 Access CHero in a way that will throw exception on invalid access
instead of crash
2023-12-13 16:50:56 +02:00
Ivan Savenko
653304b004 Implemented accumulating timers, rename creature timer to unit timer 2023-12-07 13:57:16 +02:00
Ivan Savenko
02f7193260 Fix regression from map translation - properly translate custom main
hero name
2023-11-27 20:27:10 +02:00
Ivan Savenko
e5e01ab35d Disable spectator mode in single player to avoid confusing players 2023-11-20 14:38:57 +02:00
Ivan Savenko
0842f5afee Removed remaining usages of std::vector<bool> 2023-11-15 15:55:18 +02:00
Ivan Savenko
32633d5f52 Initial version of Turn Options tab screen 2023-11-13 19:06:56 +02:00
Ivan Savenko
3268ebe27c Moved some code from OptionTab to separate class, OptionTabBase 2023-11-13 19:06:56 +02:00
Ivan Savenko
59806bf112 Fix right-click tooltips for starting hero/towns 2023-11-12 17:17:07 +02:00
Ivan Savenko
10e50548e7 Converted Component class to use VariantIdentifier instead of int 2023-11-02 12:00:04 +02:00
Ivan Savenko
5523f05284 Moved ArtifactLocation to a separate file 2023-10-23 19:02:28 +03:00
Ivan Savenko
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
Laserlicht
a042cc46c2
no town selection on loadscreen 2023-10-21 19:10:02 +02:00
Laserlicht
ecd093cae4
fix 2023-10-16 21:28:44 +02:00
Laserlicht
0a1578b797
Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2023-10-16 21:24:59 +02:00
Laserlicht
b2396a61fa
code review 2023-10-14 13:34:39 +02:00
Laserlicht
7217992898
code review 2023-10-14 12:08:38 +02:00
Laserlicht
0c6b1ca3c8
possibility to change name 2023-10-13 23:04:35 +02:00
Ivan Savenko
037efdf5fc Improvements to type safety of Identifier class
- Constructor of Identifier from integer is now explicit
- Lobby hero/town selection now uses Identifiers instead of int's
- Removed serialization workaround for hero portraits
- Added dummy objects for custom heroes portraits for ID resolver to use
- HeroInstance now stores portrait ID only in case of custom portrait
- Fixed loading of campaign heroes portraits on RoE maps
2023-10-04 18:05:23 +03:00
nordsoft
5b97c323d3 Rename hero strings to text id 2023-09-28 00:04:05 +02:00