mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Move all fixed-timestep render updates to new file RenderFixed.cpp
As part of fixing #464, I'll need to move these pieces of code around easily. In #220 I just kind of shoved them awkwardly in whatever fixed function would be last called in the gamestate loop, which I shouldn't have done as I've now had to make formal fixed-render functions anyway. Because these fixed functions need to be called directly before a render function, and I'm fixing the order to put render functions in their proper place, so I need to be able to move these around easily, and making them function calls instead of inlined makes them easier to manipulate.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "Network.h"
|
||||
#include "preloader.h"
|
||||
#include "Render.h"
|
||||
#include "RenderFixed.h"
|
||||
#include "Screen.h"
|
||||
#include "Script.h"
|
||||
#include "SoundSystem.h"
|
||||
@@ -526,7 +527,7 @@ void inline fixedloop()
|
||||
switch(game.gamestate)
|
||||
{
|
||||
case PRELOADER:
|
||||
preloaderlogic();
|
||||
preloaderrenderfixed();
|
||||
break;
|
||||
#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
|
||||
case EDITORMODE:
|
||||
@@ -534,6 +535,8 @@ void inline fixedloop()
|
||||
editorinput();
|
||||
////Logic
|
||||
editorlogic();
|
||||
|
||||
editorrenderfixed();
|
||||
break;
|
||||
#endif
|
||||
case TITLEMODE:
|
||||
@@ -541,6 +544,8 @@ void inline fixedloop()
|
||||
titleinput();
|
||||
////Logic
|
||||
titlelogic();
|
||||
|
||||
titlerenderfixed();
|
||||
break;
|
||||
case GAMEMODE:
|
||||
// WARNING: If updating this code, don't forget to update Map.cpp mapclass::twoframedelayfix()
|
||||
@@ -564,12 +569,14 @@ void inline fixedloop()
|
||||
|
||||
gameinput();
|
||||
gamelogic();
|
||||
gamerenderfixed();
|
||||
|
||||
|
||||
break;
|
||||
case MAPMODE:
|
||||
mapinput();
|
||||
maplogic();
|
||||
maprenderfixed();
|
||||
break;
|
||||
case TELEPORTERMODE:
|
||||
if(game.useteleporter)
|
||||
@@ -585,12 +592,15 @@ void inline fixedloop()
|
||||
gameinput();
|
||||
}
|
||||
maplogic();
|
||||
maprenderfixed();
|
||||
break;
|
||||
case GAMECOMPLETE:
|
||||
//Input
|
||||
gamecompleteinput();
|
||||
//Logic
|
||||
gamecompletelogic();
|
||||
|
||||
gamecompleterenderfixed();
|
||||
break;
|
||||
case GAMECOMPLETE2:
|
||||
//Input
|
||||
|
||||
Reference in New Issue
Block a user