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

Unindent mapmenuactionpress()

Done in a separate commit to minimize diff noise.
This commit is contained in:
Misa 2020-06-22 15:31:14 -07:00 committed by Ethan Lee
parent 55d001b4f6
commit 13cc7b2a4b

View file

@ -1993,89 +1993,89 @@ void mapinput()
void mapmenuactionpress() void mapmenuactionpress()
{ {
if (game.menupage == 1 && obj.flags[67] && game.press_action && !game.insecretlab && !map.custommode) if (game.menupage == 1 && obj.flags[67] && game.press_action && !game.insecretlab && !map.custommode)
{
//Warp back to the ship
graphics.resumegamemode = true;
game.teleport_to_x = 2;
game.teleport_to_y = 11;
//trace(game.recordstring);
//We're teleporting! Yey!
game.activetele = false;
game.hascontrol = false;
int i = obj.getplayer();
if (i > -1)
{ {
//Warp back to the ship obj.entities[i].colour = 102;
graphics.resumegamemode = true;
game.teleport_to_x = 2;
game.teleport_to_y = 11;
//trace(game.recordstring);
//We're teleporting! Yey!
game.activetele = false;
game.hascontrol = false;
int i = obj.getplayer();
if (i > -1)
{
obj.entities[i].colour = 102;
}
//which teleporter script do we use? it depends on the companion!
game.state = 4000;
game.statedelay = 0;
} }
if (game.menupage == 3 && !game.gamesaved && game.press_action && !game.intimetrial //which teleporter script do we use? it depends on the companion!
&& !game.nodeathmode && !game.insecretlab && !game.inintermission) game.state = 4000;
{ game.statedelay = 0;
game.flashlight = 5; }
game.screenshake = 10;
music.playef(18);
game.gamesaved = true;
game.savetime = game.timestring(); if (game.menupage == 3 && !game.gamesaved && game.press_action && !game.intimetrial
game.savearea = map.currentarea(map.area(game.roomx, game.roomy)); && !game.nodeathmode && !game.insecretlab && !game.inintermission)
game.savetrinkets = game.trinkets(); {
game.flashlight = 5;
game.screenshake = 10;
music.playef(18);
game.gamesaved = true;
if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) game.savearea = "The Ship"; game.savetime = game.timestring();
game.savearea = map.currentarea(map.area(game.roomx, game.roomy));
game.savetrinkets = game.trinkets();
if (game.roomx >= 102 && game.roomx <= 104 && game.roomy >= 110 && game.roomy <= 111) game.savearea = "The Ship";
#if !defined(NO_CUSTOM_LEVELS) #if !defined(NO_CUSTOM_LEVELS)
if(map.custommodeforreal) if(map.custommodeforreal)
{ {
game.customsavequick(ed.ListOfMetaData[game.playcustomlevel].filename); game.customsavequick(ed.ListOfMetaData[game.playcustomlevel].filename);
} }
else else
#endif #endif
{ {
game.savequick(); game.savequick();
}
} }
}
if (game.menupage == 10 && game.press_action) if (game.menupage == 10 && game.press_action)
{ {
//return to game //return to game
graphics.resumegamemode = true; graphics.resumegamemode = true;
} }
if (game.menupage == 11 && game.press_action) if (game.menupage == 11 && game.press_action)
{ {
//quit to menu //quit to menu
//Kill contents of offset render buffer, since we do that for some reason. //Kill contents of offset render buffer, since we do that for some reason.
//This fixes an apparent frame flicker. //This fixes an apparent frame flicker.
FillRect(graphics.tempBuffer, 0x000000); FillRect(graphics.tempBuffer, 0x000000);
graphics.fademode = 2; graphics.fademode = 2;
music.fadeout(); music.fadeout();
map.nexttowercolour(); map.nexttowercolour();
game.fadetomenu = true; game.fadetomenu = true;
game.fadetomenudelay = 16; game.fadetomenudelay = 16;
} }
if (game.menupage == 20 && game.press_action) if (game.menupage == 20 && game.press_action)
{ {
//return to game //return to game
graphics.resumegamemode = true; graphics.resumegamemode = true;
} }
if (game.menupage == 21 && game.press_action) if (game.menupage == 21 && game.press_action)
{ {
//quit to menu //quit to menu
game.swnmode = false; game.swnmode = false;
graphics.fademode = 2; graphics.fademode = 2;
music.fadeout(); music.fadeout();
game.fadetolab = true; game.fadetolab = true;
game.fadetolabdelay = 16; game.fadetolabdelay = 16;
} }
} }
void teleporterinput() void teleporterinput()