diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 0f9397995..b700c3afc 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -136,7 +136,6 @@ void I_SetWindowTitle(const char* caption); void S_ParseSndInfo(); void I_DetectOS(void); void LoadScripts(); -void app_loop(); void MainLoop(); @@ -865,7 +864,7 @@ int RunGame() D_CheckNetGame(); MainLoop(); - return 0; // this is never reached. app_loop only exits via exception. + return 0; // this is never reached. MainLoop only exits via exception. } //--------------------------------------------------------------------------- @@ -922,49 +921,6 @@ void updatePauseStatus() paused ? S_PauseSound(!pausedWithKey, !paused) : S_ResumeSound(paused); } -void app_loop() -{ - gamestate = GS_STARTUP; - - while (true) - { - try - { - I_SetFrameTime(); - TickSubsystems(); - - handleevents(); - updatePauseStatus(); - D_ProcessEvents(); - - gi->RunGameFrame(); - - // Draw overlay elements to the 2D drawer - FStat::PrintStat(twod); - CT_Drawer(); - C_DrawConsole(); - M_Drawer(); - - // Handle the final 2D overlays. - if (gamestate == GS_LEVEL) DrawFullscreenBlends(); - DrawRateStuff(); - - soundEngine->UpdateSounds(I_GetTime()); - Mus_UpdateMusic(); // must be at the end. - - videoShowFrame(0); - videoSetBrightness(0); // immediately reset this so that the value doesn't stick around in the backend. - } - catch (CRecoverableError& err) - { - gi->ErrorCleanup(); - C_FullConsole(); - Printf(TEXTCOLOR_RED "%s\n", err.what()); - } - } -} - - //========================================================================== // // diff --git a/source/core/gamestruct.h b/source/core/gamestruct.h index efe23e81e..472ae7e64 100644 --- a/source/core/gamestruct.h +++ b/source/core/gamestruct.h @@ -102,9 +102,6 @@ struct GameInterface virtual void Ticker() {} virtual int GetPlayerChecksum(int pnum) { return 0x12345678 + pnum; } - virtual void RunGameFrame() {} // this must go away once things are done. - - virtual FString statFPS() { FString output; diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 0b3e20a87..7b1f954ae 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -570,34 +570,6 @@ void GameInterface::Ticker() CheckProgression(); // todo: Get rid of this. } -void GameTicker() -{ - int const currentTic = I_GetTime(); - - if (paused) - { - buttonMap.ResetButtonStates(); - } - else - { - gameupdatetime.Reset(); - gameupdatetime.Clock(); - - while (!EndLevel && currentTic - lastTic >= 1) - { - lastTic = currentTic; - gi->Ticker(); - } - - gameupdatetime.Unclock(); - - if (nPlayerLives[nLocalPlayer] <= 0) { - startmainmenu(); - } - } -} - - void ExitGame() { ShutDown(); diff --git a/source/exhumed/src/exhumed.h b/source/exhumed/src/exhumed.h index aecf2f65f..bf8be1e0c 100644 --- a/source/exhumed/src/exhumed.h +++ b/source/exhumed/src/exhumed.h @@ -234,7 +234,6 @@ struct GameInterface : ::GameInterface { const char* Name() override { return "Exhumed"; } void app_init() override; - void RunGameFrame() override; bool GenerateSavePic() override; void DrawNativeMenuText(int fontnum, int state, double xpos, double ypos, float fontscale, const char* text, int flags) override; void MenuOpened() override; diff --git a/source/exhumed/src/gameloop.cpp b/source/exhumed/src/gameloop.cpp index 5f74e9fd3..16f8a6ea6 100644 --- a/source/exhumed/src/gameloop.cpp +++ b/source/exhumed/src/gameloop.cpp @@ -250,14 +250,6 @@ void CheckProgression() // //--------------------------------------------------------------------------- -void GameLoop() -{ - GameTicker(); - PlayerInterruptKeys(true); - gi->UpdateSounds(); -} - - void GameInterface::Startup() { resettiming(); @@ -280,34 +272,6 @@ void GameInterface::Startup() } -void GameInterface::RunGameFrame() -{ - again: - CheckProgression(); - switch (gamestate) - { - default: - case GS_STARTUP: - break; - - case GS_MENUSCREEN: - case GS_FULLCONSOLE: - gi->DrawBackground(); - break; - - case GS_LEVEL: - GameLoop(); - gi->Render(); - break; - - case GS_INTERMISSION: - case GS_INTRO: - RunScreenJobFrame(); // This handles continuation through its completion callback. - break; - - } -} - void GameInterface::ErrorCleanup() { // Clear all progression sensitive variables here.