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

162 Commits

Author SHA1 Message Date
Konstantin
05eccbc2bb vcmi: split bonus to enumerator and HeroBonus.h 2023-05-03 18:01:06 +03:00
Konstantin P
b472c89276 vcmi: make some CStack properties private
There is a getters for this properties already available
2023-04-27 20:58:49 +03:00
krs
e348193f7e Tactics movement is limited to movement range 2023-04-26 21:56:20 +04:00
nordsoft
bfc75ccd39 Merge remote-tracking branch 'upstream/develop' into battle-dialog 2023-04-11 02:22:42 +04:00
krs
dab07bdef9 Now unit range is shown in Tactics phase as well
A new parameter: isActiveStack was needed in battleGetAvailableHexes, so that we show the propper Tactics range.
2023-04-08 20:39:59 +03:00
nordsoft
ce3028bd73 Intermediate commit 2023-04-06 19:34:07 +04:00
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Konstantin
e0715a76c8 vcmi: reduce CStack usage a little bit 2023-04-04 23:02:54 +03:00
Ivan Savenko
970981cfc9 Show information on potential kills in attack tooltip 2023-03-24 17:18:47 +02:00
Ivan Savenko
31147ac83b refactoring: TDmgRange pair -> DamageRange struct 2023-03-23 17:49:33 +02:00
Andrey Filipenkov
0294a8b063 enable StupidAI and EmptyAI for static AI 2023-03-02 12:09:49 +03:00
Ivan Savenko
b86969909a Fixes compilation due to changes in callback interface 2023-01-20 15:18:10 +02:00
Ivan Savenko
5d80457eda Merge with vcmi/develop branch 2022-12-30 00:52:23 +02:00
Ivan Savenko
e9e549148d Implemented teleportation animation effect 2022-12-18 18:26:43 +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
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
Andrey Filipenkov
5e838008df merge launcher and client
launcher is a static lib now
2022-09-24 15:55:22 +03:00
Andrey Filipenkov
c6e51852d0 add ability to build VCMI as single process
"Client process -> shared VCMI lib <- Server process" is turned into "shared Client-VCMI lib -> process <- static Server-VCMI lib"
- adds lib_client and lib_server targets that define distinct namespaces
- lib_client is a dynamic library which is shared with AI libs, lib_server is static
2022-09-24 15:55:21 +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
3388583089 use component-based install to copy only what's needed for every app 2022-09-24 15:55:20 +03:00
Soar Qin
188607b05f Replace cotire with CMake builtin precompiled headers support (Requires CMake version >= 3.16) 2022-06-17 17:20:08 +03:00
Soar Qin
c87df8e704
Fix warnings/errors on MSVC (#753)
* Fix warnings/errors on MSVC
1. update googletest to tag release-1.11.0 to make googletest and
   googlemock compile on MSVC2022.
2. set gtest_force_shared_crt to ON in test cmake project to make tests
   compile on MSVC.
3. add /wd4251 and /wd4275 to MSVC compile flags to ignore DLL related
   warnings for class exports.
4. fix some other warnings and errors while compiling on MSVC2022.
2022-06-11 18:45:34 +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
Andrii Danylchenko
36854742e4 Fix StupidAI trying to attack through obstacle 2020-12-15 20:38:01 +02:00
Dmitry Orlov
ef6220ebec Fix: Creature resolution failed when mod is in the custom directory 2020-12-13 03:33:28 +03:00
Andrii Danylchenko
ea073c81d3 2184 - fix battlefield corners unreachable for 2 hex units 2020-11-28 14:14:13 +02: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
Dydzio
54550b50de Update VS files to 2019, partially fix test project 2019-06-09 17:28:55 +02:00
AlexVinS
1f2ee843aa [C::B] Switched to boost shared linkage 2019-05-30 20:55:40 +03:00
Michał Kalinowski
ec536e613c CMake more transitive
-Moving AIs cmake to target focusing code
-Beign explicit when link libraries
2019-03-28 16:56:51 +03:00
AlexVinS
9311966706 [C::B] Switch to MinGW 7.3 2019-02-19 14:59:10 +03:00
Dydzio
216d50788b Fix AI build, update default Windows SDK version for projects 2018-12-31 15:18:42 +01: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
Dydzio
38d836d1a5 Update project files to Visual Studio 2017 2018-01-13 16:33:49 +01:00
Arseniy Shestakov
da117e9255 Code style: remove void from constructors without arguments 2018-01-13 11:51:47 +03:00
Dydzio
ea17b0f458 Major overhaul of VS related files 2017-08-19 15:58:55 +02:00
Dydzio
e3ba491fa1 Use multi-core compile by default, fix VCMI_client path 2017-08-19 13:27:24 +02:00
Arseniy Shestakov
40af43c46e CMake: massive rework for Mac build and other improvements
- macOS: RPATH-related code all removed or disabled
- macOS: new osx/CMakeLists.txt to run some install-code running after all subdirectories
- Assets copying into the runtime output directory implemented for Mac and Linux development
2017-08-16 16:10:07 +03:00
Arseniy Shestakov
193f492b99 CMake: cleanup, project generation and other improvements
- Use EXCLUDE_FROM_ALL for FuzzyLite and GoogleTest to avoid inclusion of unneded headers and libraries into installers.
- Set minimum CMake version only in main CMakeLists.txt
- Set project name only in main CMakeLists.txt
- Visual Studio: add assign_source_group function to generate proper filesystem tree
- Visual Studio: set PROJECT_LABEL so generated projects have same names binaries on Windows
- Visual Studio: enabled USE_FOLDERS for projects grouping. This also possibly affect other IDEs.
- Added add_subdirectory_with_folder function to make sure 3rd-party libraries are affected by USE_FOLDERS.
2017-08-16 16:10:07 +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
Arseniy Shestakov
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
Victor Luchits
30cc2f6a01 Change the output path for cmake so all files go into the same root directory 2017-07-07 13:08:53 +03:00
Arseniy Shestakov
fb19a3a068 CMake: update all CMakeLists to include actual sources and headers
This make it easier to use project with newer CMake and Qt Creator.
I decided against using GLOB since we don't rename files that much.
2017-06-29 02:03:37 +03:00
FeniksFire
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +02: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
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
DjWarmonger
80d5f7b4a4 Updated project files to MVS 2015 (in fact, it's trivial). 2016-12-12 19:14:45 +01:00
DjWarmonger
90d39ca2af Fix CID 1197519 2016-12-12 19:13:43 +01:00
AlexVinS
204ee37ae4 boost/program_options has only 2 uses, and unlikely will be used more -> removed form Global.h. 2016-11-28 21:38:17 +03:00
Ivan Savenko
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