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 authored and Ethan Lee committed 2020-06-19 09:05:48 -04:00
1 parent 9ea5734abb
commit a22a872886
2 files changed
+33 -46

No files matched your search

+33
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;
}
}
}
-46
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