Skip to content

Commit

Permalink
Common: cut out deprecated RoomOptions::SaveLoadDisabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Oct 24, 2023
1 parent fc5cec3 commit 98c9504
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Common/game/room_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
3 changes: 1 addition & 2 deletions Common/game/roomstruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ namespace Common
{

RoomOptions::RoomOptions()
: SaveLoadDisabled(false)
, PlayerCharOff(false)
: PlayerCharOff(false)
, PlayerView(0)
, Flags(0)
{
Expand Down
3 changes: 0 additions & 3 deletions Common/game/roomstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ typedef std::shared_ptr<Bitmap> 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
Expand Down
2 changes: 0 additions & 2 deletions Editor/AGS.Native/agsnative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions Engine/ac/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 98c9504

Please sign in to comment.