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

236 Commits

Author SHA1 Message Date
DjWarmonger
e6bb39d3a4 More work on VCAI Goals, still derived functions are not called :/ 2013-11-23 12:30:10 +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
Ivan Savenko
ee6cdbeffe went through the rest of cppcheck warnings, mostly harmless 2013-11-07 12:48:41 +00:00
Ivan Savenko
71d6b0fea9 - Fixed some warnings from cppcheck
- Minor improvements to JSON validation
- Cleanup in SDL_Extensions.cpp
- Implemented new propery for creature format: idle animation duration
- Disabled idle animation of some of conflux creatures (was clearly
broken)
2013-11-06 13:42:58 +00:00
Ivan Savenko
0e3eae3095 patch from KroArtem 2013-11-03 12:51:25 +00:00
Ivan Savenko
6cb3cb006d Several minor fixes/features
- moved all traslatable strings into one json file, removed threats.txt file
- implemented "spellbook animation" option
- fixed missing central tower when attacking fort
2013-10-27 13:05:01 +00:00
Michał W. Urbańczyk
f927bca146 Index for pyramid. 2013-10-13 16:05:41 +00:00
Michał W. Urbańczyk
30a0237fb8 Merged the 092c-compat branch. 2013-09-28 12:31:06 +00:00
Michał W. Urbańczyk
0abbe71b25 Merged fixes from the branch. 2013-09-28 00:58:33 +00:00
Michał W. Urbańczyk
0e5a59e2a5 Changes related to #1444 — fixing affected savegames, assert to detect when things go wrong. 2013-09-27 15:20:42 +00:00
Ivan Savenko
208df34fc2 bigfixing & new file: launcher/jsonutils.cpp
- launcher uses json parser from vcmi lib instead of one from Qt #1469
- fixed abilities overrides for some creatures #1476
- fixed hero portraits in seer huts #1402
- ttf fonts will render text in utf-8 mode. Not really useful at this point
- new settings entry, available in launcher: encoding. Unused for now.
2013-09-21 18:29:26 +00:00
DjWarmonger
d06b02638b Partially implemented #481 2013-09-17 12:02:33 +00:00
DjWarmonger
39f9069ed9 Implemented deterministic secondary skills, #1166. 2013-09-09 15:23:59 +00:00
Ivan Savenko
76c77d58f6 const-ified CTown. May fix #1444 2013-09-06 21:57:16 +00:00
Ivan Savenko
0a627698d8 - fixes crash on giving banned skills to hero (partial #1427)
- fixes hover text for prisons - they should not display name of imprisoned hero
- missing bits for launcher, Linux-specific
2013-09-04 23:00:51 +00:00
Michał W. Urbańczyk
6fc87d0df1 Fixed #1426. 2013-09-04 22:57:41 +00:00
Michał W. Urbańczyk
a2610de87d Fixed #1385 (and possible some related issues) 2013-09-03 13:18:09 +00:00
Ivan Savenko
c81a31c74a - catapult attacks should be identical to H3
- catapult may miss and attack another part of wall instead (this is how it works in H3)
- minor fixes
2013-08-06 11:20:28 +00:00
Ivan Savenko
ee09c5301e minor fixes:
- vcmi can play music files from archives
- converted resource_reward fields in bank_config into json object, fixes 3000 gems reward in shipwreck
- some compile fixes for minizip
2013-07-31 11:36:42 +00:00
Ivan Savenko
b87897096c Filesystem handling is now more flexible
- removed CResourceLoader class in favor of one that implements resource loader interface
- removed global pool of files, in favour of more dynamic approach
- renamed some files to match current situation
All these changes are needed mostly for future mod manager + .zip support
2013-07-28 14:49:50 +00:00
DjWarmonger
66d6aebe32 Fixed all the issues with Quests, #828 and #1223.
Upgrade cost will never be negative.
2013-07-23 15:03:01 +00:00
DjWarmonger
b1a569910b Fixed #1378. 2013-07-23 05:41:42 +00:00
Ivan Savenko
a719e03b30 - fixed #1375
- damage done by turrets is properly increased by built buldings
2013-07-22 16:23:23 +00:00
DjWarmonger
103a75e763 Possible fix for #1348 2013-07-22 09:48:25 +00:00
Ivan Savenko
491bd557ef fixed several bugs reported on forum:
- necromancy issues
- fix for lookout tower
- Sir Mullich is unavailable
- first hero is awakened on next turn
- give 500 XP on defeating hero
2013-07-21 18:27:33 +00:00
Michał W. Urbańczyk
e9d51a2670 Fixed issue that allowed to build multiple boats in town. Renamed state() to sth more sensible. 2013-07-21 10:08: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
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
Michał W. Urbańczyk
f95e6c233b It is possible to set on visit query that object is to be removed after visit is over.
Fixes #1263.
2013-05-14 13:42:52 +00:00
DjWarmonger
a7ed3ee3d0 Fixed #987 2013-04-27 08:11:20 +00:00
Ivan Savenko
8273f323b1 - it is possible to edit data of another mod or H3 data via mods
- mods can access only ID's from dependenies, virtual "core" mod and itself (optional for some mods compatibility)
- metadata field for JsonNode, used to track source mod
- moved wog creatures into wog mod
- (linux) convertMP3 option for vcmibuilder for systems where SDL_Mixer can't play mp3's
2013-04-25 14:03:35 +00:00
Ivan Savenko
3285f1910b - finally, solution for imageIndex fields. All image lists will be generated in runtime
- iconIndex fields from json are no longer used
- simple check for missing icons on startup
2013-04-22 19:51:22 +00:00
DjWarmonger
a9cfb4bddb Refactoring, fixed #1255 2013-04-22 13:23:53 +00:00
Ivan Savenko
4db13ba845 - proper destructors for handlers and lib objects 2013-04-21 16:38:31 +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
Michał W. Urbańczyk
d1d67caa0b Get rid of some old serialization workaround code that is not needed because serializer was improved in the meantime.
Fixing #1254.
Fixed possible race causing corruption of the server savegame.
2013-04-20 18:44:55 +00:00
Michał W. Urbańczyk
e8354908c3 Big change: Introduced new mechanism to handle queries. It should not cause any visible changes ATM apart from fixing several long-standing bugs realted to handling post-visit/battle/levelup callback, including infamous creature bank issues: #955, #1053, #1063, #1191. Needs testing.
Minor changes:
* default log level set to trace
* LOG_TRACE raii guardian lifetime will last till the end of block
* compile fixes
* minor refactorings
2013-04-20 11:34:01 +00:00
beegee1
f10ba48c77 - Fully integrated new logging API(ERM, Editor, missing parts) - Removed old logger 2013-04-11 15:58:01 +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
Ivan Savenko
c927913f5f - Improved json validation. Now it support most of features from latest json schema draft
- Set of schemas in config/schemas directory that are used to validate input from mods.
2013-04-02 17:06:43 +00:00
DjWarmonger
c8bb363a45 Fixed Death Stare of Commanders, additional tweaks. 2013-03-30 20:09:50 +00:00
Ivan Savenko
a9fe9e9e8b - fixed #1229 and #1245 2013-03-29 19:15:52 +00:00
Ivan Savenko
c4c592b773 - bugfixing: #1243, #1227, #1241, #1236, #1233 2013-03-14 20:44:00 +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
Ivan Savenko
f306d7bb70 some changes towards editing H3 objects via mods. Should be stable, report if not.
- removed duplicated json loading code in handlers
- simpler and mod-friendly handling of combined artifacts
- reorganized CCreature to avoid huge number of fields in one structure
2013-03-02 16:55:51 +00:00