mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +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:
@@ -10,7 +10,7 @@ int pre_darkcol=0, pre_lightcol=0, pre_curcol=0, pre_coltimer=0, pre_offset=0;
|
||||
int pre_frontrectx=30, pre_frontrecty=20, pre_frontrectw=260, pre_frontrecth=200;
|
||||
int pre_temprectx=0, pre_temprecty=0, pre_temprectw=320, pre_temprecth=240;
|
||||
|
||||
void preloaderlogic()
|
||||
void preloaderrenderfixed()
|
||||
{
|
||||
if (pre_transition < 30) pre_transition--;
|
||||
if(pre_transition>=30){
|
||||
@@ -27,6 +27,10 @@ void preloaderlogic()
|
||||
pre_coltimer = 8;
|
||||
}
|
||||
}
|
||||
|
||||
if (pre_transition <= -10) {
|
||||
game.gamestate = TITLEMODE;
|
||||
}
|
||||
}
|
||||
|
||||
void preloaderrender()
|
||||
@@ -88,7 +92,7 @@ void preloaderrender()
|
||||
pre_transition = 29;
|
||||
}
|
||||
}else if (pre_transition <= -10) {
|
||||
game.gamestate=TITLEMODE;
|
||||
//Switch to TITLEMODE (handled by preloaderrenderfixed)
|
||||
}else if (pre_transition < 5) {
|
||||
FillRect(graphics.backBuffer, 0, 0, 320,240, graphics.getBGR(0,0,0));
|
||||
}else if (pre_transition < 20) {
|
||||
|
||||
Reference in New Issue
Block a user