1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-16 09:38:29 +02: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
help.updateglow();
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)
{
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();
}
else if (graphics.menuoffset > 0)
{
graphics.menuoffset -= 25;
if (graphics.menuoffset < 0) graphics.menuoffset = 0;
graphics.menuoffrender();
}
else
@ -2620,33 +2597,10 @@ void teleporterrender()
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();
}
else if (graphics.menuoffset > 0)
{
graphics.menuoffset -= 25;
if (graphics.menuoffset < 0) graphics.menuoffset = 0;
graphics.menuoffrender();
}
else