1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00
Commit Graph

106 Commits

Author SHA1 Message Date
a8fe8c0f3b Converted timer event into tick event that is called every frame 2023-03-22 23:10:50 +02:00
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
2e69a4769d Implemented framerate limit option (not available in UI) 2023-03-05 21:06:52 +02:00
105d988624 Remove debug code 2023-03-05 19:55:38 +02:00
5fb5513572 Attempt to trace crash caused by iterator invalidation 2023-03-05 19:55:38 +02:00
c976176453 Added additional buttons for movement speeds 2023-03-05 19:53:26 +02:00
b57a07b10f Restored ambient sounds functionality 2023-03-05 18:02:59 +02:00
34dcb4127a Removed text utilities from SDL_Extensions 2023-02-03 18:55:25 +02:00
7c58a46279 Removed some instances of access to screen surface 2023-02-03 18:23:53 +02:00
3fef2a5e1f Moved Colors to a separate file, updated includes 2023-02-03 11:39:40 +02:00
aab082fd2e Remove remaining access to SDL_Events 2023-02-03 11:39:40 +02:00
594b7614cf Fix CI build 2023-02-03 11:39:40 +02:00
cfcaf5cbb6 renamed keyDown -> keyPressed 2023-02-03 11:39:40 +02:00
b1821d4442 Removed some SDL access from non-SDL code 2023-02-03 11:39:40 +02:00
e1bd0d2a04 API for custom events no longer requires SDL access 2023-02-03 11:39:40 +02:00
d4fba3787c Removed usage of SDL_KeyboardEvent from UI code 2023-02-03 11:39:40 +02:00
860fe43131 Merged two mouse button enums 2023-02-03 11:39:40 +02:00
6669ffd4b3 Moved input-related code from SDL_Extensions to GuiHandler 2023-02-03 11:39:40 +02:00
214fc19e74 CIntObject now receives mouse position as point instead of SDL event 2023-02-03 11:39:39 +02:00
108a42e4ba Reorganized includes for new layout. New class - IImageLoader 2023-02-01 20:42:06 +02:00
9c3030603d Removed most SDL includes from headers, removed SDL int's 2023-01-30 19:55:32 +02:00
42df5626d9 Added Color class to replace SDL_Color 2023-01-30 00:12:43 +02:00
080d4b13dd vcmi: suppress warning on IOS
Let CI passes on develop.
2023-01-29 21:30:37 +03:00
57ee9a9bf3 Merge vcmi/beta into vcmi/develop 2023-01-29 18:21:55 +02:00
50a0fc4fb2 Removed pointer to current SDL_Event from GuiHandler 2023-01-27 23:17:40 +02:00
4d1c338503 Merge pull request #1498 from rilian-la-te/conan-v2
Conan as MXE replacement
2023-01-27 23:14:37 +02:00
a7bd7232ce CGuiHandler: fix false positive dangling pointer
Making this an auto variable fixes compilation with Werror.
2023-01-25 17:14:41 +03:00
08b04a3527 handle double-click in Town Portal dialog 2023-01-23 15:43:55 +03:00
fc0f5a9fb3 Reduced SDL includes 2023-01-20 16:11:43 +02:00
ee7a573cb8 Refactoring of SDL API usage:
- Rect no longer inherits from SDL_Rect
- renamed vcmi functions that used SDL naming format
- moved all functions in SDL_Extensions file into CSDL_Ext namespace
- SDL_Rect is now used only by SDL_Extensions, all other code uses Rect
2023-01-20 16:11:43 +02:00
9a765e5f67 Remove not supported method, allow relative mode for iOS 2023-01-19 08:26:35 +02:00
6c843bce0b SDL relative pointer for android 2023-01-18 10:38:55 +02:00
c24b89fe06 2 finger rclick block adwmap scrolling and disable for iOS 2023-01-17 16:22:44 +02:00
2b1511df99 SDL fix 2 finger touch when you remove fingers instantly 2023-01-16 13:39:45 +02:00
7ccfcf51e9 Handle 2 fingers gesture as rclick via SDL 2023-01-16 09:46:52 +02:00
0e8ee929df Renamed CCursorHandler -> CursorHandler 2023-01-15 21:18:34 +02:00
d8c4209ded Movement animation is now more smooth at high animation speeds 2023-01-04 17:21:40 +02:00
f8dec3861b Fixed animation skipping with no sound mod and enemy having first turn 2022-12-30 11:56:26 +02:00
16c4851d3b Animated cursor for spell selection, removed hardcoded cursor ID's 2022-12-18 22:32:07 +02:00
c79634b6a7 Moved all animation ordering logic to callers
Previously, CBattleAnimation & inheritors were controlling animation
ordering - e.g. which animations should play after which.
Now, this is controlled by caller, e.g. BattleInterface & its
controllers.
H3 animations are fairly linear and can be split in stages which are
already somewhat implemented via waitForAnims
2022-12-13 21:31:49 +02:00
c855823528 Renamed files in client/battle to match new names of classes 2022-12-09 13:38:46 +02:00
2521e7bac9 Fix flickering in fullscreen 2022-06-13 16:11:53 +03:00
1128abc593 Fix hero movement animation 2022-06-07 15:00:39 +03:00
d92356f085 Fixed game crash: divide by zero due to threads racing 2022-05-28 14:34:36 +03:00
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
c61bae4060 Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation. 2020-10-05 16:28:28 -07:00
a05ae78e67 Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.

4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
2020-10-04 02:20:18 -07:00
fca9bcdd7f Fixed possible freezes while dragging visible area on minimap (#638) 2020-05-03 01:26:30 +03:00
e6f1ab6539 Fix SDL letterboxing on Android builds
On Android calling `SDL_RenderSetLogicalSize` with dimensions having a different aspect ratio than the screen will cause letterboxing with blinking garbage data in that areas (instead of having black bars). This is annoying and makes the game really hard to play.

This change will make sure that on Android `SDL_RenderSetLogicalSize` will always be called with dimensions where the aspect ratio is the same as the screen to make sure there is no letterboxing.

The only problem with this is that during drawing the adventure map nothing will clear out the areas that would have been letterboxes, so there is an added explicit clear screen command for `totalRedraw()`.

The changes are only applied to Android builds in order not to affect PC builds - but some changes, especially clearing the screen could be easily added to the PC builds as well
2020-01-06 18:46:56 +00:00
75f8c8b29a Gui cleanup4 (#446)
* use smart pointers for almost all widget fields
* use SDL2 texture for cursor
* a lot af small tweaks and formatting
* removed CompImage class, it is actually useless as long as regular SDLImage support margins
* CGuiHandler: use smart pointers for [push|pop]Int
2018-07-25 01:36:48 +03:00