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,
|
|
|
|
|
2024-08-29 20:51:53 +02:00
|
|
|
RELEASE_150 = 840,
|
|
|
|
MINIMAL = RELEASE_150,
|
2024-05-11 15:09:12 +02:00
|
|
|
|
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-08-12 12:36:49 +02:00
|
|
|
RELEASE_156 = 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-10 15:27:22 +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-08-10 15:50:45 +02:00
|
|
|
CAMPAIGN_REGIONS, // 853 - configurable campaign regions
|
2024-08-12 12:36:49 +02:00
|
|
|
EVENTS_PLAYER_SET, // 854 - map & town events use std::set instead of bitmask to store player list
|
2024-08-16 14:57:38 +02:00
|
|
|
NEW_TOWN_BUILDINGS, // 855 - old bonusing buildings have been removed
|
2024-08-20 20:25:16 +02:00
|
|
|
STATISTICS_SCREEN, // 856 - extent statistic functions
|
2024-08-26 22:52:37 +02:00
|
|
|
NEW_MARKETS, // 857 - reworked market classes
|
2024-08-26 20:55:15 +02:00
|
|
|
PLAYER_STATE_OWNED_OBJECTS, // 858 - player state stores all owned objects in a single list
|
2024-08-29 20:51:53 +02:00
|
|
|
SAVE_COMPATIBILITY_FIXES, // 859 - implementation of previoulsy postponed changes to serialization
|
2024-08-31 16:18:52 +02:00
|
|
|
CHRONICLES_SUPPORT, // 860 - support for heroes chronicles
|
2024-08-31 13:00:36 +02:00
|
|
|
PER_MAP_GAME_SETTINGS, // 861 - game settings are now stored per-map
|
2024-09-09 23:09:44 +02:00
|
|
|
CAMPAIGN_OUTRO_SUPPORT, // 862 - support for campaign outro video
|
2024-08-30 17:24:13 +02:00
|
|
|
REWARDABLE_BANKS, // 863 - team state contains list of scouted objects, coast visitable rewardable objects
|
2024-09-24 11:23:10 +02:00
|
|
|
REGION_LABEL, // 864 - labels for campaign regions
|
2024-09-28 01:18:10 +02:00
|
|
|
SPELL_RESEARCH, // 865 - spell research
|
2024-05-07 16:50:21 +02:00
|
|
|
|
2024-09-28 01:18:10 +02:00
|
|
|
CURRENT = SPELL_RESEARCH
|
2024-01-20 20:34:51 +02:00
|
|
|
};
|