mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
* 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
This commit is contained in:
@@ -14,6 +14,7 @@ typedef si32 TResource;
|
||||
typedef si64 TResourceCap; //to avoid overflow when adding integers. Signed values are easier to control.
|
||||
|
||||
class JsonNode;
|
||||
class JsonSerializeFormat;
|
||||
|
||||
namespace Res
|
||||
{
|
||||
@@ -124,6 +125,8 @@ namespace Res
|
||||
h & static_cast<std::vector<int>&>(*this);
|
||||
}
|
||||
|
||||
DLL_LINKAGE void serializeJson(JsonSerializeFormat & handler, const std::string & fieldName);
|
||||
|
||||
DLL_LINKAGE void amax(const TResourceCap &val); //performs vstd::amax on each element
|
||||
DLL_LINKAGE void amin(const TResourceCap &val); //performs vstd::amin on each element
|
||||
DLL_LINKAGE void positive(); //values below 0 are set to 0 - upgrade cost can't be negative, for example
|
||||
|
||||
Reference in New Issue
Block a user