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

142 Commits

Author SHA1 Message Date
Michał Kalinowski
aee4bb7281 Fix building a test target
-Using Field matcher instead Eq to compare boost tribool value
2019-05-09 20:01:16 +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
Michał Kalinowski
a0d1808b62 CMake transitive compile dependency
Moving to more target focusing code that provides better transitive scope
2019-01-19 17:38:54 +03: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
Dydzio
216d50788b Fix AI build, update default Windows SDK version for projects 2018-12-31 15:18:42 +01:00
AlexVinS
5a8416bd19 [c::b] Updated projects, fixed build 2018-12-31 00:03:31 +03:00
Andrii Danylchenko
035d279ae8 Refactor CGHeroInstance, make spells private 2018-12-23 15:49:26 +03:00
Michał Janiszewski
0ff2e1180d Throw std::runtime_exception instead of a pointer to new one
cf. https://isocpp.org/wiki/faq/exceptions#what-to-throw
2018-10-31 07:27:54 +01:00
AlexVinS
f17783cfb5 [c::b] Updated projects, applied fixes 2018-07-29 22:07:40 +03:00
DJWarmonger
30f99e7cc1 Fix for Travis 2018-07-28 16:02:59 +02:00
DJWarmonger
5cd366dca3 Compile fix 2018-07-28 14:14:24 +02:00
DJWarmonger
301565b315 Updated CMake 2018-07-27 06:44:10 +02:00
DJWarmonger
273802c92c I have no idea what I'm doing 2018-07-26 12:14:29 +02:00
karliss
ad2c429d8f CMake: unittest improvements (#447)
* Convert TestConfig to proper test environment.
* Copy test data to build directory.
* Get test recognized by ctest, but disable gtest discovery. Allowing ctest to run each test individually isn't currently practical because it is 50 times slower.
2018-04-15 18:02:31 +07:00
Arseniy Shestakov
74e5c5bf05 CGameHandler: rename CPackForClient argument and add network logging 2018-04-04 14:24:32 +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
Henning Koehler
02b5a5e830 Make bonus stacking configurable + fix duplicate propagation/inheritance (#433)
Addresses several related problems:
* Propagation / unpropagation of duplicate bonuses is inconsistent, causing bugs
* Duplicate bonuses never stack, which is not always intended behaviour (e.g. multiple copies of resource generating artifacts)
* Different bonuses always stack, which is not always intended behaviour (e.g. Angel + Archangel morale bonuses)

This is addressed as follows:
* Duplicate bonuses are never eliminated during propagation/inheritance.
* Unpropagation eliminates only a single copy of duplicated bonus
* Bonus receives a new field stacking that determines stacking behaviour:
* * empty string = no stacking with duplicates (default)
* * "ALWAYS" = stacks with duplicates & everything else
* * some other value = no stacking with bonuses with same stacking value
Also Morale/Luck window now hides non-stacking bonuses.
2018-03-27 14:54:58 +07:00
AlexVinS
9d108d59db Redone RMG template serialization using JSON serializer, added tests 2018-03-10 19:36:19 +03:00
AlexVinS
b2faf30d0d [tests] Moved JsonComparer to own file 2018-03-05 21:26:00 +03:00
AlexVinS
f126a34a5e Fixed https://bugs.vcmi.eu/view.php?id=2904 2018-03-04 11:15:24 +03:00
AlexVinS
5ea1888a14 Summon effect fixes. 2018-03-03 20:37:49 +03:00
Alexander Shishkin
8b002ad774
Issue2888 (#421)
Fixed issue 2888
* Merged AFTER_ATTACK & BEFORE_ATTACK cast modes.
* Introduced new caster class for creature ability usage
* Added few tests
2018-03-02 13:22:51 +03:00
AlexVinS
2b49df2cab [Spells] Do not use Unit State in heal effect 2018-02-20 13:19:01 +03:00
AlexVinS
2add0e443e [Spells] Added "summonByHealth" option to Summon effect
* with summonByHealth on, effect power (levelPower * SP) treated as HP
* default behavior (effect power = amount) not changed
* tests included
2018-02-20 08:08:34 +03:00
AlexVinS
8220053864 Cleanup 2018-02-09 20:52:56 +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
Dydzio
38d836d1a5 Update project files to Visual Studio 2017 2018-01-13 16:33:49 +01:00
Michał Kalinowski
26a222ac62 Change JsonType to enum class (#393)
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +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
7dca95c8cc CMake: multiple improvements for builds and project generation
- Change default build output directory name from "build" to "bin"
- Implement new function vcmi_get_cmake_debug_info
- Link client with SDL2main on Windows and disable debug console
- Remove all old MinGW-specific options since they outdated and MXE work fine
- Set AUTOGEN_TARGETS_FOLDER for better Xcode and Visual Studio projects
- Remove useless vcmitestFiles custom target for less garbage in project files
2017-08-16 16:10:07 +03:00
Arseniy Shestakov
56f89270db macOS: full rework of Mac packaging process
- Most of outdated CMakeLists code removed.
- All Mac-specific code is removed include Sparkle support and vcmibuilder app.
- DMG buidling reimplemented using macdeployqt command.
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
AlexVinS
15138c23de Finished conversion to new logging API
* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
2017-08-11 23:06:27 +03:00
AlexVinS
046e1a7c29 Prepared JsonNode for new logging API. 2017-08-11 16:27:42 +03:00
Arseniy Shestakov
21074e13c3 macOS: always change working directory for launcher and server
This make relative paths work properly when launched from DMG or from different directory.
2017-08-09 01:33:12 +03:00
AlexVinS
2d31d5710f [tests] Reduced code duplication 2017-08-03 15:56:45 +03:00
AlexVinS
12b42f4495 Improved map format tests 2017-08-03 13:50:54 +03:00
AlexVinS
2e2642ef7a [C::B] test project update 2017-07-20 15:46:40 +03:00
FeniksFire
d84ecb6fb2 Tests improvement
Delete our logger from tests.
Make correction.
2017-07-19 17:04:57 +02:00
FeniksFire
587f59e93a Migrating "CHealthTest" from boost to googlemock and googletest. 2017-07-18 21:04:57 +02:00
FeniksFire
704eeb25b2 Add googletest as submodule 2017-07-18 16:49:50 +02:00
FeniksFire
a71c9d0751 Migrating from boost test to google test. 2017-07-18 16:49:05 +02:00
AlexVinS
ef73f416dc fixed resurrection corner case 2017-07-17 02:50:38 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +03:00
ArseniyShestakov
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
AlexVinS
df13851176 fixed wrong battle result 2017-07-14 23:43:03 +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