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

197 Commits

Author SHA1 Message Date
Ivan Savenko
7a6ad671ab Separated battle control panel into new class, refactoring of
CGStatusBar to allow shared API with battle console
2022-11-18 17:54:10 +02:00
Ivan Savenko
48be492517 Fix parameter order in case of right-to-left lines, formatting 2022-11-16 12:28:07 +02:00
Ivan Savenko
6678a747bb Implemented ray-like projectiles for shooters
- Added missing support for ray-like projectiles
- Archmages, Evil Eyes and Beholders now use ray for shooting
- New method to draw 1 pixel-wide line with color gradient at arbitrary
angle
- fixed incorrect attackClimaxFrame field for Archmages
2022-11-15 21:42:16 +02:00
Andrey Filipenkov
3ab21d8491 show loading indicator when starting local server
single player or hosting a multiplayer game
2022-09-24 15:55:25 +03:00
Andrey Filipenkov
e1c9903a45 extract iOS helpers into a shared lib 2022-09-24 15:55:24 +03:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Andrey Filipenkov
217c83a7e7 convert text input rect to screen coordinates
workarounds SDL bug related to moving window ensuring that the input is always above the native keyboard
kambala-decapitator/vcmi#31
2022-09-24 15:55:19 +03:00
Andrii Danylchenko
2b0f02c832
Merge pull request #944 from AgostonSzepessy/dev/agos/937
Add right click to Quick Recruit Window
2022-09-23 14:01:52 +03:00
Andrii Danylchenko
43a1a8b76d
Merge pull request #928 from kambala-decapitator/quick-recruit-no-creatures
show message instead of the Quick Recruit dialog when there're no creatures in town
2022-09-22 18:21:45 +03:00
Andrey Filipenkov
a1cf120ea6 add missing virtual destructors 2022-09-22 11:54:09 +03:00
Agoston Szepessy
411038195c Add clickeable area on top of creature picture
A class that wraps an instance of `CIntObject` creates an area
that users can right click to view information about the creature
they're buying.

