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

133 Commits

Author SHA1 Message Date
O01eg
927eb33c11 Split IGameCallback to reduce memory required to debug compilation. 2014-04-19 21:44:21 +04:00
DjWarmonger
30b79588db - Moved gameState::guardingCreaturePosition() to CMap so it doesn't need to be recalculated many times for every player.
- Some optimizations with local cb pinter in VCAI.
2014-04-01 11:53:28 +00:00
beegee1
fe1b16a7ec Some preparation towards mantis #1743:
- refactored CRandomGenerator (added util methods, improved method names)
- usages of std::minstd_ran are replaced by CRandomGenerator (not in entire code base, C rand() usages are still not replaced)
- refactored getArtSync method of CArtHandler -> now named pickRandomArtifact
- fixed some compiler warnings
- updated source code URL in VCMI spec
2014-03-17 19:51:07 +00:00
Michał W. Urbańczyk
a6f68d6870 Fixed #1726. 2014-03-01 13:42:23 +00:00
DjWarmonger
a3cad2883f - Restored correct specialty serialization (#1599 and all its children)
- Fixed rare AI crash
- Fixed AI visiting some objects many times
- Some cleanup and refactoring
2014-02-17 17:28:39 +00:00
Ivan Savenko
f6c1dace6c Minors:
- By default, cmake will keep debug info
- removed warnings from adventure map infobox (part of #1636)
- adventure map infobox will refresh on artifact changes (part of #1636)
- moved terrain music files to terrains.json file
- player should act before AI in all games, not only campaigns
2013-12-28 18:57:08 +00:00
Ivan Savenko
3d3f93275d Multiple minor fixes:
- fixed starting armies of some heroes, including Bron #1602
- (debian) added vcmi-dbg package with debug information
- proper randomization of hero secondary skills, fixes #1603
- second capitol will show up as disabled immediately #1604
- proper deserialization of boost::variant
- empty file will no longer crash JsonNode parser
- fixed some compiler warnings
2013-12-03 09:03:37 +00:00
Ivan Savenko
ee1b0459e6 Extended building dependencies:
- buiding/structure lists must use object format. This may break some
outdated mods.
- generic support for logical expressions that consist from and/or/not
operators.
- string ID's for buidings are now actually used.
2013-12-02 11:58:02 +00:00
Ivan Savenko
27a30b5ff9 - compile fix
- fixed crash if json defines only one creature horde
2013-11-24 11:36:51 +00:00
Ivan Savenko
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
Michał W. Urbańczyk
141c1a9854 Not crash when asking callback about requirements for not existing building, fixing #1444 corrupted saves (for testing). 2013-09-07 16:57:31 +00:00
Ivan Savenko
76c77d58f6 const-ified CTown. May fix #1444 2013-09-06 21:57:16 +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
Michał W. Urbańczyk
9f5d1ba623 Fixed #1271. 2013-05-27 21:46:04 +00:00
Michał W. Urbańczyk
be7c2bd07f CGHeroInstance* can be serialized over network even when hero has been defeated. Strongly typed hero type ID introduced.
Should fix #1260.
2013-05-18 22:30:48 +00:00
Ivan Savenko
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
beegee1
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
beegee1
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00
alexvins
2eb8263e51 Basic Configuration for bonus types
* introduced new handler BonusTypeHandler
* config\bonusnames.json converted to common format and splitted info main and localizable parts
* hanlders initialization refactored
2013-03-06 18:49:56 +00:00
mateuszb
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +00:00
Michał W. Urbańczyk
d45a554fec Significant changes to saving system. Now both client and server store their lib part.
Desync detection upon loading. Fixed many desyncs. (more remain)
Monsters won't have creature count 0 even if that is set as creature properties.
2013-02-18 22:37:22 +00:00
mateuszb
560315bc48 * SlotID refactoring 2013-02-16 14:03:47 +00:00
mateuszb
9e00090c42 * refactoring, a few intriguing problems remain 2013-02-13 23:55:42 +00:00
alexvins
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
mateuszb
9c1a117c1c * refactoring 2013-02-12 22:24:48 +00:00
mateuszb
8a8eecd063 * refactoring 2013-02-11 19:11:34 +00:00
mateuszb
6ff7d61b91 * small fix 2013-02-11 16:07:29 +00:00
mateuszb
d540723739 * refactoring 2013-02-11 14:42:09 +00:00
mateuszb
86dc9386d6 * refactoring, including a generic solution for IDs 2013-02-10 23:24:57 +00:00
mateuszb
d03dbf64a6 * refactoring 2013-02-09 12:56:35 +00:00
mateuszb
f1c78e3260 * creature ID refactoring
* double week creatures are configurable now
2013-02-07 17:34:50 +00:00
mateuszb
3958364884 * a bit more work on campaigns; hero crossover still buggy 2013-02-06 10:16:44 +00:00
mateuszb
dc091a1ce1 * some work on hero crossover; still buggy 2013-02-05 23:16:13 +00:00
mateuszb
bda92a4a73 * refactoring
* fixed bug 1143
* some work on campaigns
2013-02-05 18:48:46 +00:00
mateuszb
8769f67c5d * JsonReader can convert to enums
* refactoring
2013-02-03 21:05:44 +00:00
DjWarmonger
beb1ca1bf8 - getDate function now uses enum for different modes
- Fixed Black Market (#1195)
- Fixed one-week bonuses removed eveyr day (#976)
2013-02-02 08:29:57 +00:00
alexvins
4bc2fd5519 [c::b] renamed map subfolder to workaround dependency tracking bug 2013-01-03 12:19:20 +00:00
beegee1
53169abea7 - Foundation for starting a random map is done - Moved StdInc.h to header file in some /Map and /RMG compilation units(better syntax highlighting, should have no negative impact) 2012-11-20 17:53:45 +00:00
mateuszb
100dad889a * much better callback function declaration (previous version inspired me to write a new coding guideline) 2012-11-14 21:19:32 +00:00
DjWarmonger
a7cea94247 - Hopefully fixed #1103
- Fixed #1137
2012-11-14 14:27:18 +00:00
beegee1
105083dd70 * Code convention updates * Default values for CMap types * Updated BinaryReader c-tor * Converted "bool" int types to bool in CMap classes * Removed map event operators in favor of member methods 2012-11-06 16:39:29 +00:00
beegee1
a878f5f79a * Separated map loading from the map object * Moved map classes to lib/Map * Renamed map.h/cpp to CMap.h/cpp * Profiling of map loading is now optional * Updated CMemoryStream 2012-11-03 13:30:47 +00:00
beegee1
720deba838 * Added comments to map.h * Refactoring(renamed attributes, some steps towards coding guidelines, ..) 2012-10-26 17:51:05 +00:00
mateuszb
59fcc15254 * last revision reverted, mysterious bug 2012-09-24 18:52:30 +00:00
mateuszb
55f1c47c16 * more TPlayerColor/TResource 2012-09-24 17:00:18 +00:00
mateuszb
18bd898cb1 * fixed bug when starting certain maps in campaigns
* introduced TPlayerColor typedef
2012-09-24 16:14:53 +00:00
mateuszb
6a81c8b1af * campaign against magic numbers
* ArtifactID was misleading and wrongly used in one place -- renamed and fixed
* minor changes
2012-09-23 18:01:04 +00:00
Ivan Savenko
3fcba4fb5c - fixed crash on start of some campaigns
- allowed on map factions is now set instead of bit field
2012-09-23 14:32:49 +00:00
Ivan Savenko
a138db7c9e - removed lib headers from PCH
- fixed #1062
- correct terrain penalty check
2012-09-06 10:39:48 +00:00