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

91 Commits

Author SHA1 Message Date
Ivan Savenko
405b2976d5 Renamed getUpgradeInfo -> fillUpgradeInfo 2022-12-25 14:03:43 +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
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
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
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
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02: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
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
Dmitry Orlov
ea2931c6ea Fix: Get rid of 'Tile is not visible' error message 2022-01-30 12:31:07 +02:00
Andrii Danylchenko
3fa7e0976f Nullkiller: update / fix build, core changes required for Nullkiller AI 2021-07-26 21:02: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
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
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
Andrii Danylchenko
8fee46de7c AI: town portal support 2019-01-17 10:40:23 +03:00
Michał Janiszewski
7be9aa4868 Prevent shadowing of function arguments by local vars 2018-10-29 16:56:14 +01:00
Andrii Danylchenko
f327c46fa3 AI pathfinding: rename and add const to functions 2018-10-07 14:51:27 +03:00
Andrii Danylchenko
49c872e4ec AI: replace SectorMap with new PathfinderManager 2018-10-06 16:35:31 +03:00
Henning Koehler
2b64bf29ed Fix Issue 2214 (#437)
CGameInfoCallback::getAvailableHeroes: add checks for tavern
2018-03-22 18:14:43 +07: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
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
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
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
Arseniy Shestakov
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
FeniksFire
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +02: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
a85b4cf2a5 * WIP on event condition format
* Hero portrait serialization
* Fix town spells serialization

* Added support for float exponential part in Json
* Added support for int64 in Json
* Added basic Hero definitions serialization
* Added rumors serialization
* Advanced player info serialization.
* Added Disposed heroes serialization, (!) not covered with tests yet
* Added Local event serialization
* Added Pandoras box serialization
* Added Seer hut reward serialization
* Added CQuest serialization
* Added API for map object instance names serialization.
* Added random dwelling options serialization
* Advanced town options serialization
* Advanced hero options serialization
* More map format tests
* A lot of fixes, cleanup and refactoring
2017-05-27 00:23:19 +03:00
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
dydzio
c45a256816 Further fix for mantis #2599 2016-12-10 13:34:58 +01:00
AlexVinS
a8a661b159 Map handler refactoring, part 2. 2016-11-08 00:19:53 +03:00
AlexVinS
aad675a7c4 Revert "Merge branch 'p254_4' into develop"
This reverts commit 37f68713a7, reversing
changes made to 4477b7c35d.
2016-11-08 00:17:20 +03:00
AlexVinS
46196daa07 cleanup 2016-11-06 05:27:56 +03:00
AlexVinS
f760e22707 Fixed two recursive infinite loops in case of alternate buildings.
* introduced in https://github.com/vcmi/vcmi/pull/211
2016-10-15 04:19:47 +03:00
dydzio
68af6a0c19 Refactoring InfoAboutHero + GetHeroInfo 2016-09-28 13:22:33 +02:00
dydzio
f9b5ca3374 Remove max mana info leak + tiny refactor 2016-09-28 00:20:45 +02:00
dydzio
d831c087d9 Extending hero info callback
Allow to check battle enemy hero details + adding max spell points to available data
2016-09-27 22:47:24 +02:00
Piotr Wójcik
e1a1bc89c0 Extract PossibilityVisitor 2016-09-12 22:28:11 +02:00
Piotr Wójcik
40003460ca Check if building's dependencies are allowed 2016-09-10 19:38:49 +02:00
Arseniy Shestakov
668cd83ee5 More work on static variable desyncs 2016-08-29 23:07:52 +03:00
AlexVinS
74a82c4c9d Moved boost:format log proxy to CLoggerBase 2016-08-13 16:57:18 +03:00
AlexVinS
599f4cfb55 extracted base logger class to vstd 2016-08-13 16:57:16 +03:00
AlexVinS
efee250e49 Few more usages of logFormat 2016-08-13 16:57:14 +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
ArseniyShestakov
4e8486da7b Merge pull request #160 from vmarkovtsev/issue/2388
Fix 2388 obelisks puzzle revealing
2016-01-27 20:49:03 +03:00
Vadim Markovtsev
9f3313524e Fix 2160 dismissing a VIP hero 2016-01-27 17:10:19 +03:00
Vadim Markovtsev
10f888a483 Fix obelisks puzzle revealing
Teams and players were messed up in lib; hardcoded constants were refactored.
2016-01-20 10:44:13 +03:00
Arseniy Shestakov
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
ArseniyShestakov
e872b400b7 Comments save format backward compatability code as Ivan suggested
Also we should always handle RumorState::TYPE_NONE in getTavernRumor properly anyway.
2015-12-06 02:51:54 +03:00
ArseniyShestakov
360ebcce7e Merge pull request #145 from vcmi/feature/tavernRumors
Tavern rumors and Thieves Guild fixes
2015-12-05 03:13:25 +03:00
ArseniyShestakov
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
ArseniyShestakov
c83f15e413 Merge branch 'develop' into feature/tavernRumors
Conflicts:
	lib/CGameState.h
2015-12-05 01:01:26 +03:00