1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00
Commit Graph

748 Commits

Author SHA1 Message Date
Ivan Savenko
4919550a19 Show a message that battle intro can be skipped 2023-03-20 21:58:32 +02:00
Ivan Savenko
2864a04bda Minor refactoring 2023-03-20 20:19:05 +02:00
Ivan Savenko
31b718898a Fix playback of shooter animations at max speed 2023-03-20 20:19:05 +02:00
Ivan Savenko
688b8db3eb Removed delays due to thread waits from battle animations 2023-03-20 20:19:05 +02:00
Adriankhl
4718396f5f Prevent crashing when pressing auto-combat button on enemy turn 2023-03-17 15:40:14 +01:00
Konstantin
9205ef2c91 vcmi: skill-agnostic ballistics
Made ballistics by using spell action and more code is shared now.
2023-03-16 16:46:41 +03:00
Konstantin
84f53485e2 vcmi: skill-agnostic first aid
Now first aid is passive battle spell, and skill just bumps
specific spell power for this spell. Everything about healing
is handled into Heal spell effect.
2023-03-16 16:46:41 +03:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
Ivan Savenko
7030fa8fe7 Allow changing queue size instantly on option toggle 2023-03-05 19:55:38 +02:00
Ivan Savenko
f09897b2b4 Remove unnecessary redraws 2023-03-05 19:51:42 +02:00
Ivan Savenko
7ef5163d9d
Merge pull request #1581 from IvanSavenko/map_render_rewrite
Adventure Map - rendering rewrite
2023-03-05 19:51:07 +02:00
Ivan Savenko
b57a07b10f Restored ambient sounds functionality 2023-03-05 18:02:59 +02:00
Ivan Savenko
7df5c612f7 Fix battle rendering 2023-03-05 17:48:02 +02:00
Ivan Savenko
acdb8d6e06 renamed Unicode -> TextOperations, to use for all text processing 2023-03-05 17:39:23 +02:00
Dydzio
6bd4eac27a Rename settings files 2023-02-18 17:58:22 +01:00
Dydzio
7e409df3cb Apply manual changes from code review 2023-02-18 16:35:07 +01:00
Dydzio
9101f05835 Fixes for new battle settings 2023-02-15 22:38:41 +01:00
Dydzio
be9c71934c Merge remote-tracking branch 'origin/develop' into settings-rework 2023-02-14 21:00:17 +01:00
Ivan Savenko
91b17bed79 Partial encapsulation of AdvMapInt 2023-02-14 11:18:42 +02:00
Dydzio
7430616ada Move settings to separate subfolder 2023-02-12 17:29:23 +01:00
Dydzio
34227a0dab Integrate new settings with battle UI 2023-02-12 15:49:17 +01:00
Dydzio
fc7d2b9778 Merge remote-tracking branch 'origin/develop' into settings-rework 2023-02-12 11:55:21 +01:00
Ivan Savenko
4a0a82ceb4
Merge pull request #1553 from IvanSavenko/sdl_cleanup
SDL usage cleanup
2023-02-08 18:14:15 +02:00
Ivan Savenko
ab8b407294 Style cleanup 2023-02-08 13:56:09 +02:00
nordsoft
fd6987ea0a Fix alternative actions button redraw 2023-02-05 03:29:50 +04:00
Ivan Savenko
34dcb4127a Removed text utilities from SDL_Extensions 2023-02-03 18:55:25 +02:00
Ivan Savenko
7c58a46279 Removed some instances of access to screen surface 2023-02-03 18:23:53 +02:00
Ivan Savenko
ae9f040abf removed unused method 2023-02-03 11:42:27 +02:00
Ivan Savenko
3fef2a5e1f Moved Colors to a separate file, updated includes 2023-02-03 11:39:40 +02:00
Ivan Savenko
cfcaf5cbb6 renamed keyDown -> keyPressed 2023-02-03 11:39:40 +02:00
Ivan Savenko
d4fba3787c Removed usage of SDL_KeyboardEvent from UI code 2023-02-03 11:39:40 +02:00
Ivan Savenko
6669ffd4b3 Moved input-related code from SDL_Extensions to GuiHandler 2023-02-03 11:39:40 +02:00
Ivan Savenko
214fc19e74 CIntObject now receives mouse position as point instead of SDL event 2023-02-03 11:39:39 +02:00
Ivan Savenko
64faa13b6d
Merge pull request #1487 from IvanSavenko/battle_actions_refactoring
Battle actions refactoring
2023-02-03 11:28:14 +02:00
Dydzio
2ef33d54ab Merge branch 'develop' into battle-queue-improvement 2023-02-02 18:26:31 +01:00
Dydzio
5a08ec04fe Initial split of BattleOptionsWindow 2023-02-02 17:17:16 +01:00
Ivan Savenko
2ac997d8a9 Fix "holding" animation speed 2023-02-02 14:37:34 +02:00
Ivan Savenko
731f7b0578 Fix opening spellbook via clicking on hero 2023-02-02 14:37:16 +02:00
Ivan Savenko
1e09c39c0e Fix battle cursor after attack command 2023-02-02 14:36:58 +02:00
Ivan Savenko
3c8a0b9e70 Add missing text 2023-02-02 13:43:20 +02:00
Ivan Savenko
9678296875 Hero interaction is now battle action 2023-02-02 13:43:19 +02:00
Ivan Savenko
d3c85a19cb Merged CClickableHex class into BattleFieldController 2023-02-02 13:35:57 +02:00
Ivan Savenko
c3b79c786b Spellcasters UI now shares handling with hero spellcasting 2023-02-02 13:25:55 +02:00
Ivan Savenko
f150ced14c All spellcasters should work correctly now 2023-02-02 13:25:55 +02:00
Ivan Savenko
55a58596bc Mostly finished refactoring of BattleActionsController
TODO: test actions
TODO: test casters
TODO: fix random casters
2023-02-02 13:25:55 +02:00
Ivan Savenko
a2035122e1 Removed makingTurn variable 2023-02-02 13:25:55 +02:00
Ivan Savenko
4d62bf22f2 Removed no longer used code 2023-02-02 13:25:55 +02:00
Dydzio
d04c53e7e0 Merge branch 'develop' into settings-rework 2023-02-02 11:55:13 +01:00
Ivan Savenko
108a42e4ba Reorganized includes for new layout. New class - IImageLoader 2023-02-01 20:42:06 +02:00
Ivan Savenko
0ba74fea73
Merge pull request #1515 from IvanSavenko/time_based_animations
Time based animations
2023-02-01 12:25:54 +02:00
Ivan Savenko
bf343126c4 Fix Hero animation speed in battles 2023-01-31 00:42:50 +02:00
Dydzio
cc9d65a341 Make battle settings callable without battle, save last settings tab 2023-01-30 22:15:37 +01:00
Ivan Savenko
9c3030603d Removed most SDL includes from headers, removed SDL int's 2023-01-30 19:55:32 +02:00
Ivan Savenko
e14290fde0 Removed loading of images from file into SDL_Surface 2023-01-30 18:25:47 +02:00
Ivan Savenko
42df5626d9 Added Color class to replace SDL_Color 2023-01-30 00:12:43 +02:00
Andrey Filipenkov
07dc2e1c48
Merge pull request #1496 from kambala-decapitator/resurrect-message
show resurrect message in the battle log
2023-01-29 22:18:32 +03:00
Ivan Savenko
3749074a4d Renamed speed setting name to force-reset it to new scale 2023-01-28 16:49:35 +02:00
Ivan Savenko
9d1a075806 Fix battle speed selector in settings 2023-01-28 14:00:49 +02:00
Ivan Savenko
d34efaeb81 All battle effects now use time-based timings 2023-01-28 13:19:35 +02:00
Ivan Savenko
4d1c338503
Merge pull request #1498 from rilian-la-te/conan-v2
Conan as MXE replacement
2023-01-27 23:14:37 +02:00
Konstantin
cf56f7ccce vcmi: remove unused-but-set-variables 2023-01-26 23:49:00 +03:00
Andrey Filipenkov
a2ac189e03 fix typo 2023-01-25 18:13:11 +03:00
Dydzio
68be7643f1 Remove redundant method - code review suggestion 2023-01-25 13:06:13 +01:00
Dydzio
4a23f93754 Give thicker frame to highlighted queue boxes 2023-01-23 12:32:20 +01:00
Dydzio
aa18118df0 Add simple cyan color frame on highlight + mouse right-click for mobile 2023-01-23 11:34:21 +01:00
Dydzio
bd1bd5064a Highlight logic for queue icon on stack hover, lacks visual representation 2023-01-22 20:06:10 +01:00
Dydzio
92754e22f0 Highlight stack on queue icon hovered 2023-01-22 20:03:11 +01:00
Andrey Filipenkov
6f0cd37e8f limit displayed units number to 4 digits in battle
- unit box
- turn queue
2023-01-20 20:38:54 +03:00
Ivan Savenko
8ed115a628 Fix ios compile 2023-01-20 16:11:43 +02:00
Ivan Savenko
9be38780cd Removed remaining parts of Geomeotries.h/cpp 2023-01-20 16:11:43 +02:00
Ivan Savenko
46931a0ecf Bugfixing 2023-01-20 16:11:43 +02:00
Ivan Savenko
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
Ivan Savenko
05a1d7c6e3 All text for factions/towns/building are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
388ed88b5d All artifact strings now pass through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
d2b837b116 All creature-related texts go through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
fa6f7513e8 All heroes-related strings are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
5da407e822 All spell texts are now passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
fb3c3a4636 Provide distance information fo Jousting ability 2023-01-20 15:18:10 +02:00
Ivan Savenko
785a9aadcd
Do not consider corpses for movement range display (#1476) 2023-01-20 15:16:28 +02:00
Ivan Savenko
b8c5a32b9b Fix attack targeting selection for double-wide units 2023-01-20 15:15:44 +02:00
Ivan Savenko
17fc9d8d8f Merge with vcmi/develop 2023-01-18 01:04:34 +02:00
Ivan Savenko
05ac217b0f Merge with vcmi/develop 2023-01-17 23:02:25 +02:00
Ivan Savenko
0a858d9a7c
Upgrade msvc to include enet and qt translator (#1436)
- Updated MSVC prebuilt package
- Fixed build warnings
2023-01-15 23:55:24 +02:00
Ivan Savenko
0e8ee929df Renamed CCursorHandler -> CursorHandler 2023-01-15 21:18:34 +02:00
Ivan Savenko
1d7f004658 Implemented reinforced walls in towns with Castle 2023-01-13 01:09:24 +02:00
Ivan Savenko
500cf7f15d EWallPart & EWallState are now enum class 2023-01-13 00:35:58 +02:00
Ivan Savenko
4f3ea0d1d9 Renamed Terrain.h/cpp -> TerrainHandler.h/cpp 2023-01-10 00:01:35 +02:00
Ivan Savenko
f51b3bca57 use JsonKey or NameTranslated instead of ambiguos Name 2023-01-10 00:01:35 +02:00
Ivan Savenko
7c7ae26e67 Map/Road/River identifiers are now private members 2023-01-10 00:01:35 +02:00
Ivan Savenko
3e0bb3a7cc Fixed copy-paste error 2023-01-09 19:14:21 +02:00
Ivan Savenko
f155a35378 Fix positioning of UI elements in BattleWindow 2023-01-09 17:25:49 +02:00
Ivan Savenko
c63e79fb28 Fix multi-line texts in combat log 2023-01-09 17:25:18 +02:00
Ivan Savenko
205beb96ed Fix petrification effect 2023-01-08 16:25:47 +02:00
Ivan Savenko
9895dca615 Play sound if spell was resisted 2023-01-07 14:27:12 +02:00
Ivan Savenko
4ca22e652d All projectile animations now use time-based speed 2023-01-05 15:26:29 +02:00
Ivan Savenko
a25214ae71 Fixes graphical artifacts on toggling stack queue visibility
Battlefield rendering now uses local coordinates
2023-01-05 14:16:01 +02:00
Ivan Savenko
c6c6d9e58e Redraw battle log on sending chat message 2023-01-05 13:05:16 +02:00
Ivan Savenko
428fe0406b Fix visibility of embedded battle queue 2023-01-05 12:57:34 +02:00
Ivan Savenko
d8a70de068 Improved ordering of movement animation, fixes potential visual artifact 2023-01-04 23:04:48 +02:00
Ivan Savenko
e422fcd092 Play spell sound on Lich/Magog attack 2023-01-04 21:55:15 +02:00
Ivan Savenko
d2fe31e224 Fix obstacles (e.g. Quicksands) animation speed 2023-01-04 21:39:32 +02:00
Ivan Savenko
6b2490903d Fix casting of massive spells by creatures 2023-01-04 21:26:13 +02:00
Ivan Savenko
21196e822f Fixed blue tint for clones 2023-01-04 19:36:18 +02:00
Ivan Savenko
d157735846 Initialize new animations if current one is over 2023-01-04 18:15:26 +02:00
Ivan Savenko
397ea90040 Do not show selection highlight during stack teleporting 2023-01-04 17:45:08 +02:00
Ivan Savenko
d712a6b896 Do not play mouse-over animation on petrified creatures 2023-01-04 17:23:13 +02:00
Ivan Savenko
d8c4209ded Movement animation is now more smooth at high animation speeds 2023-01-04 17:21:40 +02:00
Ivan Savenko
7657115c5a Fix battleQueue positioning on toggling hotkey 2023-01-04 16:40:38 +02:00
Ivan Savenko
d3ecd43aba Merge remote-tracking branch 'vcmi/develop' into battle_improvements 2023-01-04 16:20:53 +02:00
nordsoft
e8845244f7 Fix tactic button 2023-01-03 13:02:54 +04:00
nordsoft
660d25a335 Make control panel configurable 2023-01-03 13:02:54 +04:00
nordsoft
87c47fff1d Business logic of alternative actions 2023-01-03 13:02:54 +04:00
Ivan Savenko
4bfdb44c78 Restore status bar on BattleWindow reactivation 2022-12-30 12:32:36 +02:00
Ivan Savenko
a9808a6541 Fix battle start when hero has tactics and no battle sounds mod is on 2022-12-30 11:55:22 +02:00
Ivan Savenko
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
Ivan Savenko
c8cd8aaf10 merge fix - do not attempt to display multiple dialogs at once 2022-12-29 22:11:47 +02:00
Ivan Savenko
7a5258853a Fix potential access violation due to iterator invalidation 2022-12-29 14:28:38 +02:00
Ivan Savenko
da7766e90b Fix battle start with disabled opening sounds 2022-12-28 16:51:44 +02:00
Ivan Savenko
ae3f6c5e79 Renamed PointEffectAnimation -> EffectAnimation 2022-12-25 21:39:55 +02:00
Ivan Savenko
5b41ced427 Removed sound playback from PointEffectAnimation 2022-12-25 21:35:13 +02:00
Ivan Savenko
7e3cd7db51 Fix for missing Death Blow sound 2022-12-25 20:11:22 +02:00
Ivan Savenko
5a7eed01da Made BattleInterface class less friendly 2022-12-25 17:44:40 +02:00
Ivan Savenko
4b3d93f378 Minor cleanup 2022-12-25 17:43:55 +02:00
Ivan Savenko
325c29da0d Merge remote-tracking branch 'vcmi/develop' into battle_improvements 2022-12-23 14:51:34 +02:00
Ivan Savenko
eb20a4b208 Merge remote-tracking branch 'vcmi/develop' into warnings_fix 2022-12-23 14:40:45 +02:00
Ivan Savenko
f073c676f9 Merge 1.1 release into develop 2022-12-23 14:17:18 +02:00
Ivan Savenko
9248e06ae0 Demon summon is now a spell. DEMON_SUMMONING bonus has been removed 2022-12-22 23:11:55 +02:00
Ivan Savenko
5b453bf530 Stack amount boxes visibility now follows H3 rules 2022-12-22 11:49:40 +02:00
Ivan Savenko
8b207fae63 ECreatureAnimType enum -> enum class 2022-12-22 01:04:58 +02:00
Ivan Savenko
bab5922951 Spells can now define color muxer effect (e.g. Bloodlust & Petrify) 2022-12-22 00:25:35 +02:00
Ivan Savenko
41b87088d5 Color muxer effects can now be (partially) configured by user.
TODO: move color muxer effects from spells into spell config
2022-12-21 23:29:56 +02:00
Ivan Savenko
8a9a7b9650 Fix UI on battle start if hero has tactics 2022-12-21 20:01:50 +02:00
Ivan Savenko
b423b3fa6b Fix dragon breath & fire shield 2022-12-21 18:04:54 +02:00
Ivan Savenko
d0f259bbf7 Fix battle shutdown 2022-12-21 18:04:19 +02:00
Ivan Savenko
541d98143b Renamed BattleControlPanel -> BattleWindow 2022-12-21 17:06:47 +02:00
Ivan Savenko
c835a84051 Moved all GUI handling from BattleInterface to BattleControlPanel 2022-12-21 17:02:53 +02:00
Ivan Savenko
822df113f3 Fix formatting 2022-12-21 13:18:16 +02:00
Ivan Savenko
6138ff1670 Minor refactoring of BattleHero class 2022-12-21 01:08:56 +02:00
Ivan Savenko
b373c4a2b6 Fix Status Bar & In-game console activation 2022-12-19 22:53:31 +02:00
Ivan Savenko
a75b437fef Disable text input on window deactivation 2022-12-19 22:06:01 +02:00
Ivan Savenko
a57eec23e6 Refactoring of setBattleCursor & fromWhichHexAttack methods 2022-12-19 01:12:26 +02:00
Ivan Savenko
e2cc73d67b Fix fire shield sounds 2022-12-18 22:43:13 +02:00
Ivan Savenko
16c4851d3b Animated cursor for spell selection, removed hardcoded cursor ID's 2022-12-18 22:32:07 +02:00
Ivan Savenko
53f6b7bd32 Fix Ice Ring target selection 2022-12-18 20:23:19 +02:00
Ivan Savenko
e9e549148d Implemented teleportation animation effect 2022-12-18 18:26:43 +02:00
Ivan Savenko
45aa841fb6 Stack reversing logic now matches H3 2022-12-18 11:42:02 +02:00
Ivan Savenko
52fc5b3c39 Exploded mines now send ACTIVATE flag to client to play effect 2022-12-17 19:37:00 +02:00
Ivan Savenko
deffba01b9 All battle effects are now fully client sided 2022-12-17 17:35:15 +02:00
Ivan Savenko
70eac47f08 Fixes #1051, #1042 - highlight creatures that will be affected by spell 2022-12-17 00:10:12 +02:00
Ivan Savenko
4d5311789e Fixes #831 - do not process any incoming Packs until opening is over 2022-12-16 23:22:04 +02:00
Ivan Savenko
9e5f72166b Fix animation ordering for moving with rotation 2022-12-16 22:38:14 +02:00
Ivan Savenko
bbabc991ee Clean up logging 2022-12-16 22:37:44 +02:00
Ivan Savenko
6c04581655 Fix stack rendering order during movement 2022-12-16 22:07:46 +02:00
Ivan Savenko
733f21f8dc Petrify will freeze stack animations 2022-12-16 18:34:35 +02:00
Ivan Savenko
4d628a8ba1 Fixed several assertion failures on shutting down game 2022-12-16 16:19:57 +02:00
Ivan Savenko
864990db13 Implemented Bloodlust & Petrification effect
- ColorFilter is now in separate file
- Moved lerp function into global.h
- Bloodlust visuals mostly matches H3
- Petrify visual matches H3
- TODO: Adjust timing of all ColorFilter efects to match H3
- TODO: Petrify should pause stack animations
- TODO: ColorFilter-powered effects should be configurable in Spell system
2022-12-15 23:24:03 +02:00
Ivan Savenko
7e35a96055 Changed ColorPutter in preparation for Bloodlust & Petrify effects 2022-12-14 15:17:38 +02:00
Ivan Savenko
3693184e51 Fix cast animation for Genie and heroes 2022-12-14 14:48:02 +02:00
Ivan Savenko
7857668158 Implemented group attack animations for dragons/Hydras/etc 2022-12-14 14:21:58 +02:00
Ivan Savenko
814f6ed684 Made Clone color filter identical to H3 2022-12-14 13:00:40 +02:00
Ivan Savenko
fb3a08e0a6 Added fading animation for fade-in effect for summons 2022-12-14 12:04:37 +02:00
Ivan Savenko
b2f5a87a0f Spell animation will now wait for hero animation before playing 2022-12-13 21:31:49 +02:00
Ivan Savenko
e7206cb759 Cleaned up BattleHero class 2022-12-13 21:31:49 +02:00
Ivan Savenko
c172e3c8e0 Cleaned up BattleAnimationClasses file 2022-12-13 21:31:49 +02:00
Ivan Savenko
776d00d901 Cleaned up UI blocking conditions 2022-12-13 21:31:49 +02:00
Ivan Savenko
e791323502 Implemented placement sound for obstacles 2022-12-13 21:31:49 +02:00
Ivan Savenko
2148b76911 Fix lambda captures lifetime 2022-12-13 21:31:49 +02:00
Ivan Savenko
60a00b450e Multiple fixes & improvements to animation ordering 2022-12-13 21:31:49 +02:00
Ivan Savenko
0020d76d1d Introduced animation phases for beter ordering of visuals in battles 2022-12-13 21:31:49 +02:00
Ivan Savenko
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
Ivan Savenko
e750bd2713 Reverse death animation for resurrection spells 2022-12-13 21:31:49 +02:00
Ivan Savenko
1dea1854ae Moved battle animation enum's into new file 2022-12-13 21:31:49 +02:00
Ivan Savenko
55d0f0ad9f Fixed infinite loop 2022-12-13 15:17:42 +02:00
Ivan Savenko
99e5569ab5 Changes according to review 2022-12-13 15:10:31 +02:00
Ivan Savenko
264f5c91e8 Applied suggestions from review 2022-12-13 13:58:16 +02:00
Ivan Savenko
602e52127b Cleaned up forward declarations 2022-12-12 18:26:04 +02:00
Ivan Savenko
d40d5250b7 changes to status bar according to review comments:
- renamed IStatusBar API to more clear names
- removed "locking" of status bar
- added comments for IStatusBar API
- removed dynamic_casts to CGStatusBar, now IStatusBar API is fully
sufficient
2022-12-12 18:23:41 +02:00
Ivan Savenko
1558c28c0a Fix obstacle rendering 2022-12-12 00:05:00 +02:00
Ivan Savenko
ac839ad26a Changes to rest of the code according to review:
- renamed status bar method clearMatching -> clearIfMatching
- renamed class ColorShifterAddMul -> ColorShifterMultiplyAndAdd
- fixed missing return from function
- fixed potential access to deleted object
2022-12-11 23:43:43 +02:00
Ivan Savenko
49a6d056d9 Changes for BattleInterface classes according to code review:
- added documentation comments for classes, members and methods
- added const specifier to methods where applicable
- renamed some methods with more clear name
- removed some commented-out or unused code
2022-12-11 23:16:23 +02:00
Ivan Savenko
7f5e5259c8 Changes to Canvas class according to review:
- renamed CCanvas -> Canvas.cpp
- replaced shared_ptr<Canvas> with Canvas&
- removed getSurface method
2022-12-11 22:09:57 +02:00
Ivan Savenko
c855823528 Renamed files in client/battle to match new names of classes 2022-12-09 13:38:46 +02:00
Ivan Savenko
3f9a0a855e Renamed most of classes in client/battle directory to match current code
style
2022-12-09 13:26:17 +02:00
Ivan Savenko
facf77b3ae vstd::unique -> std::unique 2022-12-07 23:36:20 +02:00
Ivan Savenko
2855606a88 Enabled & fixed -Woverloaded-virtual warning from gcc/cland
- fixed almost all instances of overloaded-virtual warning
- cleared up inheritance & method overrides in code affected by warning
2022-12-07 21:50:45 +02:00
Ivan Savenko
7007b86737 Do not show destroyed towers in battle results window 2022-12-07 15:57:17 +02:00
Ivan Savenko
a06d7ec80e Fix Armaggeddon visual effect 2022-12-06 14:29:31 +02:00
Ivan Savenko
3c037ed620 Fix spellcaster animations 2022-12-06 14:12:13 +02:00
Ivan Savenko
f247a98373 Fix non-siege battles 2022-12-06 14:11:37 +02:00
Ivan Savenko
2c05f588fd Moved CBattleRenderer into a separate file 2022-12-06 13:41:29 +02:00
Ivan Savenko
1b4c5be4de Implemented proper rendering order generation for battlefield objects 2022-12-02 17:49:38 +02:00
Ivan Savenko
90a25cb28d Fix tower shooter rendering 2022-12-02 02:13:02 +02:00
Ivan Savenko
58ba5f1aee Fixes to effects of earthquake, obstacle-creating and offensive spells 2022-12-02 01:55:09 +02:00
Ivan Savenko
215932b520 Fix compile after merge 2022-12-02 00:06:57 +02:00
Ivan Savenko
495e0b3657 Merge remote-tracking branch 'vcmi/develop' into battleint_refactor 2022-12-01 23:58:01 +02:00
Ivan Savenko
2442d38b9a Fix ranged attack animations 2022-12-01 23:40:03 +02:00
Ivan Savenko
bbd4d361e4 Send hover event to buttons in battle UI 2022-12-01 23:39:43 +02:00
Ivan Savenko
c721d7c4f3 Fix overwriting of hover text of buttons in combat 2022-12-01 23:36:41 +02:00
Ivan Savenko
5094fab4d9 Refactoring of spell animations, multiple fixes for spell visuals 2022-12-01 22:06:42 +02:00
Andrii Danylchenko
82179a9cdb
Merge pull request #1176 from IvanSavenko/tower_shooter_icons
Tower shooter icons fix
2022-12-01 12:30:24 +02:00
Ivan Savenko
92ca0d9877 cleared up rendering of tower shooters 2022-11-30 22:05:25 +02:00
Ivan Savenko
c233e57079
Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2022-11-29 18:24:03 +02:00
Ivan Savenko
6d4bcba842 Fix moat rendering position 2022-11-29 17:18:43 +02:00
Ivan Savenko
de5616bb3b Fix combat log position 2022-11-29 17:18:30 +02:00
Ivan Savenko
178cd0226f Show town-specific tower icon in battle queue, if such icon exists 2022-11-29 14:59:50 +02:00
Ivan Savenko
88d8655f01 Fix forward declarations for ios single-app build 2022-11-29 02:00:08 +02:00
SoundSSGood
909dcb82fa use ArtifactID 2022-11-29 00:32:18 +02:00
Ivan Savenko
86616a5a3b Fix visibility of stack amount box on start of combat 2022-11-28 22:47:28 +02:00
Ivan Savenko
9e11b8f38a Fixes for creature rendering order 2022-11-28 22:35:38 +02:00
Ivan Savenko
95e6035a23 Attempt to fix MSVC compilation 2022-11-28 21:44:16 +02:00
Ivan Savenko
6f6d350228 Formatting cleanup 2022-11-28 16:43:38 +02:00
Ivan Savenko
7c4e04c1ec Refactoring/cleanup of classes in CBattleAnimations.cpp 2022-11-28 16:02:46 +02:00
Ivan Savenko
8a059301d2 Fix blitting order of battlefield objects 2022-11-27 23:42:18 +02:00
Ivan Savenko
055824654e (partially) fix catapult explosion effect 2022-11-27 23:26:28 +02:00
Ivan Savenko
9f21569a79 Next batch of siege fixes 2022-11-27 22:50:18 +02:00
Ivan Savenko
35576834c9 Fixing sieges, part 1 2022-11-27 20:21:51 +02:00
Ivan Savenko
b5d1cb4996 Fixes for projectile playback. TODO: check catapult projectile 2022-11-27 17:24:45 +02:00
Ivan Savenko
15b588b164 Fix stack reactivation leading to broken spellcasting 2022-11-27 15:10:27 +02:00
Ivan Savenko
e76cd1b6a7 Bugfixing: fix crashes on battle start & most noticeable glitches 2022-11-27 02:26:02 +02:00
Ivan Savenko
0cae259f53 Most of rendering in BattleInt is done via canvas
- refactoring of CBattleStacksController.cpp
- moved EAlignment enum to Geometries.h from CIntObject
- renamed EAlignment to ETextAlignment, to avoid conflict with good/evil
alignemt
- ETextAlignment is now enum class
2022-11-26 23:12:20 +02:00
Ivan Savenko
4f91b062db Refactoring of projectile controller
- projectiles now separated based on type
- each type has its own rendering method
- refactoring of CShootingAnimation
2022-11-25 16:32:23 +02:00
Ivan Savenko
abb553d975 Next step of code refactoring:
- refactoring of CBattleFieldController code (except for 2 arcane
methods)
- introduced class CCanvas for encapsulated rendering surface
- battleint rendering is now partially done with CCanvas
- removed unused includes of CBitmapHandler
2022-11-25 11:46:47 +02:00
Ivan Savenko
6b3beb05e5 BattleInt split is finished, start of refactoring:
- Refactoring of siege controller code
- Replaced some usages of C struct SDL_Surface with proper c++ class
IImage
- Refactoring of rendering of battlefield objects (WIP)
2022-11-25 00:26:14 +02:00
Ivan Savenko
cb6fe1eedf Moved battle effects into a new class 2022-11-24 16:30:04 +02:00
Ivan Savenko
02fe0425c7 Moved battle actions handling into a separate class 2022-11-20 22:56:42 +02:00
Ivan Savenko
b01737daf2 Moved stacks & animations handling into a separate class 2022-11-20 19:11:34 +02:00
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
3c5858f01e Separated battlefield background&hexes handling into a new class 2022-11-17 23:57:51 +02:00
Ivan Savenko
9c2a6dc9fc moved battle obstacle handling into separate class 2022-11-17 19:36:25 +02:00
Ivan Savenko
a65dd0726d Separated siege-related part of BattleInterface into separate class
- added constants for BattleHex'es of castle towers
2022-11-17 18:50:12 +02:00
Ivan Savenko
bd1b2e4977 Battle Interface refactoring: separated projectile handling into a
separate class (untested)
2022-11-17 13:21:03 +02:00
Nordsoft91
1893212abb
Merge pull request #1146 from IvanSavenko/ray_projectile
Implemented ray-like projectiles for shooters
2022-11-16 22:45:00 +04:00
Ivan Savenko
b3067c0e3f Attemts to improve timing of ranged attacks:
- when computing number of steps/frames to display projectile round to
nearest instead of rounding down
- end projectile animation only *after* last step was shown
2022-11-16 17:53:40 +02:00
Ivan Savenko
d1c95204c5 Code formatting 2022-11-16 12:29: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
Ivan Savenko
38b8fc0af8 Formatting: space -> tabs 2022-11-13 14:24:15 +02:00
Ivan Savenko
4af9bc2461 Music: remember playback position of music tracks
Town & terrain themes will now resume from previously stopped position
instead of playing from start, as it was in original game.
Fixes #965
2022-11-13 14:05:51 +02:00
nordsoft
6995911d6e Preventing multiple AI from being created 2022-11-03 22:01:20 +04:00
Andrey Filipenkov
c4c2e03b6e fix typo 2022-09-30 15:06:56 +03:00
DjWarmonger
58a3abb643
Merge pull request #963 from vcmi/terrain-rewrite
Terrain rewrite
2022-09-29 18:24:05 +02:00
Andrii Danylchenko
878aabd4d6
Merge pull request #981 from kambala-decapitator/fix-analyzer-warnings
Fix Clang Analyzer warnings
2022-09-29 19:23:24 +03:00
Tomasz Zieliński
f386f42166 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
#	lib/battle/CBattleInfoEssentials.cpp
#	lib/rmg/ObstaclePlacer.cpp
#	lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Tomasz Zieliński
cd3a1a02c2 More style tweaks 2022-09-25 21:47:44 +02:00
Andrey Filipenkov
72feb538ce add explicit null pointer checks 2022-09-25 10:05:16 +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
Tomasz Zieliński
a5077245a8 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
2022-09-23 20:01:13 +02:00
Andrey Filipenkov
c9c79887a7 remove unused variables 2022-09-22 11:54:10 +03:00
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
Nordsoft91
ad01c7ffce
Vlc obstacles [part 1] (#888)
* obstacles content handler, entity service and VLC integration
2022-09-15 11:06:54 +03:00
Andrey Filipenkov
e6e7679a2c activate battle hexes after heroes
gives hexes higher priority when performing "hit test" for mouse click as CGuiHandler::handleElementActivate() uses push_front to a list
this fixes RMB click on the topmost corner stacks: now it shows stack info instead of hero
2022-09-11 13:40:38 +03:00