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

119 Commits

Author SHA1 Message Date
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
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
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
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
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
AlexVinS
4f8c7bd4bb CStack refactoring
* removed all occurrences of attackerOwned
* Use BattleSide enum
* more tweaks
2017-07-01 19:17:08 +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
AlexVinS
0f5202689e Cumulative spell effects
* Added experimental support for cumulative effects for ENCHANTED bonus
* Updated and fixed SPECIAL_PECULIAR_ENCHANT processing
* Initial implementation of cumulative spell effects.
* Scheme for new spell feature - cumulative bonus.
2017-06-13 21:50:50 +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
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
Michał Janiszewski
f5ebc763b4 Add override keyword where applicable 2017-02-17 14:39:16 +01:00
DjWarmonger
80d5f7b4a4 Updated project files to MVS 2015 (in fact, it's trivial). 2016-12-12 19:14:45 +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
AlexVinS
c1fc39d9c1 Fixed CID 1366407 2016-11-28 03:51:32 +03:00
AlexVinS
c4ab962cc0 Fixed a few CWE-457 2016-11-27 17:48:18 +03:00
DjWarmonger
092a0c305b MSVS project update. 2016-11-25 18:17:40 +01:00
AlexVinS
931656f24a possible fix for http://bugs.vcmi.eu/view.php?id=2612 2016-11-18 14:27:20 +03:00
AlexVinS
b7b488b445 [c::b] BattleAI project updated, fixed paths 2016-11-01 21:53:46 +03:00
Michał Kalinowski
18f8ca3cd0 Refactoring Battle AI.
Divide BattleAI on the smaller files.
2016-10-31 14:59:56 +01:00
Arseniy Shestakov
cb3d6a24e7 Cmake: cleanup for commit hash in build version
Since it's available in lib we don't need to include it everywhere.
2016-10-27 17:01:29 +03:00
Vadim Markovtsev
da1c9cf249 Fix rebuilding everything on HEAD change 2016-10-23 16:56:53 +02:00
Vadim Markovtsev
d0beb27197 Add git commit hash into the version string 2016-10-23 15:45:47 +02:00
Vadim Markovtsev
2c1dddde33 Fix memory problems with BonusList
Bonus * -> std::shared_ptr<Bonus>

This cures the following problems:

1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.

Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
AlexVinS
bd79298ca6 Let AI do not self-destruct with armageddon too often. 2016-09-22 22:29:48 +03:00
AlexVinS
fb384d83b8 Probably fixed crash when AI finish battle with spell 2016-09-22 20:51:13 +03:00
AlexVinS
505e53c17d Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring8
# Conflicts:
#	client/battle/CBattleInterface.cpp
#	lib/spells/BattleSpellMechanics.cpp
2016-09-12 10:13:40 +03:00
Arseniy Shestakov
c8faca8f39 Refactoring: only use RNGs explicitly to avoid bug prone code in future
Now server-side code should always use CRandomGenerator::getDefault which is serialized in GH.
CGameState::getRandomGenerator should be only used from GS code and CPackForClient-based applyGs.
2016-09-11 00:10:46 +03:00
AlexVinS
289cbbf2e7 Teach AI how to use massive timed effects. 2016-09-05 14:17:46 +03:00
AlexVinS
3de47d4df6 [AI] Teach BattleAI how to use offensive location spells (like fireball)
* AI already can evaluate effect of smart and not smart offensive spells.
2016-08-30 12:19:55 +03:00
AlexVinS
3b2a45c8dc Get rid of battleGetPossibleTargets. 2016-08-30 12:19:52 +03:00
AlexVinS
d4a35c6839 Simplify getAffectedStacks arguments. casterColor not needed anymore. 2016-08-30 12:14:08 +03:00
Alexander Shishkin
5e5ce0bb09 Merge pull request #203 from vcmi/logFormat
boost::format support for CLogger
2016-08-29 17:32:44 +04:00
AlexVinS
439aeecc8b [c::b] re-enabled PCH, tested with GCC 5.3. (Older versions may not work) 2016-08-18 13:40:35 +03:00
AlexVinS
22884d9150 AI logging convert 1 2016-08-13 17:44:37 +03:00
AlexVinS
72f79a3ad7 Draft boost::format based log proxy. 2016-08-13 16:57:09 +03:00
AlexVinS
dd70e74769 [AI] relaxed logging 2016-08-13 16:57:07 +03:00
Arseniy Shestakov
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
Vadim Markovtsev
3926920103 Rename radious -> radius
There is no such English word, "radious"
Some files get new lines in the end - BSD sed bug + best practices
2016-01-31 18:01:58 +03:00
Zyx-2000
a50a702073 switched to -std=gnu++11 2016-01-18 17:49:07 +01:00
Zyx-2000
203b2dccc3 hopefully fixed things 2016-01-09 21:23:55 +01:00