Skip to content

Commit

Permalink
Revert "automatically determine QuickSave slots"
Browse files Browse the repository at this point in the history
This reverts commit d646785.
  • Loading branch information
Franisz committed Mar 10, 2023
1 parent d646785 commit 7bbcead
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions zUtilities/QuickSave.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ namespace GOTHIC_ENGINE {
KeyQuickSave = GetEmulationKeyCode( zoptions->ReadString( PLUGIN_NAME, "KeyQuickSave", "KEY_F10" ) );
KeyQuickLoad = GetEmulationKeyCode( zoptions->ReadString( PLUGIN_NAME, "KeyQuickLoad", "KEY_F12" ) );

int SaveSlots = 0;
for ( int i = 0; i < zCMenuItem::itemList.GetNum(); i++ )
if ( zCMenuItem::itemList[i]->m_parOnSelAction_S[1] == "SAVEGAME_SAVE" )
SaveSlots++;

#if ENGINE >= Engine_G2
if ( SaveSlots == 0 ) SaveSlots = 20;
MinSaveSlot = zoptions->ReadInt( PLUGIN_NAME, "MinSaveSlot", 15 );
MaxSaveSlot = zoptions->ReadInt( PLUGIN_NAME, "MaxSaveSlot", 20 );
#else
if ( SaveSlots == 0 ) SaveSlots = 15;
MinSaveSlot = zoptions->ReadInt( PLUGIN_NAME, "MinSaveSlot", 10 );
MaxSaveSlot = zoptions->ReadInt( PLUGIN_NAME, "MaxSaveSlot", 15 );
#endif

MinSaveSlot = zoptions->ReadInt( PLUGIN_NAME, "MinSaveSlot", SaveSlots - 5 );
MaxSaveSlot = zoptions->ReadInt( PLUGIN_NAME, "MaxSaveSlot", SaveSlots );

switch ( Union.GetSystemLanguage() )
{
case Lang_Rus:
Expand Down Expand Up @@ -88,4 +82,4 @@ namespace GOTHIC_ENGINE {
};

QuickSave* quickSave;
}
}

0 comments on commit 7bbcead

Please sign in to comment.