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

120 Commits

Author SHA1 Message Date
Dmitry Orlov
f4816b0824 Mod system improvement Part I : Special buildings should work in the modders towns 2020-10-07 12:35:11 +03:00
John Bolton
d7e82c1087 Fixed a bad fix. Fixed more warnings.
These warnings have not been fixed because the are legitimate and/or I don't know how to fix them:

test\googletest\googletest\include\gtest/gtest-printers.h(888,43): warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED.
lib\serializer\JsonSerializeFormat.h(523,26): warning C4244: 'argument': conversion from 'type1' to 'type2', possible loss of data
include\boost/iostreams/positioning.hpp(96,15): warning C4996: 'std::fpos<_Mbstatet>::seekpos': warning STL4019: The member std::fpos::seekpos() is non-Standard, ...
source\lib\filesystem\FileStream.h(39,69): warning C4910: 'boost::iostreams::stream<FileBuf,std::char_traits<char>,std::allocator<char>>': '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
include\boost/optional/optional.hpp(274,53): warning C4244: 'argument': conversion from 'T' to 'T', possible loss of data
client\widgets\../gui/SDL_Extensions.h(112,14): warning C4244: 'initializing': conversion from 'type1' to 'type2', possible loss of data
client\CServerHandler.cpp(421,24): warning C4834: discarding return value of function with 'nodiscard' attribute (see https://bugs.vcmi.eu/view.php?id=3144)
client\CVideoHandler.cpp(130,25): warning C4996: 'AVStream::codec': was declared deprecated
2020-10-04 16:26:45 -07: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
Dmitry Orlov
30426b6a44 Fix: Random map generator crashes when nativeTerrain is not specified in the mod 2020-09-24 10:10:32 +03: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
AlexVinS
d6f889f08a Setup town`s war machine in finalization step
* fixes https://bugs.vcmi.eu/view.php?id=2969
2018-07-16 15:16:55 +03:00
Michał Kalinowski
26a222ac62 Change JsonType to enum class (#393)
Change enum JsonType to enum class JsonType
2017-11-27 00:18:18 +03:00
AlexVinS
c39cd5f951 Town building build mode fixes
* CGameHandler::buildStructure was using wrong requirements for buildings in auto mode.
* Build mode loading was wrong in case of omitted value
* Show town hall slot for not built building only if it have normal build mode
2017-10-28 03:27:39 +03:00
Henning Koehler
03b7da93e2 use logMod for all mod-related logging 2017-08-31 09:23:19 +12:00
Henning Koehler
c0740e3623 fixed crash when loading neutral faction; skills.json no longer requires index values 2017-08-26 10:08:06 +12:00
AlexVinS
046e1a7c29 Prepared JsonNode for new logging API. 2017-08-11 16:27:42 +03:00
AlexVinS
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +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
AlexVinS
a31c28ec33 Unified war machine mechanics.
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
AlexVinS
c66c66c5ae Fixed https://bugs.vcmi.eu/view.php?id=2686 2017-05-29 12:42:23 +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
AlexVinS
3216422307 Fixed a few CWE-457 2016-11-27 22:07:01 +03:00
AlexVinS
cd5c0b3297 Style tweaks. 2016-10-02 15:22:55 +03:00
Arseniy Shestakov
452e28d183 Remove some useless includes found by cppclean
This of course was tested and shouldn't break anything
2016-08-26 04:42:16 +03:00
AlexVinS
2021decb91 Serialize town spells 2016-02-25 22:59:17 +03:00
AlexVinS
53b5587c2e Advance map header serialization 2016-02-21 21:21:22 +03:00
AlexVinS
ec760632a6 Advance Json serializer
* added bool, numeric and string support
* added some enum support
* PoC implementation of logical id condition
* Refactoring
2016-02-15 12:21:39 +03:00
AlexVinS
6e205a58b4 Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
Conflicts:
	lib/VCMI_lib.cbp
	lib/filesystem/CZipLoader.cpp
	lib/filesystem/CZipLoader.h
	lib/mapObjects/CGTownInstance.cpp
2016-02-04 10:27:51 +03:00
Arseniy Shestakov
75f278b913 moatHexes: use initializer list and update comment 2016-01-29 19:25:25 +03:00
Arseniy Shestakov
8c39ecf538 moatHexes: add saves and mods compatability 2016-01-28 01:35:01 +03:00
Arseniy Shestakov
c93f8fea48 moatHexes: implement reading moat hexes from configuration files
This also fix Fortess moat that previously used wrong hexes
2016-01-06 12:53:40 +03:00
AlexVinS
6f203fb7e2 Save string identifiers for all game objects 2015-12-05 12:36:39 +03:00
Ivan Savenko
f9d9a38e53 Fixed gcc warnings 2015-12-02 20:59:38 +02:00
AlexVinS
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
DjWarmonger
ce83db0f43 - Option to configure monster types spawning in a zone
- 25% chance to get neutral faction in zone with no town
2014-10-30 13:03:53 +01:00
Ivan Savenko
33acdc51bb Fixes 1852 - fixed typo in tower config and added check to detect such cases 2014-08-04 14:47:42 +03:00
Ivan Savenko
bac83d8bd0 Compatiblity for last version of Cove (and likely any other town mods) 2014-06-27 00:07:09 +03:00
Ivan Savenko
7c52db923a Removed mods compatibility code from 0.95 2014-06-23 20:47:09 +03:00
Ivan Savenko
06d17f709d fixed compatibility code for resource-granting buildings 2014-06-23 20:47:09 +03:00
Ivan Savenko
09d595e385 - Implemented "mapObject" entry for hero classes
- Updated schemas
- Some bugfixing
2014-06-16 19:27:26 +03:00
Ivan Savenko
89b89ff85d Bugfixing. Game seems to be working without major bugs. 2014-06-15 23:25:10 +03:00
Ivan Savenko
836c466f81 - Implementation of overrides for towns
- Converted dwellings.json into new format
- Implemented "mapObject" entry in town format
- Removed capital/fort/village fields from town in favor of overrides
2014-06-15 19:43:01 +03:00
Ivan Savenko
44742814cd More cleanup:
- moved SoundBase.h to lib since it contains shared data
- added RMG info to object format. Note that data is not yet imported in
configs
- slightly updated API of object handlers
2014-06-05 23:51:24 +03:00
Ivan Savenko
0afdfa529c Moved all object-related files to lib/mapObjects directory.
Renamed some classes to more readable names
2014-06-05 14:19:47 +03:00
Ivan Savenko
7e057b6df8 Bugfixing, game can finally load to main menu without crash 2014-06-04 11:25:13 +03:00
Ivan Savenko
32b6568b65 Merged changes from upstream and fixed compilation caused by API changes 2014-06-03 22:45:18 +03:00
Ivan Savenko
7f276185bd Moving files:
- new config for objects (config/objects/generic.json)
- renamed lib/CDefObjectHandler to lib/CObjectClassesHandler
2014-05-24 02:07:54 +03:00
DjWarmonger
4ea9810831 First version that works:
- Covered RMG with exceptions
- Fixes for object randomization & placement
2014-05-23 17:12:31 +02:00
Ivan Savenko
b5160acbac Finalization of object type handler interface
- updated code to use new interface
- removed old DefObjHandler (todo - rename file)

Summary:
- most code but loading is now in place
- type names may deserve improvements (some of them are too similar)
- still barely compiles and not tested
2014-05-16 23:50:02 +03:00
Macron1Robot
7c1d3d17fc Update CTownHandler.cpp
Corrected hadling of null "produce" section for legacy mod to make it more readable
2014-04-28 10:48:00 +04:00
Macron1Robot
907caedb13 Added "produce" section in "building" structure. Changed dailyIncome. 2014-04-26 18:23:35 +04:00
Macron1Robot
b7b890acff Added "tavernVideo","guildBackground" to "faction" JSON config and schema. If "primaryResource" is set to "gold", silo will generate 500 gold per day 2014-04-24 23:36:18 +04:00
Ivan Savenko
2c4c964a45 Large rewrite of adventure map objects:
- replaced CDefObjInfo with ObjectTemplate class
- ObjectTempate is a direct member of objects instead of pointer with
shared ownership across CMap, handler and game objects
- simplified handling of objects that can change appearance (e.g. towns)
- all object queries regarding object appearance/blockmaps use h3m pos
instead of relative positions
- removed need of modhandler::reload
- cleanup of some old code
2014-01-02 23:48:38 +00:00