1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

vcmi: modernize lib/mapping

This commit is contained in:
Konstantin
2023-02-11 19:30:06 +03:00
parent 7bfb37df4d
commit b16f66477c
18 changed files with 294 additions and 363 deletions

View File

@@ -60,11 +60,11 @@ protected:
CMapFormatJson();
static TerrainType * getTerrainByCode( std::string code);
static RiverType * getRiverByCode( std::string code);
static RoadType * getRoadByCode( std::string code);
static TerrainType * getTerrainByCode(const std::string & code);
static RiverType * getRiverByCode(const std::string & code);
static RoadType * getRoadByCode(const std::string & code);
void serializeAllowedFactions(JsonSerializeFormat & handler, std::set<TFaction> & value);
void serializeAllowedFactions(JsonSerializeFormat & handler, std::set<TFaction> & value) const;
///common part of header saving/loading
void serializeHeader(JsonSerializeFormat & handler);
@@ -95,12 +95,12 @@ protected:
/**
* Reads one of triggered events
*/
void readTriggeredEvent(TriggeredEvent & event, const JsonNode & source);
void readTriggeredEvent(TriggeredEvent & event, const JsonNode & source) const;
/**
* Writes one of triggered events
*/
void writeTriggeredEvent(const TriggeredEvent & event, JsonNode & dest);
void writeTriggeredEvent(const TriggeredEvent & event, JsonNode & dest) const;
void writeDisposedHeroes(JsonSerializeFormat & handler);
@@ -132,7 +132,7 @@ public:
*
* @param stream. A stream containing the map data.
*/
CMapPatcher(JsonNode stream);
CMapPatcher(const JsonNode & stream);
public: //IMapPatcher
/**