From 02e2627765feef59ffb8bfd61b095a23152000bb Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 31 Jan 2019 18:11:31 +0000 Subject: [PATCH] Extend documentation in extended_ver_sl.cpp Correct typo --- src/saveload/extended_ver_sl.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/saveload/extended_ver_sl.cpp b/src/saveload/extended_ver_sl.cpp index 85887630c8..140581dbce 100644 --- a/src/saveload/extended_ver_sl.cpp +++ b/src/saveload/extended_ver_sl.cpp @@ -26,6 +26,15 @@ * N bytes extra data * uint32* chunk ID list count [only present iff feature flags & XSCF_CHUNK_ID_LIST_PRESENT] * N x uint32 chunk ID list + * + * Extended features as recorded in the SLXI chunk, above, MAY add, remove, change, or otherwise modify fields in chunks + * not owned by the feature and therefore not listed in the sub chunk/feature information in the SLXI chunk. + * In this case the XSCF_IGNORABLE_UNKNOWN flag SHOULD NOT be set, as it is not possible to correctly load the modified chunk without + * knowledge of the feature. + * In the case where the modifications to other chunks vary with respect to lower feature versions, the XSCF_IGNORABLE_VERSION flag + * also SHOULD NOT be set. + * Use of the XSCF_IGNORABLE_UNKNOWN and XSCF_IGNORABLE_VERSION flags MUST ONLY be used in the cases where the feature and any + * associated chunks can be cleanly dropped, and the savegame can be correctly loaded by a client with no knowledge of the feature. */ #include "../stdafx.h" @@ -39,10 +48,10 @@ uint16 _sl_xv_feature_versions[XSLFI_SIZE]; ///< array of all known feature types and their current versions bool _sl_is_ext_version; ///< is this an extended savegame version, with more info in the SLXI chunk? -bool _sl_is_faked_ext; ///< is this a faked extended savegame version, with no SLXI chunk? +bool _sl_is_faked_ext; ///< is this a faked extended savegame version, with no SLXI chunk? See: SlXvCheckSpecialSavegameVersions. std::vector _sl_xv_discardable_chunk_ids; ///< list of chunks IDs which we can discard if no chunk loader exists -static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk +static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version of SLXI chunk const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = { { XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker