1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00
Commit Graph

136 Commits

Author SHA1 Message Date
89ce1a4509 Fixed uninitialized field 2016-08-18 15:03:20 +03:00
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
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
8fb5dacba2 CBonusSystemNode: get rid of non-const getBonusList 2015-12-11 15:02:36 +03:00
b48d65ad57 addNewBonus: add turnsRemain check for N_TURNS, N_DAYS and ONE_WEEK 2015-11-20 14:37:57 +03:00
7f0b0bd1b5 Bonus system: use updateBonuses in battleTurnPasseed 2015-11-09 15:48:07 +03:00
ee1c5e452f Bonus system: add CWillLastDays selector 2015-11-09 15:01:58 +03:00
5bfbd8526b Bonus system: fix N_DAYS bonus duration 2015-11-09 14:18:36 +03:00
b701835de0 Fix wrong comparison 2015-10-13 21:05:46 +03:00
395070b584 Fix 1974 2015-09-15 08:51:05 +03:00
8f2da66a18 fix mantiss 1967 + some refactoring
* remove TModDescr and realted APIs - they were only used in one place
2015-09-04 22:29:20 +03:00
2cb6cb7baa Remove useless durationType selector
* duration is a mask, equality comparison is not enough
2015-06-02 07:12:02 +03:00
5b29e800f7 Cleanup: use only CBonusSystemNode::treeHasChanged() when changing treeChanged 2015-04-11 08:13:28 +03:00
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
66b022f93e initializer lists part1 2014-10-02 19:43:46 +04:00
36a7cff998 Cleaning error messages at access to players. 2014-09-17 11:03:53 +02:00
5139378319 - migrated boost::function/ref/bind to std:: variants 2014-08-04 20:33:59 +02:00
dc03a251f6 - Fixed treasure generating formula It should be now identical to OH3.
- Refactorings, tweaks.
2014-07-29 15:58:54 +02:00
8a3b997fa5 fix a few comments. No code changes. 2014-05-21 13:02:20 +04:00
8683c8c0eb - Added and improved some propagators, including Crystal Dragons ability (#1232)
- Minor refactoring in AI
2014-03-29 21:39:19 +00:00
9c0df68cb8 Fixing spelling mistakes. Patch from josch, fixes #1759 2014-03-23 12:59:03 +00:00
3560bbb7f3 two patches/pull requests from janisozaur
- replace our custom bmap with std::map::at()
- compile fixes for editor
2013-11-12 10:45:42 +00:00
4ec9faa789 Fixed #1367. Removed confusing code for speed calculation. 2013-07-22 17:06:32 +00:00
4fd9bcfedc Fixed #1345 2013-07-22 10:39:11 +00:00
886ef13bec Levels for WoG neutral creatures - fixes #1282.
Renamed Myriad and Medusa Queen (sic?) to Arctic & Lava Sharpshooter.
2013-07-12 19:13:39 +00:00
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
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
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
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
c6cc6e6301 Large changeset, first part of editing H3 objects via mods feature. Changes:
- loading of all objects (including H3 objects) will be directed by mod handlers
- common base for all handlers accessible from mod system (IHanderBase)
- json format changes: use struct with string ID's instead of vector

- fixed some gcc/clang errors and warnings
- fixed several cases of memory leaks and invalid memory access (mostly related to usage of bonus system and/or identifiers resolution)

Note that right now loading is much slower than before due to excessive json validation (or not fast enough validator)
2013-04-21 12:49:26 +00:00
0cf969d508 - console logger by default uses same format as previously (no extra data)
- a lot of changes in configs;
- - update to creature format - abilities are now json structure
- - multiple bugfixes revealed by validation
- made schemas a bit more strict
- creatures data can be replaced via mods
- it is possible to validate vcmi configs using schemas (disabled)
2013-04-11 19:24:14 +00:00
c7c2686379 - Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets 2013-04-09 14:31:36 +00:00
f686edc1b8 Cleanup
* simplify JSON values getting
* ensure initialization of Bonus fields
2013-03-14 17:21:16 +00:00
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +00:00
928d1d2121 - Some work on bonus system, effect range can be ignored. TODO: usage of bonus with any subtype.
- Fixed #1156
2013-02-26 09:36:21 +00:00
560315bc48 * SlotID refactoring 2013-02-16 14:03:47 +00:00
ceea466f54 [refactor] spell handling
* more config options for spells
  + mind immunity handled by config
  + direct damage immunity handled by config
  + immunity icon configurable
- removed mind_spell flag 
* more use of new spell identifacation
2013-02-13 19:35:43 +00:00
86dc9386d6 * refactoring, including a generic solution for IDs 2013-02-10 23:24:57 +00:00
f1c78e3260 * creature ID refactoring
* double week creatures are configurable now
2013-02-07 17:34:50 +00:00
3958364884 * a bit more work on campaigns; hero crossover still buggy 2013-02-06 10:16:44 +00:00
8ffd482324 - gcc compile fix
- mismatching enum (?) in HeroBonus
- probably fixed some cases of unaligned access
2013-02-05 19:56:28 +00:00
25663ce7af * fixed vector<bool> serialization
* refactoring
2013-02-04 19:43:16 +00:00
ba3075317f * proper bool serialization
* refactoring towards more enums/typedefs
2013-02-02 19:28:39 +00:00
c4e03ef0de * enum serialization/deserialization (si32 as basetype ought to be enough for anybody)
* some fields in classes refactored to use appropriate enums (not yet finished)
2013-02-01 22:04:25 +00:00
0e826915ed Fixed #1176. 2013-01-20 12:06:18 +00:00
79062eb15c - Parsing hero specialty is working (though complicated)
- Some obvious fixed for limiters, more work needed
2013-01-19 17:38:37 +00:00
97db289d3c Parsing for CREATURE_TYPE_LIMITER 2013-01-18 11:49:15 +00:00
d7c9377843 - Parsing propagators and limiters
- Experimental support for chaining limiters
- Added missing abilities, propagators and limiters to artifacts
- Sketch of Calculator for bonuses, ignore it for now
2013-01-16 13:02:01 +00:00
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
c0ce8712c1 add some missing licence headers 2012-12-19 14:54:10 +00:00