mirror of
https://github.com/LostArtefacts/TR2X.git
synced 2025-03-01 10:36:00 +00:00
demo: remove g_IsResetFlag
This commit is contained in:
parent
513c4d2b75
commit
f8be8ead20
@ -4253,7 +4253,7 @@ typedef enum {
|
||||
0x004D7780 - int32_t g_CineFrameCurrent;
|
||||
0x004D778C - int32_t g_IsChunkyCamera;
|
||||
0x004D7794 - int32_t g_NoInputCounter;
|
||||
0x004D7798 - BOOL g_IsResetFlag;
|
||||
0x004D7798 + BOOL g_IsResetFlag;
|
||||
0x004D779C - int32_t g_FlipTimer;
|
||||
0x004D77A0 - int32_t g_LOSNumRooms = 0;
|
||||
0x004D77A4 - BOOL g_StopInventory;
|
||||
|
@ -586,8 +586,7 @@ int16_t __cdecl TitleSequence(void)
|
||||
return dir;
|
||||
}
|
||||
|
||||
if (g_IsResetFlag) {
|
||||
g_IsResetFlag = 0;
|
||||
if (dir == GFD_START_DEMO) {
|
||||
return GFD_START_DEMO;
|
||||
}
|
||||
|
||||
|
@ -40,9 +40,6 @@ int32_t __cdecl LevelStats(const int32_t level_num)
|
||||
S_CopyBufferToScreen();
|
||||
|
||||
Input_Update();
|
||||
if (g_IsResetFlag) {
|
||||
g_Input = IN_SELECT;
|
||||
}
|
||||
g_InputDB = GetDebouncedInput(g_Input);
|
||||
|
||||
if (g_GF_OverrideDir != (GAME_FLOW_DIR)-1) {
|
||||
@ -89,9 +86,6 @@ int32_t __cdecl GameStats(const int32_t level_num)
|
||||
S_CopyBufferToScreen();
|
||||
|
||||
Input_Update();
|
||||
if (g_IsResetFlag) {
|
||||
g_Input = IN_SELECT;
|
||||
}
|
||||
g_InputDB = GetDebouncedInput(g_Input);
|
||||
|
||||
if (g_GF_OverrideDir != (GAME_FLOW_DIR)-1) {
|
||||
|
@ -47,9 +47,6 @@ int32_t __cdecl Game_Control(int32_t nframes, const bool demo_mode)
|
||||
}
|
||||
|
||||
Input_Update();
|
||||
if (g_IsResetFlag) {
|
||||
return GFD_EXIT_TO_TITLE;
|
||||
}
|
||||
|
||||
if (demo_mode) {
|
||||
if (g_Input) {
|
||||
|
@ -189,12 +189,10 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
g_InputDB = GetDebouncedInput(g_Input);
|
||||
if (g_Inv_Mode != INV_TITLE_MODE || g_Input != 0 || g_InputDB) {
|
||||
g_NoInputCounter = 0;
|
||||
g_IsResetFlag = 0;
|
||||
} else if (g_GameFlow.num_demos || g_GameFlow.no_input_timeout) {
|
||||
g_NoInputCounter++;
|
||||
if (g_NoInputCounter > g_GameFlow.no_input_time) {
|
||||
demo_needed = true;
|
||||
g_IsResetFlag = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,7 +349,7 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_IsResetFlag
|
||||
if (demo_needed
|
||||
|| (((g_InputDB & IN_OPTION) || (g_InputDB & IN_DESELECT))
|
||||
&& g_Inv_Mode != INV_TITLE_MODE)) {
|
||||
Sound_Effect(SFX_MENU_SPINOUT, 0, SPM_ALWAYS);
|
||||
@ -677,10 +675,6 @@ int32_t __cdecl Inv_Display(int32_t inventory_mode)
|
||||
S_FinishInventory();
|
||||
g_Inv_IsActive = 0;
|
||||
|
||||
if (g_IsResetFlag) {
|
||||
return GFD_EXIT_TO_TITLE;
|
||||
}
|
||||
|
||||
if (demo_needed) {
|
||||
return GFD_START_DEMO;
|
||||
}
|
||||
|
@ -175,7 +175,6 @@
|
||||
#define g_IsChunkyCamera (*(int32_t*)0x004D778C)
|
||||
#define g_HeightType (*(int32_t*)0x004D7790)
|
||||
#define g_NoInputCounter (*(int32_t*)0x004D7794)
|
||||
#define g_IsResetFlag (*(BOOL*)0x004D7798)
|
||||
#define g_FlipTimer (*(int32_t*)0x004D779C)
|
||||
#define g_LOSNumRooms (*(int32_t*)0x004D77A0) // = 0
|
||||
#define g_StopInventory (*(BOOL*)0x004D77A4)
|
||||
|
Loading…
x
Reference in New Issue
Block a user