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

351 Commits

Author SHA1 Message Date
829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
7a3e1409d0 Remove old boost includes and defines 2025-03-19 08:03:56 +00:00
860f65ea62 Merge branch 'develop' into fix_map_sorting 2025-03-16 19:19:27 +02:00
46cd1f7805 optimize skip video keys 2025-03-13 20:56:09 +01:00
749149a679 Fixes following reviews
Use std::optional and improve textSearchSimilarityScore()
2025-03-12 21:40:07 +01:00
3f4616eb0f SonarCloud fixes 2025-03-12 17:44:13 +01:00
5363424451 Small fixes to search mapobject feature:
- Trim overly long names to prevent incorrect item display
- Use getLocaleName() for proper locale-aware to_lower conversion
- Implement scoring-based sorting for better search match ranking
- Remove Boost dependency: replace with std::string::find() and rfind()
2025-03-11 23:22:04 +01:00
4a6a8f9496 Merge pull request #5496 from IvanSavenko/std_thread
Replace boost::thread with std::thread
2025-03-08 16:03:55 +02:00
bd16808090 fix text overflow 2025-03-07 20:19:50 +01:00
948abfb04c AI now uses std::thread, added custom thread interruption logic 2025-03-02 14:33:11 +00:00
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
2362c6da21 Fixes for multiple new issues from Sonar 2025-02-21 15:57:39 +00:00
05e8542a79 Fix corrupted image of university 2025-02-20 13:09:38 +00:00
de06de06b5 refactor backgrounds (allow resolution change) 2025-02-08 20:53:32 +01:00
9a1c2a5800 Merge pull request #5317 from Laserlicht/search_inp
[1.6.4] improved text search
2025-01-25 13:54:27 +02:00
0035b2346a optimized search input 2025-01-23 23:50:04 +01:00
3c104d0e4b max width 2025-01-23 22:12:40 +01:00
38d3426a3b thieves guild icons instead of text 2025-01-23 21:47:49 +01:00
c1e709e8c4 fix video background 2025-01-18 20:35:01 +01:00
487297b05e correct align of thiefguild text an add popup 2024-12-22 00:13:36 +01:00
f893c80192 Move UpgradeInfo class to header and source files 2024-12-19 14:13:09 +01:00
d8d3948ac3 Fix AI to use hillFort all available upgrades. UpgradeInfo refactor. 2024-12-17 22:34:06 +01:00
9fbeacb688 Fix possible memory corruption in video player
Fixes two bugs, one was definitely happening, and 2nd one that is causing
undefined behavior and may work only in some std implementations

- VideoPlayer would attempt to access subtitles widget after VideoPlayer
itself was destroyed in onPlaybackFinished call
- std::function was destroyed from a function that is being called by
it. Replaced with 1-method interface to avoid usage of std::function in
this scenario
2024-12-07 15:37:03 +00:00
28fd6c50c4 search box scroll fix 2024-11-30 16:55:45 +01:00
f59834afe1 Fixes for configurable markets support
- string "speech" can now be translated
- removed "title" string, VCMI will now use object name instead
- moved configuration of all "markets" into a separate json file
- added schema for validation of market objects
- removed serialization of translated strings from University
2024-11-20 15:45:13 +00:00
251155d913 More robust management of body/shadow/overlay split 2024-11-17 17:54:55 +00:00
1d0fdb1c0e Merge pull request #4867 from Laserlicht/notFocusedClick
notFocusedClick refactoring
2024-11-13 20:49:31 +02:00
da8fe13632 Merge pull request #4870 from SoundSSGood/secSkillPlace-fix
CHeroOverview secondary skill icons fixed
2024-11-06 22:02:28 +02:00
f60813d86f CHeroOverview secondary skill icons fixed 2024-11-03 17:29:27 +02:00
ca037aae33 notFocusedClick refactoring 2024-11-03 01:13:14 +01:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
f8b1f40abb Merge pull request #4348 from MichalZr6/hill_fort_changes
Hill Fort unavailable upgrade and status bar new messages
2024-10-30 14:00:35 +02:00
83279211e6 CSecSkillPlace done 2024-10-23 15:01:56 +03:00
9ed4dbaeb4 Merge remote-tracking branch 'upstream/develop' into adv_search 2024-10-14 19:52:55 +02:00
604e3b5c67 Merge pull request #4763 from IvanSavenko/herohandler_split
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03:00
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
f7e3641c04 fix shortcut bug; add center of selected item 2024-10-12 23:21:26 +02:00
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
344e845684 Merge branch 'develop' into adv_search 2024-10-07 12:56:54 +02:00
4bf02865e4 tavern invite show random hero icon as default 2024-10-04 23:14:02 +02:00
8e079cf016 add search box 2024-10-01 22:53:05 +02:00
07aa7bac3c search for texts 2024-10-01 21:19:42 +02:00