MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / HandleGlobalInputEvents

Function HandleGlobalInputEvents

TombEngine/Game/control/control.cpp:860–886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858}
859
860GameStatus HandleGlobalInputEvents(bool isTitle)
861{
862 if (isTitle)
863 return GameStatus::Normal;
864
865 // Check if player dead.
866 if (Lara.Control.Count.Death > DEATH_NO_INPUT_TIMEOUT ||
867 Lara.Control.Count.Death > DEATH_INPUT_TIMEOUT && !NoAction())
868 {
869 // TODO: Maybe do game over menu like some PSX versions have?
870 return GameStatus::LaraDead;
871 }
872
873 // Check if level has been completed.
874 // Negative NextLevel indicates that a savegame must be loaded from corresponding slot.
875 if (NextLevel > 0)
876 {
877 return GameStatus::LevelComplete;
878 }
879 else if (NextLevel < 0)
880 {
881 g_GameFlow->SelectedSaveGame = -(NextLevel + 1);
882 return GameStatus::LoadGame;
883 }
884
885 return GameStatus::Normal;
886}

Callers 1

GamePhaseFunction · 0.85

Calls 1

NoActionFunction · 0.85

Tested by

no test coverage detected