mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-13 14:07:04 +03:00
Preserve load/save slot selection through inventory menu; exit inv if user saves;
This commit is contained in:
parent
b9de4dc794
commit
912ebbc64d
2 changed files with 10 additions and 5 deletions
|
@ -2844,13 +2844,11 @@ void InventoryClass::handle_inventry_menu()
|
|||
case MENU_TYPE_LOAD:
|
||||
//fill_up_savegames_array//or maybe not?
|
||||
invMode = IM_LOAD;
|
||||
selected_slot = 0;
|
||||
break;
|
||||
|
||||
case MENU_TYPE_SAVE:
|
||||
//fill_up_savegames_array
|
||||
invMode = IM_SAVE;
|
||||
selected_slot = 0;
|
||||
break;
|
||||
|
||||
case MENU_TYPE_EXAMINE:
|
||||
|
@ -3554,6 +3552,12 @@ int InventoryClass::S_CallInventory2(bool reset_mode)
|
|||
if (useItem && !TrInput)
|
||||
val = 1;
|
||||
|
||||
if (ExitInvLoop)
|
||||
{
|
||||
ExitInvLoop = 0;
|
||||
val = 1;
|
||||
}
|
||||
|
||||
Camera.numberFrames = g_Renderer.SyncRenderer();
|
||||
|
||||
if (val)
|
||||
|
@ -3709,7 +3713,7 @@ void InventoryClass::do_save()
|
|||
{
|
||||
SoundEffect(SFX_TR4_MENU_CHOOSE, 0, SFX_ALWAYS);
|
||||
//SaveSelectedSlot(selected_slot);
|
||||
return;
|
||||
ExitInvLoop = 1; //exit inv if the user has saved
|
||||
}
|
||||
|
||||
if (goDeselect)
|
||||
|
|
|
@ -496,6 +496,7 @@ private:
|
|||
int inventoryItemChosen;
|
||||
int enterInventory;
|
||||
int lastInvItem;
|
||||
bool ExitInvLoop;
|
||||
|
||||
//ammo vars
|
||||
unsigned short AmountShotGunAmmo1;
|
||||
|
@ -535,10 +536,10 @@ private:
|
|||
//pause
|
||||
int pause_flag;
|
||||
pause_menus pause_menu_to_display = pause_main_menu;
|
||||
short pause_selected_option = 0;
|
||||
short pause_selected_option;
|
||||
|
||||
//title
|
||||
short title_selected_option = 0;
|
||||
short title_selected_option;
|
||||
title_menus title_menu_to_display = title_main_menu;
|
||||
int settings_flag;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue