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

110 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
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
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
f893c80192 Move UpgradeInfo class to header and source files 2024-12-19 14:13:09 +01:00
af9445c16f Fixes following review 2024-12-17 22:34:06 +01:00
d8d3948ac3 Fix AI to use hillFort all available upgrades. UpgradeInfo refactor. 2024-12-17 22:34:06 +01:00
b89db3f044 fix popup 2024-11-21 23:12:27 +01:00
c82db9d574 Fix crash on rearranging troops on non-owned hero 2024-11-17 17:38:54 +00:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
220c5cb1d7 Remove no longer used DISPOSE flag from CIntObject 2024-08-09 15:50:37 +00:00
9fba3d97f1 Renamed & unified OBJECT_CONSTRUCTION macro set 2024-08-09 15:30:04 +00: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
56f1725234 All images are now loaded via RenderHandler class 2024-07-19 10:08:50 +00:00
b92f0c5619 Fix UI glitch due slots recreation & repositioning 2024-06-04 14:41:33 +00:00
d965226cbd Moved Exchange Window to new file, no functionality changes 2024-05-19 10:53:56 +00:00
7267e02b8d Better handling of Ctrl / Cmd modifier keys on Apple systems:
- Test only for Cmd modifier key when processing mouse clicks
- Test both Ctrl and Cmd modifier key when processing keyboard input
- This logic is now used for all Apple systems - macOS and iOS
2024-05-12 17:09:31 +00:00
1775caa872 UI now correctly blocks stack rearrangement when it is not our turn 2024-04-30 17:51:32 +03:00
f3277b7953 Define each identifier in a dedicated statement 2024-01-10 00:22:23 +00:00
5df53f6ea2 Hota compatibility fix - allow stack selection border to have different
size than creature icon
2023-11-27 23:20:24 +02:00
3c5527a222 ArtifactLocation now use ID for artHolder identification part3 2023-10-29 17:46:13 +02:00
ab2f6abb87 ArtifactLocation now use ID for artHolder identification part2 2023-10-29 17:46:13 +02:00
5523f05284 Moved ArtifactLocation to a separate file 2023-10-23 19:02:28 +03:00
b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
e8453916cf Merge remote-tracking branch 'vcmi/beta' into develop 2023-09-08 18:49:06 +03:00
635884cb05 Replaced show unit info with fill with one's option in radial 2023-09-07 13:55:58 +03:00
823ffa7a07 Always use ResourcePath for referencing images and animations 2023-09-04 18:22:34 +03:00
17d3d663ee Converted creature ID and spell ID to new form 2023-08-25 13:38:02 +03:00
f13a53c1d9 Merge remote-tracking branch 'vcmi/beta' into develop 2023-08-12 17:28:47 +03:00
c8ec0d5419 Added caching for creature icons in garrisons
More complete version of caching will be done for 1.4
Fixes freezes on hero movement when hota mod is used
2023-08-05 14:26:54 +03:00
6cd219738b Added option to disable radial wheel in config (no UI) 2023-07-21 15:47:42 +03:00
3a3306863a Moved new texts to config 2023-07-21 15:47:42 +03:00
816adecca0 Added "split stack" action to wheel 2023-07-21 15:47:42 +03:00
cb28a90a3b Create items only if action is possible 2023-07-21 15:47:42 +03:00
5b2ac27e90 Fix slot positioning 2023-07-21 15:47:42 +03:00
f3508bdfda Show option description on hovering 2023-07-21 15:47:42 +03:00
e3f5ab57f2 Fixed input event ordering. Fixes radial menu show/hide logic 2023-07-21 15:47:42 +03:00
d26595cef7 Radial menu is now a proper window. Minor fixes to positioning. 2023-07-21 15:47:42 +03:00
a494dc4870 Refactoring of CGarrisonInt 2023-07-21 15:47:42 +03:00
dca3785f84 Initial version of radial wheel for army management 2023-07-21 15:47:42 +03:00
ee663b1595 Changes from code review 2023-07-16 15:56:42 +02:00
484d03334c New garrison interface layout: Reversed two rows + labels below slot 2023-07-15 23:11:21 +02:00
ca889a5c2a Replaced clickLeft with clickPressed clickReleased methods 2023-07-08 14:33:04 +03:00
85262cf4f5 Moved CGameState files into a separate directory 2023-06-26 17:15:59 +03:00
563d7dd41f Renamed RCLICK -> SHOW_POPUP 2023-06-20 19:58:05 +03:00
d4aa778547 Replaced clickRight event with showPopupWindow/closePopupWindow 2023-06-20 19:58:05 +03:00
1e9eea30e1 Merge remote-tracking branch 'soundsgood/CArtHandler-rework' into develop 2023-06-05 18:53:17 +03:00
8ea0ecaec1 show/showAll methods now use Canvas instead of SDL_Surface
- added compatibility method to Canvas to allow SDL_Surface access
- added drawBorder method to Canvas to replace CSDL_Ext method
- added drawColor method to Canvas to replace CSDL_Ext method
- minor changes to Tavern and Trade windows to adapt to new API
2023-06-02 16:42:18 +03:00
021f94a579 artifact utils 2023-05-17 17:00:31 +03:00