1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

165 Commits

Author SHA1 Message Date
a8a6be7ac1 Fix potential compatibility with C++20 / C++23 mode
This fixes several issues with compatibility with C++20. C++23 was also
tested, but apparently it does not have any additional breaking changes
compared to C++20 (or we don't have those).

VCMI still uses C++17 as before - goal is only to make potential
transition easier.

There were 2 cases that are deprecated in C++20 that we use:
- Floating point operations on enums are deprecated
- `this` can no longer be captured when using default capture by value
`[=]`

Both of those should now be replaced with code that works fine in both C+
+17 and in C++20 mode
2025-03-02 14:11:48 +00:00
e5a095a237 Remove main menu global. Now accessed via GameInstance 2025-03-01 21:16:41 +00:00
d3de0d525f Removed GameEngine::curInt member
- event processing is now initiated by GameEngine instead of weird chain
engine -> player interface -> engine
- introduced GameEngineUser interface (implemented by GameInstance) to
remove mutual depedency between GameEngine and GameInstance (some
technically still remains for now, in form of some free functions)
2025-03-01 21:16:40 +00:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
156de5b17e Added GameInstance class
- available as global GAME
- integrates LOCPLINT (CPlayerInterface)
- integrates CGI->mh (CMapHandler)
- integrates CSH (CServerHandler)
2025-02-21 16:54:06 +00:00
ffd37a8fa8 Removed CGI in favor of VLC. Map handle is for now global variable 2025-02-21 16:53:14 +00:00
f657e85305 Integrated CClientState into GameEngine class 2025-02-21 16:53:14 +00:00
cacceda950 Renamed CGuiHandler to GameEngine
- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
2025-02-21 16:53:13 +00:00
ec5d4dbe5d Merge pull request #5361 from GeorgeK1ng/menu_campaign_fix
Fix VCMP campaign detection for buttons
2025-02-02 14:10:12 +02:00
5b579f6912 Fix VCMP campaign detection for buttons 2025-02-01 09:57:11 +01:00
cca4c0888c In-memory assets generation
All assets generation (large spellbook, terrain animations, etc) are now
done in memory and used as it, without saving to disk.

This should slightly improve load times since there is no encode png /
decode png, and should help with avoiding strange bug when vcmi fails to
load recently saved assets.

If needed, such assets can be force-dumped on disk using already
existing console command
2025-01-30 22:21:38 +00:00
8d9c28685c MuMap FallBack + campaign buttons displaying validation 2025-01-12 11:35:06 +01:00
f3d48ecc3a Ability to use random progress bar 2025-01-08 00:16:55 +01:00
905eac24ae Multiplayer menu improvements 2025-01-07 19:30:26 +01:00
b4f6932f36 Ability to use random main menu background 2025-01-06 11:33:15 +01:00
87a665fb7f Restored all disabled mod functinality that was used by client 2024-11-26 13:55:46 +00:00
9c55ebf2dd chronicles campaign screen 2024-11-11 22:25:54 +01:00
185d036d78 no scrollbar for hotseat title (with ttf fonts) 2024-10-20 03:16:57 +02:00
a43475042f code review 2024-09-18 22:10:25 +02:00
21c3cf0960 rename and move window class 2024-09-12 23:35:21 +02:00
2fbdeb3a5d skippable video intro 2024-09-12 23:23:00 +02:00
8fc3fe3cc3 scaling 2024-09-12 23:06:33 +02:00
822fa61bf2 intro rework 2024-09-12 22:28:45 +02:00
c52533a961 Merge pull request #4543 from Laserlicht/chronicles_installer
Chronicles support
2024-09-05 15:04:13 +03:00
1c809bcb88 fixes build on clang 2024-09-03 00:25:35 +02:00
16cbd6a7d2 allow custom loadbar-backgrounds for campaigns 2024-08-31 16:03:42 +02:00
32ad9c1902 Change ordering of UI elements in main menu to fix hota 1.7 menu 2024-08-29 13:18:33 +00:00
b84af1a6de Significantly simplify packs applying
Apparently our logic for packs applying with types registration is
overcomplicated and by now completely unnecessary - it became redundant
after introduction of visitor pattern.
2024-08-26 19:48:46 +00:00
97f1a310df Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
9fba3d97f1 Renamed & unified OBJECT_CONSTRUCTION macro set 2024-08-09 15:30:04 +00:00
00605b5129 Remove largely unused defActions member from CIntObject 2024-08-09 14:26:53 +00:00
4533271692 Merge pull request #4312 from IvanSavenko/texthandler_split
Split CGeneralTextHandler file into 1 file per class form
2024-07-21 13:49:14 +03:00
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
cde9bed5a6 Use std::vector::empty for non-zero size checking.
Use auto type for ocontainers iterations.
2024-07-20 12:16:13 +03:00
551b87e2cd Add up to 8 human player names to the configuration and save/load them to avoid entering them each time.
Avoid a crash when all names are deleted in the multiplayer names editing dialog.
2024-07-17 20:04:20 +03:00
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
f03d80628a Fix potentially uninitialized pointer 2024-06-11 14:12:03 +00:00
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
d1aa4ecd10 Merge pull request #4013 from IvanSavenko/shortcuts_additions
[1.5.2] Shortcuts additions
2024-05-21 14:18:55 +03:00
82af0639df Merge pull request #4004 from Laserlicht/background
[1.5.2] background for multiple windows
2024-05-20 18:10:38 +03:00
017aaefc40 Handle invalid main menu config 2024-05-20 11:00:21 +00:00
88fbb7ee71 Most of buttons created in cpp now have assigned shortcut 2024-05-19 09:12:36 +00:00
c676b999e5 use showAll 2024-05-18 20:21:47 +02:00
d502850054 Add network thread termination logic for adventure map animations 2024-05-18 12:15:48 +00:00
9bfe000724 Added semi-workaround method for network thread shutdown:
Currently closing game while network thread is waiting for something is
very bug-prone, since network thread may resume during shutdown and
access partially destroyed client state.

Now if exit has been requested, the very first step would be semi-
graceful shutdown of network thread (via exception throwing). This may
in theory skip some cleanup in non-RAII code, but since game is shutting
down this does not matters much.

This logic applies to:
- shutting down while network thread is waiting for dialogs
- shuttind down while network thread waiting for animations in combat
2024-05-18 11:04:10 +00:00
540bd16e7b Fixed video widget playback 2024-05-16 16:50:36 +00:00
d08c7b7b8f Added VideoWidget to hide implementation details 2024-05-15 17:05:16 +00:00
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
93c3cf372b Reworked TextInput to allow text overflow support 2024-05-15 12:45:45 +00:00