The constants were based off the existing ones in the code and were
refined by guessing and checking where clicking falls inside/outside
the border of the rectangle.
2022-09-18 22:53:11 -07:00
Andrey Filipenkov
a320af837d fix includes in client subdirectories 2022-09-18 17:43:40 +03:00
Andrey Filipenkov
d7650ce9c0
use Conan to make macOS CI builds for both Intel and ARM (#782)
* [CI] append platform to output artifact name if it's given
2022-08-30 17:29:00 +03:00
Andrey Filipenkov
7150ee565a [macOS] text input handling must be done on main thread
Xcode's Main Thread Checker warns about that
2022-08-03 12:09:49 +03:00
Andrii Danylchenko
2521e7bac9 Fix flickering in fullscreen 2022-06-13 16:11:53 +03:00
Andrii Danylchenko
1128abc593 Fix hero movement animation 2022-06-07 15:00:39 +03:00
nordsoft
d92356f085 Fixed game crash: divide by zero due to threads racing 2022-05-28 14:34:36 +03:00
Konstantin
c6b198ce14
Warning fix (I moved C++17 and CI to another branch) (#739)
* clang warning fixes
* use CMake 3.10 due to MXE CI does not have 3.13 yet

Co-authored-by: Konstantin <rilian@niisi.ras.ru>
2022-05-19 15:14:50 +03:00
Andrii Danylchenko
6c36a1a2f6 Tray notifications for MXE 2022-05-14 13:23:09 +03:00
Andrii Danylchenko
2fc7cf02b0 tray notification for windows 2022-05-14 13:23:09 +03:00
Andrii Danylchenko
83f690e059 change SDL color key alpha to transparent 2021-08-21 09:32:52 +03:00
AlexVinS
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
John Bolton
c61bae4060 Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation. 2020-10-05 16:28:28 -07:00
John Bolton
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
Victor Luchits
604246bc7a VS 2019/Windows 10 Kit fix 2020-05-05 15:25:07 +03:00
Arseniy Lartsev
fca9bcdd7f
Fixed possible freezes while dragging visible area on minimap (#638) 2020-05-03 01:26:30 +03:00
toneyisnow
1319175bdc Removed the create functions in the ColorShifter classes. 2020-01-27 00:34:59 -08:00
toneyisnow
8db638c054 Fix tiny space issue and remove reference of SDL.h 2020-01-26 00:05:38 -08:00
toneyisnow
468584d469 Update the originalPalette, and use SDL_Palette methods to improve memory management. 2020-01-26 00:01:48 -08:00
toneyisnow
0f4a9e5106 Updated resolved some issues. 2020-01-25 18:49:53 -08:00
toneyisnow
0f3dabab9a Initialize the change:
1. Make color shifter for CAnimation, and use that in the clone effect.
2. Update the original position of the cloned object.
2020-01-25 01:21:26 -08:00
Zsolt Sz. Sztupák
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
KasyanDiGris
fa5a14e2d8 Stabilize vcmi (#488)
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
Alexander Shishkin
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
Alexander Shishkin
5c09f751b3 Gui cleanup3 - UI refactoring to use smart pointers (#440)
* Changed most gui classes to use shared pointers
* Store and use IImage as shared_ptr
* CSpellWindow redesign
* AdventureMapClasses cleanup
* CLabel: store background as smart pointer
* Store CObjectList items as smart pointers
* Removed destroy function of list item
* Store toggle buttons as smart pointers
* Use CComponent as smart pointer
* Attempt to fix artifact merchant drawing
2018-04-07 18:34:11 +07:00
Arseniy Shestakov
ac66fc7f42 Full rework of pre-game interface and networking
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.

TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
AlexVinS
43acfa160b [tweaks] IImage * -> auto 2018-03-30 14:02:04 +03:00
AlexVinS
cac83379f5 Fixed https://bugs.vcmi.eu/view.php?id=2928 2018-03-22 12:56:15 +07:00
Arseniy Shestakov
69dbf339fc CGuiHandler: fix invalid read on event handling 2018-01-18 06:34:57 +03:00
Arseniy Shestakov
f15cadc87b Implement configurable object sounds: ambient, visit and removal
* If there more than one sound for visit or removal random is played
* At moment only the first ambient sound will be used
2018-01-02 09:49:03 +01:00
Michał Kalinowski
26a222ac62 Change JsonType to enum class (#393)
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
AlexVinS
39194a0629 Merge branch 'SplittingShortcuts' into develop 2017-11-15 22:31:55 +03:00
FeniksFire
f2b7c85811 Adding object construction macro with parameter
- Adding macro "OBJECT_CONSTRUCTION_CAPTURING" that take as parameter
action flag.
- Fixed minor errors
2017-11-14 08:52:33 +01:00
AlexVinS
654fea56a4 Fixed memory leak in CAnimation (regression of #376) 2017-11-04 06:03:43 +03:00
AlexVinS
97d73f47b0 Fixed https://bugs.vcmi.eu/view.php?id=2817 2017-11-03 18:39:43 +03:00
AlexVinS
270e1b75ce Support for creature 2-hex attack, alternate death and cast animation types
* margin option .json animation
* Use ranged attack animation for spell cast if there is no cast animation, display cast animation only on active casting.
2017-09-12 19:51:54 +03:00
Arseniy Shestakov
494872937a CGuiHandler: use std:atomic to sync breaks in event handling 2017-09-11 12:18:16 +03:00
Arseniy Shestakov
986fc08b1e CGuiHandler: use SDL_PushEvent in fakeMouseMove to avoid crashes
Somehow this worked on other platforms, but on macOS it's cause constant crashes.
2017-09-11 12:18:16 +03:00
AlexVinS
3bbff27127 Wiped CDefEssential 2017-09-06 15:13:28 +03:00
AlexVinS
6cd0dd9843 Use CAnimation for creature projectiles 2017-09-05 20:04:17 +03:00