| 858 | } |
| 859 | |
| 860 | GameStatus 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 | } |