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

262 Commits

Author SHA1 Message Date
AlexVinS
d7800b834e get rid of CBattleInfoCallback::calculateSpellDmg 2014-11-12 09:52:11 +03:00
AlexVinS
e4b726151d get rid of CBattleInfoCallback::battleStackIsImmune 2014-11-12 09:20:20 +03:00
Ivan Savenko
b551bdb725 Final part of the merge
Merging VCMI Dirs refactoring + GUI refactoring with current develop
2014-09-04 20:59:07 +03:00
DjWarmonger
0edaf4fa8a Merge pull request #26 from vcmi/FFMpeg
Let's do this, way too many branches running now.
2014-09-01 10:35:30 +02:00
DjWarmonger
8b10f70afd Migrating to MSVS 2013, which allows to delete inttypes.h file. 2014-08-31 19:08:39 +02:00
Karol
1b6f2ea3b7 VCMIDirs update #5 fix
- Updated old OS detect macros.
- Fixed 1 misspell.
2014-08-26 12:19:04 +02:00
beegee1
5139378319 - migrated boost::function/ref/bind to std:: variants 2014-08-04 20:33:59 +02:00
Michael Pavlyshko
f7d8faa540 install only .dll (without .dll.a) 2014-07-11 17:27:50 +03:00
AlexVinS
56c74bc46a +More build target to support both SDL1 and SDL2 builds 2014-06-13 07:55:48 +04:00
AlexVinS
bbd0312b45 Tweak configuration 2014-06-13 07:55:47 +04:00
AlexVinS
6f65d2484b Extract battleStackIsImmune from battleIsImmune
This fix possible problems with rising spells as now immunty is handled on stack level not on hex level
* battleIsImmune in now protected - only used in canCastThisSpellHere
2014-05-19 13:44:38 +04:00
Ilya Zhuravlev
db7cd79cf7 Android port.
Conflicts:
	lib/vcmi_endian.h
