1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Move menu offset logic to maplogic()

This is the logic that handles the timer that brings up and down the
teleporter, pause screen, and Esc screen. So now it doesn't go crazy
fast.
This commit is contained in:
Misa 2020-04-28 20:28:41 -07:00 committed by Ethan Lee
parent 9ea5734abb
commit a22a872886
2 changed files with 33 additions and 46 deletions

View file

@ -39,6 +39,39 @@ void maplogic()
//Misc //Misc
help.updateglow(); help.updateglow();
graphics.updatetextboxes(); graphics.updatetextboxes();
if (graphics.resumegamemode)
{
graphics.menuoffset += 25;
if (map.extrarow)
{
if (graphics.menuoffset >= 230)
{
graphics.menuoffset = 230;
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
}
}
else
{
if (graphics.menuoffset >= 240)
{
graphics.menuoffset = 240;
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
}
}
}
else if (graphics.menuoffset > 0)
{
graphics.menuoffset -= 25;
if (graphics.menuoffset < 0)
{
graphics.menuoffset = 0;
}
}
} }

View file

@ -2457,33 +2457,10 @@ void maprender()
if (graphics.resumegamemode) if (graphics.resumegamemode)
{ {
graphics.menuoffset += 25;
if (map.extrarow)
{
if (graphics.menuoffset >= 230)
{
graphics.menuoffset = 230;
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
}
}
else
{
if (graphics.menuoffset >= 240)
{
graphics.menuoffset = 240;
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
}
}
graphics.menuoffrender(); graphics.menuoffrender();
} }
else if (graphics.menuoffset > 0) else if (graphics.menuoffset > 0)
{ {
graphics.menuoffset -= 25;
if (graphics.menuoffset < 0) graphics.menuoffset = 0;
graphics.menuoffrender(); graphics.menuoffrender();
} }
else else
@ -2620,33 +2597,10 @@ void teleporterrender()
if (graphics.resumegamemode) if (graphics.resumegamemode)
{ {
graphics.menuoffset += 25;
if (map.extrarow)
{
if (graphics.menuoffset >= 230)
{
graphics.menuoffset = 230;
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
}
}
else
{
if (graphics.menuoffset >= 240)
{
graphics.menuoffset = 240;
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
}
}
graphics.menuoffrender(); graphics.menuoffrender();
} }
else if (graphics.menuoffset > 0) else if (graphics.menuoffset > 0)
{ {
graphics.menuoffset -= 25;
if (graphics.menuoffset < 0) graphics.menuoffset = 0;
graphics.menuoffrender(); graphics.menuoffrender();
} }
else else