From 98c9504da7aa61ee2f6e70e2c6d8d8f65651bc70 Mon Sep 17 00:00:00 2001 From: Ivan Mogilko Date: Tue, 24 Oct 2023 04:45:00 +0300 Subject: [PATCH] Common: cut out deprecated RoomOptions::SaveLoadDisabled --- Common/game/room_file.cpp | 4 ++-- Common/game/roomstruct.cpp | 3 +-- Common/game/roomstruct.h | 3 --- Editor/AGS.Native/agsnative.cpp | 2 -- Engine/ac/game.cpp | 8 -------- 5 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Common/game/room_file.cpp b/Common/game/room_file.cpp index 7505c394b1f..4a1116bf28f 100644 --- a/Common/game/room_file.cpp +++ b/Common/game/room_file.cpp @@ -184,7 +184,7 @@ HError ReadMainBlock(RoomStruct *room, Stream *in, RoomFileVersion data_ver) in->Seek(LEGACY_ROOM_PASSWORD_LENGTH); // skip password in->ReadInt8();// [DEPRECATED] - room->Options.SaveLoadDisabled = in->ReadInt8() != 0; + in->ReadInt8();// [DEPRECATED] room->Options.PlayerCharOff = in->ReadInt8() != 0; room->Options.PlayerView = in->ReadInt8(); in->ReadInt8();// [DEPRECATED] @@ -530,7 +530,7 @@ void WriteMainBlock(const RoomStruct *room, Stream *out) out->WriteByteCount(0, LEGACY_ROOM_PASSWORD_LENGTH); out->WriteInt8(0);// [DEPRECATED] - out->WriteInt8(room->Options.SaveLoadDisabled ? 1 : 0); + out->WriteInt8(0);// [DEPRECATED] out->WriteInt8(room->Options.PlayerCharOff ? 1 : 0); out->WriteInt8(room->Options.PlayerView); out->WriteInt8(0);// [DEPRECATED] diff --git a/Common/game/roomstruct.cpp b/Common/game/roomstruct.cpp index cbf645b40b9..d8c2bad8a18 100644 --- a/Common/game/roomstruct.cpp +++ b/Common/game/roomstruct.cpp @@ -23,8 +23,7 @@ namespace Common { RoomOptions::RoomOptions() - : SaveLoadDisabled(false) - , PlayerCharOff(false) + : PlayerCharOff(false) , PlayerView(0) , Flags(0) { diff --git a/Common/game/roomstruct.h b/Common/game/roomstruct.h index e71b16d17e3..cc521227b37 100644 --- a/Common/game/roomstruct.h +++ b/Common/game/roomstruct.h @@ -104,9 +104,6 @@ typedef std::shared_ptr PBitmap; // Various room options struct RoomOptions { - // If saving and loading game is disabled in the room; - // this is a deprecated option that affects only built-in save/load dialogs - bool SaveLoadDisabled; // If player character is turned off in the room bool PlayerCharOff; // Apply player character's normal view when entering this room diff --git a/Editor/AGS.Native/agsnative.cpp b/Editor/AGS.Native/agsnative.cpp index 48e06b9da1c..76429310607 100644 --- a/Editor/AGS.Native/agsnative.cpp +++ b/Editor/AGS.Native/agsnative.cpp @@ -2791,7 +2791,6 @@ void convert_room_from_native(const RoomStruct &rs, Room ^room, System::Text::En room->LeftEdgeX = rs.Edges.Left; room->PlayerCharacterView = rs.Options.PlayerView; room->RightEdgeX = rs.Edges.Right; - room->SaveLoadEnabled = (rs.Options.SaveLoadDisabled == 0); room->ShowPlayerCharacter = (rs.Options.PlayerCharOff == 0); room->TopEdgeY = rs.Edges.Top; room->Width = rs.Width; @@ -2905,7 +2904,6 @@ void convert_room_to_native(Room ^room, RoomStruct &rs) rs.Edges.Left = room->LeftEdgeX; rs.Options.PlayerView = room->PlayerCharacterView; rs.Edges.Right = room->RightEdgeX; - rs.Options.SaveLoadDisabled = false; // [OBSOLETE] rs.Options.PlayerCharOff = room->ShowPlayerCharacter ? 0 : 1; rs.Edges.Top = room->TopEdgeY; rs.Width = room->Width; diff --git a/Engine/ac/game.cpp b/Engine/ac/game.cpp index e9f634dc210..404e91a74e9 100644 --- a/Engine/ac/game.cpp +++ b/Engine/ac/game.cpp @@ -399,10 +399,6 @@ const char* Game_GetSaveSlotDescription(int slnum) { void restore_game_dialog() { can_run_delayed_command(); - if (thisroom.Options.SaveLoadDisabled == 1) { - // DisplayMessage(983); FIXME: remove deprecated SaveLoadDisabled - return; - } if (inside_script) { curscript->queue_action(ePSARestoreGameDialog, 0, "RestoreGameDialog"); return; @@ -420,10 +416,6 @@ bool do_restore_game_dialog() { } void save_game_dialog() { - if (thisroom.Options.SaveLoadDisabled == 1) { - // DisplayMessage(983); FIXME: remove deprecated SaveLoadDisabled - return; - } if (inside_script) { curscript->queue_action(ePSASaveGameDialog, 0, "SaveGameDialog"); return;