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

Move crewframedelay to titlelogic() and maplogic()

Incidentally enough, this de-duplicates the amount of times this code
has been copy-pasted from 4 times to 2.

Anyways, this makes it so the crew don't go lightning fast on the
summary screen, the NDM game-over screen, the NDM win screen, and the
pause screen in the main game. It was slightly hilarious seeing them go
really quickly, actually. It was like they were running away from a
giant monster or something.
This commit is contained in:
Misa 2020-04-29 17:09:51 -07:00 committed by Ethan Lee
parent 1d669dffeb
commit b4142976f2
2 changed files with 14 additions and 25 deletions

View file

@ -17,6 +17,13 @@ void titlelogic()
graphics.updatetowerbackground(); graphics.updatetowerbackground();
} }
graphics.crewframedelay--;
if (graphics.crewframedelay <= 0)
{
graphics.crewframedelay = 8;
graphics.crewframe = (graphics.crewframe + 1) % 2;
}
if (game.menucountdown > 0) if (game.menucountdown > 0)
{ {
game.menucountdown--; game.menucountdown--;
@ -45,6 +52,13 @@ void maplogic()
help.updateglow(); help.updateglow();
graphics.updatetextboxes(); graphics.updatetextboxes();
graphics.crewframedelay--;
if (graphics.crewframedelay <= 0)
{
graphics.crewframedelay = 8;
graphics.crewframe = (graphics.crewframe + 1) % 2;
}
graphics.oldmenuoffset = graphics.menuoffset; graphics.oldmenuoffset = graphics.menuoffset;
if (graphics.resumegamemode) if (graphics.resumegamemode)
{ {

View file

@ -504,12 +504,6 @@ void menurender()
graphics.Print( -1, 75, "Are you sure you want to quit?", tr, tg, tb, true); graphics.Print( -1, 75, "Are you sure you want to quit?", tr, tg, tb, true);
break; break;
case Menu::continuemenu: case Menu::continuemenu:
graphics.crewframedelay--;
if (graphics.crewframedelay <= 0)
{
graphics.crewframedelay = 8;
graphics.crewframe = (graphics.crewframe + 1) % 2;
}
switch (game.currentmenuoption) switch (game.currentmenuoption)
{ {
case 0: case 0:
@ -551,12 +545,6 @@ void menurender()
{ {
graphics.bigprint( -1, 25, "GAME OVER", tr, tg, tb, true, 3); graphics.bigprint( -1, 25, "GAME OVER", tr, tg, tb, true, 3);
graphics.crewframedelay--;
if (graphics.crewframedelay <= 0)
{
graphics.crewframedelay = 8;
graphics.crewframe = (graphics.crewframe + 1) % 2;
}
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
{ {
graphics.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], true); graphics.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], true);
@ -602,12 +590,6 @@ void menurender()
{ {
graphics.bigprint( -1, 8, "WOW", tr, tg, tb, true, 4); graphics.bigprint( -1, 8, "WOW", tr, tg, tb, true, 4);
graphics.crewframedelay--;
if (graphics.crewframedelay <= 0)
{
graphics.crewframedelay = 8;
graphics.crewframe = (graphics.crewframe + 1) % 2;
}
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
{ {
graphics.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], true); graphics.drawcrewman(169-(3*42)+(i*42), 68, i, game.crewstats[i], true);
@ -1684,13 +1666,6 @@ void maprender()
//Background color //Background color
FillRect(graphics.backBuffer,0, 12, 320, 240, 10, 24, 26 ); FillRect(graphics.backBuffer,0, 12, 320, 240, 10, 24, 26 );
graphics.crewframedelay--;
if (graphics.crewframedelay <= 0)
{
graphics.crewframedelay = 8;
graphics.crewframe = (graphics.crewframe + 1) % 2;
}
//Menubar: //Menubar: