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

795 Commits

Author SHA1 Message Date
Ivan Savenko
69dc95c3c8
Merge pull request #2235 from IvanSavenko/hota_h3m_support
Hota h3m support
2023-06-23 13:32:10 +03:00
Ivan Savenko
a505cc464e Fixed slider's behavior, especially for mobile systems 2023-06-22 23:49:38 +03:00
Ivan Savenko
4e7412faa6 Split mouseDragged event from mouseMoved 2023-06-22 22:11:48 +03:00
Ivan Savenko
108688389e Fix accessing potentially non-existing UI element 2023-06-20 19:58:05 +03:00
Ivan Savenko
ffdac314e9 Added selection of long touch duration 2023-06-20 19:58:05 +03:00
Ivan Savenko
06437cbde6 Renamed gesture-related methods, remove unused code 2023-06-20 19:58:05 +03:00
Ivan Savenko
563d7dd41f Renamed RCLICK -> SHOW_POPUP 2023-06-20 19:58:05 +03:00
Ivan Savenko
82288996a2 Fix cursor visibility on closing popup 2023-06-20 19:58:05 +03:00
Ivan Savenko
85a11c090e Enter popup await mode only if there is an active popup 2023-06-20 19:58:05 +03:00
Ivan Savenko
d4aa778547 Replaced clickRight event with showPopupWindow/closePopupWindow 2023-06-20 19:58:05 +03:00
Ivan Savenko
56d69e790b Renamed MetaString methods to more logical names 2023-06-20 19:37:27 +03:00
Ivan Savenko
2636a0dcc3 Moved MetaString to a new file 2023-06-20 19:37:27 +03:00
Ivan Savenko
f35b3a0dc3 Replace MetaString operator << with member function 2023-06-20 19:37:27 +03:00
Ivan Savenko
487f441f47 Implemented boat selection for town shipyards 2023-06-16 17:59:49 +03:00
krs
c0591573bf Working Version 2023-06-11 18:40:47 +03:00
Ivan Savenko
6283329aeb Added option to disable edge scrolling 2023-06-05 19:20:20 +03:00
Ivan Savenko
a08ff1e6ef Removed no longer used touchscreen option 2023-06-05 19:20:08 +03:00
Ivan Savenko
b20109c830 Test version of swipe gesture for in-combat attacks 2023-06-05 19:20:08 +03:00
Ivan Savenko
70155b48e1 Only show touchscreen options on systems that have one 2023-06-05 19:20:08 +03:00
Ivan Savenko
2c7b94d17f Remove unused map swipe option 2023-06-05 19:20:08 +03:00
Ivan Savenko
052d0d314a Implemented Scrollable class, to server as common base for such classes 2023-06-05 19:17:04 +03:00
Ivan Savenko
6fe00ad55c Moved slider class to a separate file 2023-06-05 19:16:01 +03:00
Ivan Savenko
e2a85e25fa Removed old code 2023-06-05 19:00:57 +03:00
Ivan Savenko
48859e186e Added panning gesture, activated by mouse wheel press 2023-06-05 19:00:56 +03:00
Ivan Savenko
1e9eea30e1 Merge remote-tracking branch 'soundsgood/CArtHandler-rework' into develop 2023-06-05 18:53:17 +03:00
Ivan Savenko
8d278e653f
Merge pull request #2202 from IvanSavenko/map_objects_reorganization
Map objects code reorganization
2023-06-05 18:35:05 +03:00
Ivan Savenko
d6a357fd17 Split some map object files into smaller files. Reduced includes usage. 2023-06-02 21:47:37 +03:00
Ivan Savenko
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
Ivan Savenko
acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
Ivan Savenko
2c3e8c3390
Merge pull request #2168 from IvanSavenko/gui_handler_event_handling_refactoring
Event handling refactoring
2023-05-23 15:08:10 +03:00
Ivan Savenko
a4000f2fc8 Removed isActive(int) method since its usages were redundant or wrong 2023-05-20 01:51:49 +03:00
Ivan Savenko
c77f8482e3 Replaced event handling break system with key capturing 2023-05-20 01:51:49 +03:00
Ivan Savenko
d5d0ca96a8 Minor fixes and cleanup 2023-05-20 01:51:49 +03:00
Ivan Savenko
1f513fd280 Extracted event management from GuiHandler and CIntObject 2023-05-20 01:51:49 +03:00
Ivan Savenko
06b6f59107 Resolution selector will now correctly update in borderless window mode 2023-05-19 23:54:43 +03:00
Ivan Savenko
20ec747440 Do not show desktop-only options on mobile systems 2023-05-19 23:19:43 +03:00
Ivan Savenko
d18b240d6d Added separate borderless & exclusive fullscreen options 2023-05-19 22:43:52 +03:00
SoundSSGood
021f94a579 artifact utils 2023-05-17 17:00:31 +03:00
Ivan Savenko
ad3e54e6c0 Reduced usage of topWindow() method 2023-05-16 21:57:45 +03:00
Ivan Savenko
e2ef136003 Renamed "Int" -> "Window" in WindowHandler API 2023-05-16 19:10:22 +03:00
Ivan Savenko
051a4a3c17 Encapsulation of WindowHandler state 2023-05-16 19:10:22 +03:00
Ivan Savenko
7838190ef4 Moved window stack management from GuiHandler to new class 2023-05-16 19:10:21 +03:00
Ivan Savenko
fa496628f2 Separated timer updates from rendering in adventure map and town screen 2023-05-14 22:22:37 +03:00
Ivan Savenko
3ecdff2a21 FramerateManager now uses chrono instead of SDL_Ticks 2023-05-14 22:22:37 +03:00
Ivan Savenko
03df274450 Framerate manager is now in a separate file and private member of GH 2023-05-14 22:22:37 +03:00
Ivan Savenko
c5a48a01ce Remove no longer used code 2023-05-09 13:10:33 +03:00
Ivan Savenko
243773b6ef Renamed some adventure map files & classes 2023-05-09 13:10:33 +03:00
Ivan Savenko
e26b18c139 Rename & cleanup of WindowHandler -> ScreenHandler 2023-05-09 13:10:33 +03:00
Ivan Savenko
dbc4330fc5 Fixed positioning of resource bar and town list in other windows 2023-05-09 13:10:33 +03:00
Ivan Savenko
97d266ea2d Remove duplicated resolutions, e.g. different frequency 2023-05-09 13:10:33 +03:00
Ivan Savenko
342ea138f9 Fix remaining graphical artifacts on switching from world view 2023-05-09 13:10:33 +03:00
Ivan Savenko
c24ccf663b Fixed auto-enabling of status bar on windows activations 2023-05-09 13:10:33 +03:00
Ivan Savenko
77beca50e2 Hide resolution selector on mobile devices 2023-05-09 13:10:33 +03:00
Ivan Savenko
a0f1bf3928 Implemented user-selectable UI scaling mode 2023-05-09 13:10:33 +03:00
Ivan Savenko
a4b102e46f Implemented UI scaling (non-selectable option for now) 2023-05-09 13:10:33 +03:00
Ivan Savenko
8d28f96619 Resolutions selector now shows all available resolutions 2023-05-09 13:10:33 +03:00
Ivan Savenko
c688411bab Extracted window management from CMT to new class 2023-05-09 13:10:33 +03:00
Ivan Savenko
a015bf6507 Initial part of dynamically-sized adventure map:
- removed no longer used CConfigHandler
- remove no longer use resolutions.json
- moved widget management from adventure map to a separate class
- adventure map layout is now loaded from config
2023-05-09 13:10:33 +03:00
Konstantin P
057a33c508 SpellSchool: use identifier instead of int
Needs redifinition of MAGIC_SCHOOL_SKILL in all mods
2023-05-07 20:37:32 +03:00
Konstantin
05eccbc2bb vcmi: split bonus to enumerator and HeroBonus.h 2023-05-03 18:01:06 +03:00
Konstantin
fbc05c70ac vcmi: camelCase methods of new classes
Also use EGameSettings for clamping morale and luck
2023-05-02 12:09:13 +03:00
Konstantin
a6de9097be vcmi: rename HeroBonus.h to Bonus.h 2023-05-02 11:20:58 +03:00
Konstantin
4866c2fe5c vcmi: split IBonusBearer 2023-05-02 00:54:53 +03:00
Konstantin
b6eb2dc060 vcmi: rename IFactionMember and ICreature 2023-05-02 00:54:53 +03:00
Konstantin
6fa1b2b19f vcmi: move bonuses to its own folder 2023-05-02 00:53:50 +03:00
Konstantin P
4b2a09dae7 FactionMember: move code around 2023-05-02 00:53:50 +03:00
Ivan Savenko
916b41d9a7
Merge pull request #2078 from IvanSavenko/shortcuts
Basic shortcuts system
2023-05-01 21:45:52 +03:00
nordsoft
32277a007d Fix compilation after merge 2023-05-01 21:49:37 +04:00
nordsoft
07b2052679 Bit refactoring 2023-05-01 21:49:37 +04:00
nordsoft
68fa7aaf35 Remove limitations for amount of skills 2023-05-01 21:49:37 +04:00
nordsoft
a4fd6c1c92 Move trading window title to config 2023-05-01 21:49:37 +04:00
nordsoft
07f7c318dc Adjust client part for markets 2023-05-01 21:49:37 +04:00
nordsoft
4b1b58b617 Change Callback to abstract 2023-05-01 21:49:37 +04:00
nordsoft
59bc9326e9 Remove excess pointer from market interface 2023-05-01 21:49:37 +04:00
Ivan Savenko
dea10e6091 Use more descriptive names for hotkeys 2023-05-01 17:59:20 +03:00
Ivan Savenko
a654cc2391 Removed vstd::advance. Added vstd::next to handle similar cases. 2023-05-01 17:58:18 +03:00
Ivan Savenko
832e56e005 Implementation of (very basic) shortcuts system
- Added EShortcut enumeration that contains all in-game shortcuts
- CIntObject::keyPressed now receive values from hotkey enumeration
- On keypress, SDL key code will be translated to shortcut ID
- Removed access to SDL key codes from most of engine
2023-05-01 17:58:17 +03:00
Ivan Savenko
4aa232a60a
Merge pull request #2055 from SoundSSGood/cartifactholder-rework
Artifact related code refactoring part2 (client CArtifactHolder)
2023-05-01 02:33:08 +03:00
SoundSSGood
8b531ca6c4 CArtifactHolder divided into files 2023-05-01 00:34:45 +03:00
Konstantin
86f5d6de69 vcmi: modernize headers 2023-04-30 13:35:54 +03:00
Ivan Savenko
d985ac90d3 Merge master -> develop 2023-04-28 22:57:25 +03:00
Ivan Savenko
76d5b459f1 Fixed music playback on switching between towns 2023-04-28 16:53:45 +03:00
Konstantin P
b472c89276 vcmi: make some CStack properties private
There is a getters for this properties already available
2023-04-27 20:58:49 +03:00
Ivan Savenko
fb739e7186 Merge beta -> develop 2023-04-26 22:48:08 +03:00
Ivan Savenko
48abf46824
Merge pull request #2005 from IvanSavenko/advmap_refactor
Refactoring of adventure map interface
2023-04-24 17:19:22 +03:00
SoundSSGood
dcac8252f3 fixed windows positions 2023-04-23 14:57:45 +03:00
SoundSSGood
a8220c551f fixed init CArtifactsOfHero 2023-04-23 14:33:47 +03:00
Ivan Savenko
bb08a0afc8 Moved selection logic to player state 2023-04-20 22:04:24 +03:00
Ivan Savenko
365f552fa1 Added API for owned towns access 2023-04-20 22:04:24 +03:00
Ivan Savenko
6a46138617 Moved current selection to local state class 2023-04-20 22:04:24 +03:00
Ivan Savenko
f6d480cbb2 Moved player-specific heroes & towns information to new class 2023-04-20 22:04:24 +03:00
Ivan Savenko
4ec32e4dcd Renamed CAdvMapInt to its proper full name 2023-04-20 22:04:24 +03:00
Ivan Savenko
f1902ab247 Initial refactoring to encapsulate adventure map 2023-04-20 22:03:28 +03:00
nordsoft
de159df481 Rename boats 2023-04-20 21:20:51 +04:00
Ivan Savenko
f245080cba Fix missing error message on casting spell in hotseat 2023-04-20 19:24:13 +03:00
nordsoft
0a28262c15 Merge remote-tracking branch 'upstream/develop' into boats
# Conflicts:
#	AI/VCAI/Pathfinding/AINodeStorage.cpp
2023-04-19 02:22:19 +04:00
nordsoft
ed798b06da Prepare transport enum 2023-04-18 13:04:49 +04:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Ivan Savenko
3738171b21 Refactoring of H3M loader to make HotA format support easier
- extracted low-level reader from MapFormatH3M class
- added separate structure to define version-specific values
- cleared up some H3M format edge cases
- replaced witch hut skill vector with set
- converted several fields to enum type
2023-04-15 17:20:38 +03:00
Ivan Savenko
644f0f4b32 Removed ARRAY_COUNT in favor of std::size 2023-04-12 01:04:26 +03:00
Ivan Savenko
506c3d29bc Replaced vstd clamp with std version 2023-04-12 01:03:14 +03:00
Ivan Savenko
5f74aca341 Fix missing attribute 2023-04-12 01:03:14 +03:00
Ivan Savenko
63b197b78a Converted attributes to use c++17 functionality 2023-04-12 01:03:14 +03:00
Ivan Savenko
dfa2e2a349 Merge beta into develop 2023-04-11 19:37:35 +03:00
Konstantin
fedf7d377c vcmi: remove TFaction
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Konstantin
40bea35a26 CHeroWindow: fix picked art mana limit display 2023-04-10 15:35:21 +03:00
krs
1644cab938 Added combat option Highlight Movement on Hover 2023-04-08 20:40:30 +03:00
Ivan Savenko
e35a1ba471
Merge pull request #1876 from rilian-la-te/refactoring-v1
VCMI Refactoring
2023-04-08 11:14:05 +03:00
nordsoft
52b53ab307 Feature and setting implemented 2023-04-08 01:49:59 +04:00
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Ivan Savenko
cf966015bb Correctly update battle queue state after changing its state 2023-04-05 18:35:45 +03:00
Ivan Savenko
307065a633 Merge beta into develop 2023-04-04 16:06:20 +03:00
Ivan Savenko
5b480124b8
Merge pull request #1862 from IvanSavenko/fix_garrison_move_shortcut
Space and left-clicking on second hero in town now have share code
2023-04-04 11:23:19 +03:00
Ivan Savenko
d6cb513374
Merge pull request #1858 from IvanSavenko/sliders_fix
Allow defining active areas for sliders.
2023-04-04 11:21:45 +03:00
Ivan Savenko
93b77d0c99 Space and left-clicking on second hero in town now have share code 2023-04-03 00:43:18 +03:00
Ivan Savenko
507d8bf7fd Allow defining active areas for sliders. Fixes settings window. 2023-04-02 22:24:07 +03:00
Ivan Savenko
c661419897
Merge pull request #1700 from rilian-la-te/resource-array
Modernize resourceSet.
2023-04-02 20:12:45 +03:00
Ivan Savenko
4c6dbb5037 Fix town UI update on building new structures 2023-03-31 23:18:45 +03:00
Konstantin
c1fd7309ad ResourceSet: composition 2023-03-31 14:00:49 +03:00
Ivan Savenko
1084da00df Fix initial value of sound/music labels in settings 2023-03-30 12:23:47 +03:00
Ivan Savenko
47e774897d Show simple message on left-clicking empty buildings 2023-03-28 17:36:46 +03:00
Ivan Savenko
b875da108b
Merge pull request #1717 from SoundSSGood/backpack-limit-size
Introducing backpack size limit functionality
2023-03-27 17:17:49 +03:00
Ivan Savenko
5857ad0169 Fix corrupted UI redraw in artifact merchant 2023-03-25 23:54:51 +02:00
Ivan Savenko
c246cadaa7 Fix potential crash on exit 2023-03-25 23:54:51 +02:00
Ivan Savenko
46461e5c33 Improve performance of window redraws 2023-03-25 23:54:51 +02:00
SoundSSGood
19096f39f0 Backpack limit. Amount of fixes. 2023-03-21 22:11:42 +02:00
SoundSSGood
f0f9eecf97 Backpack limit part5. End of battle. Other stuff 2023-03-21 12:14:33 +02:00
SoundSSGood
9f8aa25297 Backpack limit part4 (Using cheats, buying) 2023-03-21 12:14:33 +02:00
SoundSSGood
72122fb433 CArtifact, CArtifactInstance, CCombinedArtifactInstance reorganization 2023-03-21 12:14:33 +02:00
Konstantin
bbbbfe00f0 Modernize resourceSet 2023-03-17 02:26:54 +03:00
Ivan Savenko
a0e9e01b48 Renamed & reorganized all game mechanics settings names 2023-03-16 18:11:35 +02:00
Ivan Savenko
383387ef29 Integrated defaultMods into mod system 2023-03-16 17:55:09 +02:00
Konstantin
a0987313ba vcmi: convert intelligence
Intelligence is converted to both global effect and skill bonus

Bonus name HERO_MANA_PER_TEN_KNOWLEDGE is a little weird, but works
like old SECONDARY_SKILL_PREMY bonus
2023-03-16 16:46:41 +03:00
Konstantin
f264c541fb vcmi: skill-agnostic tactics
Tactics is split to 2 bonuses, and it is now possible to
block tactics without having tactics itself. But tactics
for two sides is not implemented, because it is huge rework
and not high priority for me now, I want to do basic
secondary skill rework first.
2023-03-16 16:46:41 +03:00
Konstantin
300a8a15ba vcmi: remove estates bonus
Now it is handled by GENERATE_RESOURCE::GOLD.
2023-03-16 16:46:41 +03:00
Konstantin
34a26580a7 vcmi: skill-agnostic resistance
Uses exiting bonus and new PERCENT_TO_TARGET_TYPE value type
2023-03-16 16:46:41 +03:00
Ivan Savenko
77f92e56ac
Merge pull request #1689 from IvanSavenko/map_renderer_fixes
Map renderer fixes
2023-03-16 14:48:57 +02:00
Ivan Savenko
2a2af34788
Merge pull request #1650 from SoundSSGood/arts-swap-regression-fix
Arts swap regression fixed
2023-03-16 14:47:31 +02:00
Ivan Savenko
d3533150b8 Fix misplaced width/height in UI 2023-03-15 12:17:08 +02:00
Konstantin
18200d1d98 vcmi: move getEstimatedComponentHeight 2023-03-13 00:24:26 +03:00
Konstantin
a0c644a0e5 vcmi: actually implement AUTO for CInfoWindow
This is possible to use infobar interactions now.
2023-03-11 21:41:57 +03:00
Ivan Savenko
0ea73cae7f
Merge pull request #1662 from rilian-la-te/reduce-lexical-cast
vcmi: reduce boost::lexical_cast usage
2023-03-10 12:53:21 +02:00
Ivan Savenko
11dc9228e2
Merge pull request #1635 from SoundSSGood/warmachine-buying-fix
warmachine buying fix
2023-03-09 15:52:41 +02:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
SoundSSGood
e24eb6cc12 regression fixed 2023-03-08 17:20:38 +02:00
Ivan Savenko
76927cf434 Fix selection of current resolution 2023-03-07 15:35:04 +02:00
Ivan Savenko
d7e914d0eb Fix resolution selection menu texts 2023-03-07 15:27:54 +02:00
Ivan Savenko
b7025125d5 Added map swipe option 2023-03-05 23:53:06 +02:00
Ivan Savenko
2e69a4769d Implemented framerate limit option (not available in UI) 2023-03-05 21:06:52 +02:00
Ivan Savenko
37b2fb7ff3 Fixed map options to support adventure map rewrite 2023-03-05 20:14:23 +02:00