2024-01-20 20:34:51 +02:00
|
|
|
/*
|
|
|
|
* ESerializationVersion.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2024-01-20 23:26:04 +02:00
|
|
|
/// This enumeration controls save compatibility support.
|
|
|
|
/// - 'MINIMAL' represents the oldest supported version counter. A saved game can be loaded if its version is at least 'MINIMAL'.
|
|
|
|
/// - 'CURRENT' represents the current save version. Saved games are created using the 'CURRENT' version.
|
2024-01-20 20:34:51 +02:00
|
|
|
///
|
2024-01-20 23:26:04 +02:00
|
|
|
/// To make a save-breaking change:
|
|
|
|
/// - change 'MINIMAL' to a value higher than 'CURRENT'
|
|
|
|
/// - remove all keys in enumeration between 'MINIMAL' and 'CURRENT' as well as all their usage (will be detected by compiler)
|
2024-01-20 20:34:51 +02:00
|
|
|
/// - change 'CURRENT' to 'CURRENT = MINIMAL'
|
|
|
|
///
|
2024-01-20 23:26:04 +02:00
|
|
|
/// To make a non-breaking change:
|
2024-01-20 20:34:51 +02:00
|
|
|
/// - add new enumeration value before 'CURRENT'
|
2024-01-20 23:26:04 +02:00
|
|
|
/// - change 'CURRENT' to 'CURRENT = NEW_TEST_KEY'.
|
2024-01-20 20:34:51 +02:00
|
|
|
///
|
|
|
|
/// To check for version in serialize() call use form
|
|
|
|
/// if (h.version >= Handler::Version::NEW_TEST_KEY)
|
|
|
|
/// h & newKey; // loading/saving save of a new version
|
|
|
|
/// else
|
|
|
|
/// newKey = saneDefaultValue; // loading of old save
|
|
|
|
enum class ESerializationVersion : int32_t
|
|
|
|
{
|
|
|
|
NONE = 0,
|
|
|
|
|
|
|
|
MINIMAL = 831,
|
2024-05-29 22:08:32 +02:00
|
|
|
|
2024-01-20 23:26:04 +02:00
|
|
|
RELEASE_143, // 832 +text container in campaigns, +starting hero in RMG options
|
2024-01-20 20:34:51 +02:00
|
|
|
HAS_EXTRA_OPTIONS, // 833 +extra options struct as part of startinfo
|
2024-01-31 01:37:33 +02:00
|
|
|
DESTROYED_OBJECTS, // 834 +list of objects destroyed by player
|
2024-02-13 15:20:08 +02:00
|
|
|
CAMPAIGN_MAP_TRANSLATIONS, // 835 +campaigns include translations for its maps
|
|
|
|
JSON_FLAGS, // 836 json uses new format for flags
|
2024-06-24 03:23:26 +02:00
|
|
|
MANA_LIMIT, // 837 change MANA_PER_KNOWLEDGE to percentage
|
2024-04-09 15:42:20 +02:00
|
|
|
BONUS_META_STRING, // 838 bonuses use MetaString instead of std::string for descriptions
|
2024-04-26 12:16:02 +02:00
|
|
|
TURN_TIMERS_STATE, // 839 current state of turn timers is serialized
|
2024-04-28 19:54:33 +02:00
|
|
|
ARTIFACT_COSTUMES, // 840 swappable artifacts set added
|
2024-01-20 20:34:51 +02:00
|
|
|
|
2024-05-11 15:09:12 +02:00
|
|
|
RELEASE_150 = ARTIFACT_COSTUMES, // for convenience
|
|
|
|
|
2024-05-19 19:12:29 +02:00
|
|
|
VOTING_SIMTURNS, // 841 - allow modification of simturns duration via vote
|
2024-05-29 22:08:32 +02:00
|
|
|
REMOVE_TEXT_CONTAINER_SIZE_T, // 842 Fixed serialization of size_t from text containers
|
|
|
|
BANK_UNIT_PLACEMENT, // 843 Banks have unit placement flag
|
2024-05-11 15:09:12 +02:00
|
|
|
|
2024-05-29 22:08:32 +02:00
|
|
|
RELEASE_152 = BANK_UNIT_PLACEMENT,
|
2024-05-21 16:11:40 +02:00
|
|
|
|
2024-06-24 03:23:26 +02:00
|
|
|
COMPACT_STRING_SERIALIZATION, // 844 - optimized serialization of previously encountered strings
|
2024-05-31 11:34:21 +02:00
|
|
|
COMPACT_INTEGER_SERIALIZATION, // 845 - serialize integers in forms similar to protobuf
|
|
|
|
REMOVE_FOG_OF_WAR_POINTER, // 846 - fog of war is serialized as reference instead of pointer
|
|
|
|
SIMPLE_TEXT_CONTAINER_SERIALIZATION, // 847 - text container is serialized using common routine instead of custom approach
|
2024-06-29 13:13:59 +02:00
|
|
|
MAP_FORMAT_ADDITIONAL_INFOS, // 848 - serialize new infos in map format
|
2024-06-01 18:09:14 +02:00
|
|
|
REMOVE_LIB_RNG, // 849 - removed random number generators from library classes
|
2024-07-26 03:33:44 +02:00
|
|
|
HIGHSCORE_PARAMETERS, // 850 - saves parameter for campaign
|
2024-08-01 21:39:40 +02:00
|
|
|
PLAYER_HANDICAP, // 851 - player handicap selection at game start
|
2024-08-01 23:37:45 +02:00
|
|
|
STATISTICS, // 852 - removed random number generators from library classes
|
2024-05-07 16:50:21 +02:00
|
|
|
|
2024-07-27 02:11:26 +02:00
|
|
|
CURRENT = STATISTICS
|
2024-01-20 20:34:51 +02:00
|
|
|
};
|