2014-05-16 23:24:29 +04:00
DjWarmonger
4a71442c80 Missing changes. 2014-04-27 14:38:20 +02:00
DjWarmonger
9e7013de77 Backup for my own MVS project configuration 2014-04-24 21:07:43 +02:00
Ivan Savenko
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
alexvins
4203d69525 Part 2 of new spell configuration
1) spell handler refactored to support modding in general way
2) imunnity icons moved to WoG as they depends on wog`s graphics
3) introduced new class template for handlers (todo: use this in other handlers)
4) save format changed
5) introduced "absolute immunity" - unaffected by "the Orb" etc. (todo: use it in config)
6) new format documented on wiki, added json schema.

* more split of registertypes - fixes 32 mingw build
2014-03-07 13:21:09 +00:00
beegee1
95034b9fa0 - Updated PCH to use our StdInc.h as the prefix header (not generated one from cotire) -> no exclude headers from ffmpeg/etc... statements required
- Fixed compilation error (VCAI ResourceSet logging)
2014-02-05 20:25:36 +00:00
beegee1
df0a28d9cb - added PCH compilation for CMake using cotire module (PCH is OFF per default, can be enabled with ENABLE_PCH=ON) 2014-02-01 13:37:26 +00:00
alexvins
a740f7989c [c::b] update projects, disable PHC for now, +few fixes (still wip) 2014-01-05 17:48:50 +00:00
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
Michał W. Urbańczyk
149ff4df14 Fixed tiny but terrible mistake from two commits ago. 2013-09-29 21:15:02 +00:00
Michał W. Urbańczyk
5c6d12400f Fixed AI detection of battle end (solves some freezes). 2013-09-29 20:54:29 +00:00
Michał W. Urbańczyk
92246a2c17 * Fixed #1417 — infinite loop of AI trying to visit allied creture generator
* Fixed #1401 — battle AI won't attempt attacks with First Aid Tent
2013-08-25 13:03:29 +00:00
Michał W. Urbańczyk
a1f545792b Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. 
 * Move assignment operator for VS 2012.
2013-07-02 15:23:32 +00:00
Michał W. Urbańczyk
4576719abe Visual Studio 2013 Preview compile fixes:
* 0 is not convertible to std::function, nullptr should be used
* std::ref(rand) is not convertible to function<int()>, used lambdas (why we dont just pass "rand" ? )
* CFunctionList needs to be constructible from nullptr
* move constructor for CMapInfo (Visual cannot generate them :( )
* #ifdefed some stuff that is not needed anymore since cmath is updated with C99 stuff
* using std::make_unique instead of our vstd implementation

CSelector: 
* introduced a class in place of typedef
* Having an overloaded && || operators over sth that is convertible to bool… Wasn't a good idea after all. Purged the operators, replaced  with And/Or methods (chaining-style).
* constructor that is present only when constructing from class or function (SFINAE). std::function has an implicit converting constructor from T causing ambiguities (even if the overload would cause compile error in the body)
2013-07-02 12:08:30 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Ivan Savenko
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
Ivan Savenko
dd808ef5cc bugfixing:
- support for one more Russian localisation, fixes #1321
 - fixed icon for level 1 town hall, #1294
 - correct portraits for first heroes from mods, #1297 and probably #1298
And a lot of gcc compile fixes
2013-06-23 19:35:54 +00:00
Michał W. Urbańczyk
4a0587d500 More work on auto-fight.
Dynamic libraries return smart-pointers to what they create.
2013-06-22 21:47:51 +00:00
Michał W. Urbańczyk
254f194220 Some very early work towards autofight feature.
Added EmptyAI to the solution.
Passing callbacks by shared_ptr.
2013-06-22 14:47:20 +00:00
Michał W. Urbańczyk
06dbdd234f Further changes for duel mode. It is possible to pass names of AIs to be used by command line. Moved things in battle AI. 2013-06-21 20:59:32 +00:00
Michał W. Urbańczyk
6a88604937 * fixed crash related to cammander's SPELL_AFTER_ATTACK spell id not initialized properly (text id was resolved on copy of bonus)
* fixed duels, added no-GUI mode for automatic AI testing
* minor things
2013-06-17 15:45:55 +00:00
Michał W. Urbańczyk
79026bdfde Introduced strongly typed QueryID.
Exchange between heroes is now a proper first-class query. Fixes #1269. #66 should also be finally fully fixed.
VC projects: /Zm flag to fix compilation issues with recent Boost.
2013-05-27 10:53:28 +00:00
Michał W. Urbańczyk
5c2473d436 Support for saving/loading in player interfaces, including VCAI.
Minor changes.
2013-05-09 11:09:23 +00:00
beegee1
abf96a5b66 - Integrated the logging API into the AI subprojects - Added macros for tracing the control flow - Added methods isDebug/TraceEnabled for performance-critical sections 2013-04-10 16:28:14 +00:00
mateuszb
d540723739 * refactoring 2013-02-11 14:42:09 +00:00
mateuszb
f1c78e3260 * creature ID refactoring
* double week creatures are configurable now
2013-02-07 17:34:50 +00:00
mateuszb
8769f67c5d * JsonReader can convert to enums
* refactoring
2013-02-03 21:05:44 +00:00
Michał W. Urbańczyk
6232a1b369 Fixed #1181. Do not change that setProperty to setPropertyDer, it has to be as it is.
Sketchy fix for BattleAIs colliding ith their callbacks.
2013-01-21 21:34:30 +00:00
Michał W. Urbańczyk
5b919d88eb "More stable" opening AI. 2013-01-20 12:06:49 +00:00
alexvins
53b684180d [refactor]
* use spells configuration (all timed effects for battle spells)
* a few more cleanups
+register erm resource types (useful in future and less noise in log now)
2013-01-16 11:19:04 +00:00
alexvins
d8b068afd9 [c::b] update projects 2013-01-08 09:41:28 +00:00
Ivan Savenko
0b1c215882 - end of world, at least for autotools. Removed completely in favor of CMake 2012-12-23 19:44:37 +00:00
Ivan Savenko
8824f5e2d5 - H3 creatures use subset of mod creature format (todo - unify code)
- creatures configs moved into confg/creatures files, similar to factions.
 - creatures ID's use same camelCase format as the rest of the game
2012-12-22 16:47:12 +00:00
Michał W. Urbańczyk
bcf8cab19a Project files update/cleanup. 2012-12-19 18:23:21 +00:00
alexvins
e775ad8804 small cleanup 2012-12-16 16:54:20 +00:00
alexvins
a6388652d3 [c::b] update projects 2012-12-06 12:16:26 +00:00
DjWarmonger
c5d9110176 Compile fix for last commit. 2012-12-01 07:17:55 +00:00
Ivan Savenko
2643762f08 Mac OS patch from stopiccot 2012-12-01 06:30:52 +00:00
DjWarmonger
c54b983663 Some improvements for AI logging. 2012-11-15 10:40:40 +00:00
Ivan Savenko
0d863c83d7 - removed autogenerated by autotools files
- fixes for #386 using patches from Ixtreon
2012-11-10 21:56:19 +00:00
alexvins
2942e2e824 [c::b] update projects
-boost::iostreams
*link with release boost libs always
2012-10-06 15:12:07 +00:00
Ivan Savenko
c071a03a8a - fix for #1135
- merged wall_pos.json into town config
- removed tower_shooter field from creatures.json
2012-10-05 18:03:49 +00:00
Ivan Savenko
306d64b0c4 - it is possible to read json file with vector
- town configuration:
- - all town-related texts are now in TownHandler
- - alignments are now part of faction
- - removed CTown::bonus field
2012-10-05 13:11:26 +00:00
Ivan Savenko
f113f9573d - CPack support. Works on my side, needs tweaks for Win 2012-10-05 12:38:17 +00:00
Michał W. Urbańczyk
f30ee8ff04 * fixed possible corruption of pack sent by server when player request is rejected
* BattleAI will restore callback to its previous state, fixes freeze after battle #1104
* BattleAI won't lose turn when unable to correctly evaluate a spell
* VCAI will correctly recognize hero standing on town entrance
* War machines of defender will have correctly set side
* Faction 9 as neutral causes crashes, changing to -1 as used elsewhere in the code
2012-09-29 14:44:06 +00:00
Ivan Savenko
15a7f43e11 - fixed #1075, #1080, #1081
- fixed some warnings from cppcheck
2012-09-26 13:13:39 +00:00
Michał W. Urbańczyk
95b866c131 * Further work on Battle AI. Now it is able to cast a number of offensive spells. Battle callback exposes more spell-casting info.
* Took down the one Boost.Assign usage offending VC11. I'm getting impatient I guess...
2012-09-23 23:10:56 +00:00
Ivan Savenko
8f936cd34d - added battleAI to CMake, compile fixes
- icons config for towns and creatures
2012-09-22 15:10:15 +00:00
Michał W. Urbańczyk
62e63d45b1 Work in progress on BattleAI. Related changes:
* battle AIs receive ptr to CBattleCallback (not sure why it was CPlayerBattleCallback, likely mistake)
* reworked some battle callback methods to be more generic and able to handle some hypothetic scenarios
* for testing purposes in duel mode the first AI will be taken fro mconfig and the second will remain stupid ai
* minor changes
2012-09-20 16:55:21 +00:00
alexvins
7087be1f02 C::B project files initial import
+ workspace file (not include ERM and Battle AI)
+ project files
* svn:ignore setup
2012-09-15 18:44:55 +00:00
Michał W. Urbańczyk
c42f187608 Created a new battle AI project — BattleAI. Now it is merely a copy of StupidAI but it is meant to eventually replace it. 2012-09-13 23:42:11 +00:00