Add tracerestrict SLXI version info and special case loading from

tracerestrict branch without SLXI.
This commit is contained in:
Jonathan G Rennison
2015-08-01 13:04:53 +01:00
parent bda3343107
commit d99ebb4976
2 changed files with 8 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ std::vector<uint32> _sl_xv_discardable_chunk_ids; ///< list of chunks
static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
{ XSLFI_TRACE_RESTRICT, XSCF_NULL, 1, 1, "tracerestrict", NULL, NULL, "TRRM,TRRP" },
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
};
@@ -118,7 +119,12 @@ void SlXvCheckSpecialSavegameVersions()
{
extern uint16 _sl_version;
// TODO: check for savegame versions
if (_sl_version == 2000) {
DEBUG(sl, 1, "Loading a trace restrict patch savegame version %d as version 194", _sl_version);
_sl_version = 194;
_sl_is_faked_ext = true;
_sl_xv_feature_versions[XSLFI_TRACE_RESTRICT] = 1;
}
}
/**

View File

@@ -21,6 +21,7 @@
*/
enum SlXvFeatureIndex {
XSLFI_NULL = 0, ///< Unused value, to indicate that no extended feature test is in use
XSLFI_TRACE_RESTRICT, ///< Trace restrict
XSLFI_SIZE, ///< Total count of features, including null feature
};