mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user