From 88edfd4ef16bedd98a07a2142e693ab50fbdcef2 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 6 Jun 2021 09:59:33 +0200 Subject: Change: rework several CH_RIFF chunks to use CH_ARRAY instead This adds two byte extra to those chunks, and might feel a bit silly at first. But in later changes we will prefix CH_ARRAY with a table header, and then this change shines. Without this, we could still add headers to these chunks, but any external reader wouldn't know if the CH_RIFF has them or not. This way is much more practical, as they are now more like any other chunk. --- src/saveload/game_sl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/saveload/game_sl.cpp') diff --git a/src/saveload/game_sl.cpp b/src/saveload/game_sl.cpp index 76a81e167..48281ed66 100644 --- a/src/saveload/game_sl.cpp +++ b/src/saveload/game_sl.cpp @@ -57,14 +57,14 @@ static void Load_GSDT() /* Free all current data */ GameConfig::GetConfig(GameConfig::SSS_FORCE_GAME)->Change(nullptr); - if ((CompanyID)SlIterateArray() == (CompanyID)-1) return; + if (SlIterateArray() == -1) return; _game_saveload_version = -1; SlObject(nullptr, _game_script); if (_networking && !_network_server) { GameInstance::LoadEmpty(); - if ((CompanyID)SlIterateArray() != (CompanyID)-1) SlErrorCorrupt("Too many GameScript configs"); + if (SlIterateArray() != -1) SlErrorCorrupt("Too many GameScript configs"); return; } @@ -99,7 +99,7 @@ static void Load_GSDT() Game::StartNew(); Game::Load(_game_saveload_version); - if ((CompanyID)SlIterateArray() != (CompanyID)-1) SlErrorCorrupt("Too many GameScript configs"); + if (SlIterateArray() != -1) SlErrorCorrupt("Too many GameScript configs"); } static void Save_GSDT() -- cgit v1.2.3-54-g00ecf