1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-11 01:10:26 +02:00
Commit Graph

236 Commits

Author SHA1 Message Date
72fe1fcfa9 Fix minimap updating on hero loss 2023-02-14 11:32:19 +02:00
e1bd0d2a04 API for custom events no longer requires SDL access 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
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
eb20a4b208 Merge remote-tracking branch 'vcmi/develop' into warnings_fix 2022-12-23 14:40:45 +02:00
c835a84051 Moved all GUI handling from BattleInterface to BattleControlPanel 2022-12-21 17:02:53 +02:00
e9e549148d Implemented teleportation animation effect 2022-12-18 18:26:43 +02:00
deffba01b9 All battle effects are now fully client sided 2022-12-17 17:35:15 +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
3f9a0a855e Renamed most of classes in client/battle directory to match current code
style
2022-12-09 13:26:17 +02:00
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
7c4e04c1ec Refactoring/cleanup of classes in CBattleAnimations.cpp 2022-11-28 16:02:46 +02:00
0032947735 regression fixed. Artifact assemble dialog shows multiple times. 2022-11-07 00:36:13 +02:00
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
ea2931c6ea Fix: Get rid of 'Tile is not visible' error message 2022-01-30 12:31:07 +02: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
54e6e42c46 Fix no player interface swap on being attacked 2019-05-04 10:07:52 +03: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
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
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
03cfd2cb78 Do not use StackLocation in netpacks 2018-03-17 13:24:12 +08:00
8bbe747e8e Cleanup undef for min / max. NOMINMAX is already in Global.h 2018-02-11 05:42:49 +03:00
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
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
9d9c026c85 Code style: serialize everything on own lines for easier debugging (#357) 2017-07-31 16:35:42 +03:00
2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
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
2f305cc68d Remove code related to duel mode (#312)
Remove code related to duel mode
2017-07-01 16:30:13 +03:00
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
c0ed22c99e Fixed CID 1366398. 2016-11-27 22:14:41 +03:00
86e33a4c45 [Refactoring] Unified SetResources NetPack API. 2016-11-26 15:14:43 +03:00
5b76c3f4eb Rebase of codebase changes for refactored serializer
Some of newer fixes not yet merged there and save compatibility a bit off.
2016-10-27 18:12:20 +03:00
523e33a5e5 cleanup 2016-10-16 03:41:43 +03:00
e4816c0639 cleanup 2016-10-16 03:14:59 +03:00
1c9dd41188 Removed unused STOP_CLIENT SDL event 2016-08-30 03:54:46 +03:00
c5cfc8467f Battles: change naming from drawbridge to gate for everything
This way code is shorter and cleaner while in future we may support towns with gate only.
2016-02-13 17:40:31 +03:00
422d5cabdf CBattleInterface: first pass on client drawbridge visualization 2016-02-10 07:10:32 +03:00
9ffd0155e6 Fix 1810 suggest artifact assembly 2016-01-23 16:24:43 +03:00
a266154b26 Fix 2014 cursor must disappear during movement and Magi's Eye 2016-01-23 00:35:41 +03:00
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
0a5e9c0fbe Merge pull request #144 from vcmi/fix/teleportMultiExitPoints
Support for exit selection between multiple teleport exit points
2015-12-05 03:12:17 +03:00
7b5a7f43ad Removed includes of CGameState from headers 2015-12-02 21:39:53 +02:00
b5100bee94 Teleport: rework code to support exit point selection for whirlpools 2015-12-02 17:56:26 +03:00
e4b1ef1405 Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
cc669b0ae7 Move gui locking to GUIHandler 2015-06-22 21:53:47 +03:00
f81116e04d Fix mantiss #2208 2015-06-21 20:30:19 +03:00
ec879046ca Merge pull request #93 from ArseniyShestakov/feature/pathfindingTeleports
Okay let's do this!
2015-03-10 09:04:25 +01:00
5233b60243 CPlayerInterface: all new code for automatic teleport usage 2015-03-08 17:17:24 +03:00
25656aa586 Add showTeleportDialog everywhere except actual code for AI and player
Just like TeleportDialog it's based off showBlockingDialog, but as number of package is higher when possible showTeleportDialog will be after other dialogs handling code.
2015-03-08 16:52:50 +03:00