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

568 Commits

Author SHA1 Message Date
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
64885bdf6b Better names for terrain parameters. Support for new movement sounds. 2023-01-10 00:01:35 +02:00
Ivan Savenko
1fece0ce18
Merge pull request #1229 from IvanSavenko/battle_improvements
Battle: Fixing bugs & Implementation of missing features
2023-01-09 22:07:13 +02:00
Ivan Savenko
9308319ac7 Added workaround for ~200 ms lag occuring after hero move 2023-01-09 13:05:28 +02:00
SoundSSGood
4005b48360 Regressions fixed 2023-01-08 23:31:12 +02:00
Ivan Savenko
d83eedb8dd Fixes #1378 - do not auto-set key color - image might not have one 2023-01-06 13:15:52 +02:00
Ivan Savenko
c479504646 Formatting cleanup 2023-01-01 22:50:38 +02:00
Ivan Savenko
7c0d5666a0 Return string by copy to fix cases when string is constructed on stack 2023-01-01 20:55:43 +02:00
Ivan Savenko
cb4f5edae9 All Heroes 3 texts are now passed through translator 2023-01-01 14:56:45 +02:00
Ivan Savenko
bdb8e0ee5c Introduced string identifiers for H3 texts, still WIP 2023-01-01 14:56:44 +02:00
Ivan Savenko
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
Ivan Savenko
405b2976d5 Renamed getUpgradeInfo -> fillUpgradeInfo 2022-12-25 14:03:43 +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
c835a84051 Moved all GUI handling from BattleInterface to BattleControlPanel 2022-12-21 17:02:53 +02:00
Ivan Savenko
b373c4a2b6 Fix Status Bar & In-game console activation 2022-12-19 22:53:31 +02:00
Ivan Savenko
d29c9d6445 Fortify CLabel interface to prevent unchecked access 2022-12-19 22:04:50 +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
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
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
c855823528 Renamed files in client/battle to match new names of classes 2022-12-09 13:38:46 +02:00
Ivan Savenko
db2a40600d Fixed some of the warnings detected by CI run 2022-12-08 23:20:42 +02:00
Ivan Savenko
facf77b3ae vstd::unique -> std::unique 2022-12-07 23:36:20 +02:00
Ivan Savenko
908e6892f3 Removed CGHeroInstance::getPosition pseudo-override
Now access to hero visible position is always done via visitablePos
2022-12-07 22:10:08 +02:00
Ivan Savenko
65802d958b Integrated valid fixes from PR #1143 2022-12-07 18:13:54 +02:00
Ivan Savenko
fb6b3c31e8 Renamed UNUSED -> MAYBE_UNUSED macro to match c++17 attribute name 2022-12-07 18:06:47 +02:00
Andrii Danylchenko
a72d1270cd #1186 - disable status bar with other advmap controls 2022-12-03 21:32:47 +02:00
Ivan Savenko
397371b969 HoMM3 bug workaround: fixes missing slot on artifact merchant background
image
2022-12-02 18:52:05 +02:00
Ivan Savenko
495e0b3657 Merge remote-tracking branch 'vcmi/develop' into battleint_refactor 2022-12-01 23:58:01 +02:00
SoundSSGood
3bf0cfe4fa
Merge branch 'vcmi:develop' into refactoring-art 2022-11-29 22:34:08 +02:00
Ivan Savenko
a512e0d58f Fixed ugly solid-white status bars in pregame, removed operator* from
CPicture
2022-11-29 17:07:21 +02:00
Andrii Danylchenko
d6ca8017bf Clickable status bar to send messages with on mobile 2022-11-29 08:05:54 +02:00
SoundSSGood
909dcb82fa use ArtifactID 2022-11-29 00:32:18 +02:00
Ivan Savenko
7c4e04c1ec Refactoring/cleanup of classes in CBattleAnimations.cpp 2022-11-28 16:02:46 +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
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
cb6fe1eedf Moved battle effects into a new class 2022-11-24 16:30:04 +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
Andrii Danylchenko
6974d4ea53
Merge pull request #1130 from IvanSavenko/banned_skills_fix
Fixes #1096 - do not propose banned skills on levelup
2022-11-15 09:32:12 +02:00
Andrii Danylchenko
8b964be71f
Merge pull request #1111 from GermanAizek/develop
Code refactor and fix condition bug
2022-11-15 09:23:16 +02:00
lainon
7fdad4e0f6 Code refactor following C++ standard and condition fixes 2022-11-15 03:20:55 +03:00
Ivan Savenko
729357824b Added common method for secondary skill availability checks 2022-11-14 19:08:49 +02:00
Andrii Danylchenko
86972d7164
Merge pull request #1112 from SoundSSGood/bulk-move-swap-artifacts-rev2
Bulk move and swap artifacts rev2
2022-11-14 08:31:48 +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
SoundSSGood
3142f32cbb Fix for callback return. More code optimization 2022-11-11 01:28:04 +02:00
SoundSSGood
9647758812 Apply suggested changes next part 2022-11-10 23:24:41 +02:00
SoundSSGood
ad47a7573c Code style. Typo. Code clean up. 2022-11-10 18:29:39 +02:00
SoundSSGood
ff63167553
warnings fixed 2022-11-07 18:31:22 +02:00
SoundSSGood
f72a3e3884 function ArtifactUtils::checkSpellbookIsNeeded for the artifacts like a Titan's thunder 2022-11-07 00:18:05 +02:00
SoundSSGood
d0895e30ef callback functions and cleaning up unused code 2022-11-06 23:41:29 +02:00
Andrii Danylchenko
288f36c0c3
Merge pull request #1052 from Nordsoft91/mp-disconnection
MP handle disconnection
2022-10-19 09:56:18 +03:00
nordsoft
895ec2d302 Make console available during other players' turn 2022-10-05 19:04:51 +04:00
Andrii Danylchenko
b83a40db87 #1054 - fix crash and UI 2022-10-04 21:54:14 +03:00
Andrii Danylchenko
34ef0efa74
Merge pull request #1029 from kambala-decapitator/options-highlight-current-resolution
highlight current resolution in the resolution selector in game options
2022-10-01 18:32:17 +03:00
Andrey Filipenkov
ebeff94130 inherit CHeroWindow from CStatusbarWindow for proper status bar support 2022-10-01 11:21:16 +03:00
Andrey Filipenkov
c9ae43abe8 highlight current resolution in the resolution selector in game options 2022-10-01 10:33:48 +03:00
Andrii Danylchenko
a2dbb6c8ac
Merge pull request #978 from kambala-decapitator/hide-unsupported-resolutions
Hide unsupported resolutions
2022-09-30 17:34:07 +03:00
Andrii Danylchenko
4835387004
Merge pull request #1015 from kambala-decapitator/prohibit-dig-while-waiting
prohibit digging while waiting for your turn to start
2022-09-30 08:39:48 +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
Andrey Filipenkov
836d7dc2d6 prohibit digging while waiting for your turn to start 2022-09-29 15:52:28 +03:00
Andrey Filipenkov
76b36b8951 iOS can use any resolution 2022-09-27 11:56:12 +03:00
Andrey Filipenkov
6e6bf1e77b don't list resolutions larger than the current screen's in the game options 2022-09-27 11:56:12 +03:00
Andrey Filipenkov
f0b909f772 code improvement 2022-09-27 11:56:12 +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
Andrii Danylchenko
127a7e6653
Merge pull request #959 from kambala-decapitator/fix-cursor-attack
fix cursor image on hover when there're multiple creatures nearby
2022-09-25 17:44:10 +03:00
Andrey Filipenkov
96c2db4d56 remove useless variable 2022-09-25 13:13:37 +03: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
Andrey Filipenkov
27b7cb8f1f show long press hints higher
kambala-decapitator/vcmi#29
2022-09-24 15:55:19 +03:00
Andrey Filipenkov
d2b1cc00e8 enable same adventure map tweaks as on android 2022-09-24 15:55:17 +03:00
Andrey Filipenkov
2e18299897 make server a static lib, run it in a separate thread
issues to solve:
- dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. 13CPackForLobby, 20LobbyClientConnected, 20LobbyClientConnected.
- error setting socket option: set_option: No buffer space available
2022-09-24 15:55:16 +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
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
2ce78ba8c9 fix operator precedence 2022-09-22 11:54:09 +03:00
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02: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
Agoston Szepessy
dfdaf57803 Set position for CreaturePurchaseCard
This will make it pick up on right clicks. It was 0 before, so it wasn't
doing it.
2022-09-18 16:00:54 -07:00
Andrey Filipenkov
beeef8527f Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
2022-09-18 17:43:40 +03:00
Andrey Filipenkov
81dec1405f fix typo: purhase -> purchase 2022-09-18 17:43:40 +03:00
Andrey Filipenkov
a320af837d fix includes in client subdirectories 2022-09-18 17:43:40 +03:00
Andrey Filipenkov
0163190ac5 move hardcoded strings to JSON file 2022-09-18 17:43:37 +03:00
DjWarmonger
7ba271edf1
Rotation rebase2 (#912)
* Instead of [x][y][z] coordinates, map will be stored as [z][x][y].
* Nullkiller AI can get it too.
* Use boost::multi_array instead of nested vectors
* In MapHandler too
* Rotate foreach algorithms, too
* VCAI gets rotated, too
2022-09-18 17:39:10 +03:00
Andrey Filipenkov
90d355dd05 check availability only of town creatures
QRD shows only town creatures ignoring Summoning Portal
2022-09-18 15:58:15 +03:00
Andrey Filipenkov
a0832c39f9 show message instead of the Quick Recruit dialog when there're no creatures in town 2022-09-18 15:50:06 +03:00
Andrey Filipenkov
d44780d2ac add standard hotkeys to the Quick Recruitment dialog 2022-09-11 11:31:28 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Andrii Danylchenko
23bbb69eb9 #793 U shortcut for creature stack stats window 2022-09-04 10:18:25 +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
1e97859fbf Fix crash when clicking scenario info during campaign gameplay. 2022-05-10 09:48:05 +03:00
Andrii Danylchenko
84948820b2 exchange window move single stacks buttons 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
0fd13d2f3b Change HD mod assets 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
78efd09e2e Refactor HD mod army exchange 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
3c0935a5b9 Artifact exchange 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
8fa0b30985 Army exchange implementation 2022-01-03 15:13:46 +02:00
Andrii Danylchenko
2ce73fd4e1 Army exchange implementation 2022-01-03 15:13:46 +02:00
Arseniy Lartsev
222a0e40c7 Added code to display some HD mod buttons in hero exchange window 2022-01-03 15:13:46 +02:00
Arseniy Lartsev
24d2d5b702 New layout for hero exchange dialog with HD mod features 2022-01-03 15:13:46 +02:00
AlexVinS
483a4689ce Fixes for code review issues 2021-02-20 04:57:50 +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
Dmitry Orlov
d6a4767865 Mod system improvement: Patch 2 2020-10-25 01:04:34 +03:00
Dmitry Orlov
934c4e511d Special buildings support : Patch 1 2020-10-15 15:03:01 +03:00
Dmitry Orlov
f4816b0824 Mod system improvement Part I : Special buildings should work in the modders towns 2020-10-07 12:35:11 +03:00
John Bolton
c61bae4060 Fixed RETURN_IF_BATTLE(). Undid disabled warnings. Fixed indentation. 2020-10-05 16:28:28 -07:00
John Bolton
1722d15276
Update client/windows/CCreatureWindow.h
Removed leftover debugging code.

Co-authored-by: Alexander Shishkin <alexvins@users.noreply.github.com>
2020-10-05 16:13:13 -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
John Bolton
6d8f1e4530 Fixed incorrect usage of const std::shared_ptr. Resolves 0003142.
Replaced const TBonusListPtr with TConstBonusListPtr where necessary
Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary.
Removed superfluous use of const.
Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
2020-09-30 22:56:28 -07:00
AlexVinS
55b54024a8 Cherry-picked essential fix from #631. This fixes https://bugs.vcmi.eu/view.php?id=3074. 2020-03-18 00:06:07 +03:00
JakubK
a8d5081895 More mouse scrolling fixes
Defect:
After my previous change that enabled map layer (`CAdvMapInt`) to listen to all mouse move events via `strongInterest` bool, I noticed that there are a few scenario that start scrolling the map unexpectedly. The two that were the easiest to reproduce were using keyboard arrows to move the hero or dimissing a popup dialog.

I traced this down to unexpected mouse move event (`SDL_MouseMotionEvent`) that SDL seems to dispatch in this situation. The windowID that comes with the event in this scenario is 0 (so no window with mouse focus). I don't know why SDL dispatches this mysterious (to me) mouse move event in that case (note that there is no actual mouse movement in either repro case).

Fix:
Don't handle the mouse move event if the windowID of the mouse motion event is 0.

Notes:
Impacts scrolling of the game map. Did some play testing and didn't notice the scrolling not working when expected. The two specific cases where the map would scroll unexpectedly (move a hero with keyboard arrows or dismiss a popup dialog) no longer move the map.
2020-01-04 22:45:33 -08:00
JakubK
09cd4c072a Defect:
In fullscreen mode, when the adventure window size does not fill the entire monitor (leaving black bars on each side), mouse movement is ignored in these areas. This results in difficulty scrolling the map in fullscreen mode, since you have to be exactly within [0,15] of the edge of the adventure window.

Fix:
Have the adventure map element, CAdvMapInt, subscribe to all mouse move events by setting the `strongInterest` bool to true. This will extend the scroll region to [min, 15], eliminating the dead mouse move space on the side of the window.

Notes:
Impacts adventure window mouse move event handling. Manually validated the scrolling the map now works without having to precisely aim for the edge of the window.
2019-12-26 10:10:39 -08:00
Dydzio
61ae6ce286 Remove useless and wrong recruit conditions 2019-06-01 20:29:49 +03:00
Dydzio
5470f9cafe Re-fix map hero movement speed, was too fast on land 2019-05-26 17:11:57 +02:00
Ewilhan
42114fa4fc Fixed wrongCursorOnFriendlyDwelling
Added else condition that covers cases "ObjectAtTile that is not enemy nor is Town nor is current Hero". This should cover all cases of friendly dwellings/mines not having the correct cursor.
2019-05-03 06:20:32 +01:00
Mikko
02c109f9cf
Update CAdvmapInterface.cpp 2019-01-24 15:34:58 +00:00
Mikko
f8ab2db0ea
Update CAdvmapInterface.cpp 2019-01-24 15:30:09 +00:00
Mikko
5b8ff278b9
Fix implicit cast from tribool to bool. 2019-01-24 14:45:40 +00:00
Alexander Shishkin
b00e935e4d
Warnings fixes (#538)
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
614cde4a55 Fixed two memory leaks 2018-11-14 20:58:37 +03:00
Dydzio
22ce535a2a Fix not responding statusbar 2018-10-29 14:12:07 +01:00
KasyanDiGris
fa5a14e2d8 Stabilize vcmi (#488)
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
yupinov
b56f862094 Yog is not able to buy a spellbook in his campaign anymore, as intended (#472)
* Yog is not able to buy a spellbook in his campaign anymore, as intended
2018-08-11 18:25:09 +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
Raphnalor
0f00dbf8cf Fix highlighting of a selected bonus for campaign. (#432) 2018-03-17 12:23:22 +08:00
Arseniy Shestakov
434deffb54 CAdvMapInt: improve hero reminder by checking hero path
Dialog won't show up if movement points insufficient for first step on current path.
2018-02-24 21:49:42 +08:00
Arseniy Shestakov
8bbe747e8e Cleanup undef for min / max. NOMINMAX is already in Global.h 2018-02-11 05:42:49 +03:00
AlexVinS
0a2b04709f Fixed https://bugs.vcmi.eu/view.php?id=2873 2018-02-09 22:12:21 +03:00
AlexVinS
0b70baa95e Spells configuration version 2 (effect-based)
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00
FeniksFire
b85bb6ec0a Fix positioning
Fix problem for costBacground in QuickRecruitmentWindow.
Position "y" there was scaled which lead to errors with different
resolutions.
2018-01-15 18:00:41 +01:00
Alexander Shishkin
e90fcea3d3
Merge pull request #396 from FeniksFire/update
Update graphics for QuickRecruitmentWindow
2018-01-14 10:42:23 +03:00
FeniksFire
1331c81a8b Update graphics for QuickRecruitmentWindow
Adding graphics maded by edeksumo
2018-01-13 09:49:29 +01: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
DJWarmonger
f523ae5545 Fixed Magic resistance display. 2017-12-30 12:25:29 +01:00
FeniksFire
bf4024c3ac Adding bacground for QuickRecruitmentWindow
Adding bacground for CreaturePurchaseCard in QuickRecruitmentWindow
2017-12-23 13:15:05 +01:00
AlexVinS
368ba0e2bf fixes 2017-12-21 21:27:39 +03:00
FeniksFire
f82fd41a14 Quick Recruitment Window upgrade
Now is possible to switch by button between creatures upgrades.
Fixed small typo, rename from purhase to purchase.
2017-12-21 18:23:28 +01:00
AlexVinS
39194a0629 Merge branch 'SplittingShortcuts' into develop 2017-11-15 22:31:55 +03:00
FeniksFire
3c3aaa7bb5 Improvement quick recruitment window
-Position is now relative to castle interface
-The highest level of creature is now presented.
-Improve positioning of creature card, now it's look like in hd mod.
2017-11-15 19:44:54 +01: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
FeniksFire
a4f701014b Quick Army Purhase in Town Screen
Mouse click on castle icon (it is now clickable) - quick recruit of all
available creatures.
2017-11-12 17:37:08 +01:00
Alexander Shishkin
fd4ecbd40b
Merge pull request #385 from Chocimier/altar
Fixed "Altar of Sacrifice only sacrifices creatures one kind at a time"
* https://bugs.vcmi.eu/view.php?id=2607
2017-10-28 14:04:34 +03:00
Piotr Wójcik
7171fa7ad4 Formatting 2017-10-28 11:04:55 +02:00
AlexVinS
c39cd5f951 Town building build mode fixes
* CGameHandler::buildStructure was using wrong requirements for buildings in auto mode.
* Build mode loading was wrong in case of omitted value
* Show town hall slot for not built building only if it have normal build mode
2017-10-28 03:27:39 +03:00
Piotr Wójcik
78e5d39ea0 Change variables type 2017-10-18 21:02:23 +02:00
Piotr Wójcik
f9ed952869 Properly calculate experience on altar 2017-10-14 22:10:59 +02:00
Piotr Wójcik
f145b4be91 Correctly sacrifice many stacks or many atrifacts, fixes #2607 2017-10-14 21:30:56 +02:00
AlexVinS
9423555015 Declare ownership of CCursorHandler::dndObject
# Conflicts:
#	AI/FuzzyLite
#	client/gui/CGuiHandler.cpp
2017-09-05 15:25:31 +03:00
AlexVinS
a8d25ea7b2 CHeroWindow tweaks
# Conflicts:
#	AI/FuzzyLite
#	client/windows/CHeroWindow.cpp
2017-09-05 15:22:48 +03:00
Henning Koehler
abdca71828 skill names and descriptions are fully managed by CSkillHandler 2017-08-30 22:35:23 +12:00
Henning Koehler
0357a4fe3b enabled config of skill descriptions 2017-08-26 10:08:06 +12:00
AlexVinS
64d9dadd64 Logging cleanup. 2017-08-11 15:47:50 +03:00
AlexVinS
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
ArseniyShestakov
cb40c093f8 Avoid boost::optional assignment for Boost 1.64 compatibility (#360)
Two options here: to use emplace from 1.56 or boost::make_optional.
Unfortunately Ubuntu 14.04 is using 1.54 and I'd rather not to break it.
2017-08-05 16:09:29 +03:00
Piotr Wójcik
886c8f63c6 Show stacks selected to sacrifice 2017-08-01 17:17:46 +02:00
Piotr Wójcik
137b9cde19 Fix crash in Altar of Sacrifice, fixes #2648 2017-07-29 19:27:39 +02:00
Arseniy Shestakov
6d9f99d4de Code style: and one more pass on lambda expressions parameter list 2017-07-19 02:11:17 +03:00
Arseniy Shestakov
b540ab73ed Code style: add empty parameters list to more lambda expressions 2017-07-19 01:39:38 +03:00
Arseniy Shestakov
2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
ArseniyShestakov
b2f74a93cf Code style: add empty parameter list to all lambda expressions (#345) 2017-07-17 15:35:57 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +03:00
ArseniyShestakov
a4c0ad94b1 Code style: remove default value hints in definitions (#342)
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
ArseniyShestakov
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
AlexVinS
2fb531b6d0 Display actual moral and luck for batlle stack 2017-07-14 21:42:36 +03:00
Arseniy Shestakov
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
Dydzio
252f68cb1a Fix black market behavior to match H3 2017-07-12 01:21:00 +02:00
AlexVinS
4f14f22d3a Unified CStack ammo, casts and counterattacks
* it is possible now to add casts and shoots OTF (f.e. with spell bonus)

Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
2017-07-08 20:29:59 +03:00
AlexVinS
dbaf3cb023 Cleanup & formatting 2017-07-04 01:32:40 +03:00
AlexVinS
6dd89efc9a tweaks 2017-07-03 21:43:05 +03:00
AlexVinS
a65befaa08 Moved town portal logic to mechanics class 2017-07-03 21:43:04 +03:00
AlexVinS
3d1a84875e Queries refactoring
* Moved SUMMON_BOAT special case to mechanics
* Partially moved Town portal logic to mechanics class
* Added generic query reply to CCallback
* Redesigned Queries so that base API do not depends on CGameHandler
* Got rid of CGameHandler::castSpellRequest
* Removed CGameHandler::castSpell
* Added new Query type for town portal dialog (not used yet)
2017-07-03 21:43:04 +03:00
Fay
65e88639a3 Minor: code format; 2017-06-08 21:07:09 +02:00
Fay
01bae590f1 Added swipe support for non-android platforms; 2017-06-07 22:42:41 +02:00
AlexVinS
a31c28ec33 Unified war machine mechanics.
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
Arseniy Shestakov
18161d3688 Client: implement spectator mode via command-line options
If running with --spectate/-s CPlayerInterface will appear even without human players.
Following command-line options also available:
 --spectate-ignore-hero
 --spectate-hero-speed=N
 --spectate-battle-speed=N
 --spectate-skip-battle
 --spectate-skip-battle-result
Boolean options can also be changed in runtime via client console:
 set spectate-ignore-hero on / off
Spectator mode also:
 - Work with --onlyAI option when starting game or loading saves.
 - Allow to use any cheat codes.
 - Give recon on towns and heroes.
2017-06-06 07:30:16 +03:00
AlexVinS
195e979a18 get rid of CBattleInfoCallback::battleCanCastThisSpell 2017-06-05 23:46:55 +03:00
AlexVinS
2cfb2e6ae0 get rid of CPlayerBattleCallback::battleCanCastThisSpell 2017-06-05 22:53:42 +03:00
AlexVinS
4d430f6ad8 get rid of CPlayerBattleCallback::battleCanCastSpell 2017-06-05 22:16:12 +03:00
AlexVinS
66cfc2fef9 CSpell::canBeCast tweaks 2017-06-05 21:30:25 +03:00
AlexVinS
fa6a7bd1b5 Fixed CID 1375682 2017-05-28 15:06:12 +03:00
AlexVinS
1c95c51ffb Fixed CID 1375685 2017-05-28 14:40:36 +03:00
Dydzio
5127061e28 Commander skill description support (#266)
* Added commander skill description support

* Add support for ZNPC00.txt not found
2017-05-26 22:58:33 +03:00
Fay
b5daa24982 Android support (#299)
* AI libs registering shenanigans on android;
* Fixed resolution aspect + mouse event scaling;
* Proper server init/deinit (through android IPC);
Enabled threaded init in CMT;
* Prevented a deadlock in logger on some devices;
* Fixed frozen intro frame after interrupting the video;
Added android progressbar displaying during initial data loading;
* Hacky fix for choppy animations during heroes movement (should look better now, but it's definitely not a good solution);
* Changes/fixes for new android launcher building process;
* Fixed app hang after getting SDL_QUIT when activity was destroyed;
* Functioanal, configurable advmap swiping support;
* VCMI changes cleanup;
Added few missing VCMI_ANDROID guards on swipe mechanics;
* Removed unneeded sleep in server startup code for android;
* Removed android ioapi hack (fixed in newest ndk);
* Removed unused android's library loading logic;
* Added android's swipe option to settings schema;
* Moved NO_STD_TOSTRING to be defined in global.h instead of build files;
2017-05-25 20:57:20 +03:00
AlexVinS
f370cdf1c7 Possible fix for https://bugs.vcmi.eu/view.php?id=2678 2017-05-25 20:09:38 +03:00
FeniksFire
19a9f05b80 Fix garrison highlight in city (#292) 2017-03-23 22:48:35 +03:00
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
dydzio
8a2b47d967 Fix for bug #2435 2017-02-10 12:19:35 +01:00
dydzio
81a00f59d1 Basic fix for bug #2635 2017-02-02 19:17:15 +01:00
Dydzio
79c101a56d Remove leftover commander artifact code 2016-12-31 21:29:47 +01:00
AlexVinS
2dd6a47764 try to plug a few coverity false positives 2016-11-28 02:50:41 +03:00
AlexVinS
312793efd9 try to plug a few coverity false positives 2016-11-27 23:41:17 +03:00
AlexVinS
6196ae7fca Fixed a few CWE-457 2016-11-27 19:00:16 +03:00
AlexVinS
27b853618c Fixed a few CWE-457 2016-11-27 18:17:20 +03:00
AlexVinS
86e33a4c45 [Refactoring] Unified SetResources NetPack API. 2016-11-26 15:14:43 +03:00