mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8fcbc1256 | ||
|
|
a302692ab2 | ||
|
|
a59e9d51db | ||
|
|
82971296c2 | ||
|
|
4ecec8a327 |
@@ -813,6 +813,10 @@ void Game::updatestate(void)
|
||||
if (!map.custommode && nocompetitive())
|
||||
{
|
||||
returntolab();
|
||||
|
||||
startscript = true;
|
||||
newscript = "disableaccessibility";
|
||||
|
||||
state = 0;
|
||||
break;
|
||||
}
|
||||
@@ -6888,8 +6892,15 @@ void Game::unlockAchievement(const char *name) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void Game::mapmenuchange(const int newgamestate)
|
||||
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
|
||||
{
|
||||
if (user_initiated
|
||||
&& graphics.menuoffset > 0
|
||||
&& graphics.menuoffset < (map.extrarow ? 230 : 240))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
prevgamestate = gamestate;
|
||||
gamestate = newgamestate;
|
||||
graphics.resumegamemode = false;
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
int tapleft, tapright;
|
||||
|
||||
//Menu interaction stuff
|
||||
void mapmenuchange(const int newgamestate);
|
||||
void mapmenuchange(const int newgamestate, const bool user_initiated);
|
||||
bool mapheld;
|
||||
int menupage;
|
||||
int lastsaved;
|
||||
|
||||
@@ -2124,7 +2124,7 @@ void gameinput(void)
|
||||
else if (game.companion == 0)
|
||||
{
|
||||
//Alright, normal teleporting
|
||||
game.mapmenuchange(TELEPORTERMODE);
|
||||
game.mapmenuchange(TELEPORTERMODE, true);
|
||||
|
||||
game.useteleporter = true;
|
||||
game.initteleportermode();
|
||||
@@ -2279,7 +2279,7 @@ void gameinput(void)
|
||||
//quitting the super gravitron
|
||||
game.mapheld = true;
|
||||
//Quit menu, same conditions as in game menu
|
||||
game.mapmenuchange(MAPMODE);
|
||||
game.mapmenuchange(MAPMODE, true);
|
||||
game.gamesaved = false;
|
||||
game.gamesavefailed = false;
|
||||
game.menupage = 20; // The Map Page
|
||||
@@ -2299,7 +2299,7 @@ void gameinput(void)
|
||||
else
|
||||
{
|
||||
//Normal map screen, do transition later
|
||||
game.mapmenuchange(MAPMODE);
|
||||
game.mapmenuchange(MAPMODE, true);
|
||||
map.cursordelay = 0;
|
||||
map.cursorstate = 0;
|
||||
game.gamesaved = false;
|
||||
@@ -2320,7 +2320,7 @@ void gameinput(void)
|
||||
{
|
||||
game.mapheld = true;
|
||||
//Quit menu, same conditions as in game menu
|
||||
game.mapmenuchange(MAPMODE);
|
||||
game.mapmenuchange(MAPMODE, true);
|
||||
game.gamesaved = false;
|
||||
game.gamesavefailed = false;
|
||||
game.menupage = 30; // Pause screen
|
||||
|
||||
@@ -159,7 +159,7 @@ static void menurender(void)
|
||||
#ifdef INTERIM_COMMIT
|
||||
graphics.Print( 310 - (SDL_arraysize(INTERIM_COMMIT) - 1) * 8, 220, INTERIM_COMMIT, tr/2, tg/2, tb/2);
|
||||
#endif
|
||||
graphics.Print( 310 - (6*8), 230, "v2.3.1", tr/2, tg/2, tb/2);
|
||||
graphics.Print( 310 - (6*8), 230, "v2.3.2", tr/2, tg/2, tb/2);
|
||||
|
||||
if(music.mmmmmm){
|
||||
graphics.Print( 10, 230, "[MMMMMM Mod Installed]", tr/2, tg/2, tb/2);
|
||||
|
||||
@@ -1349,7 +1349,8 @@ void scriptclass::run(void)
|
||||
{
|
||||
if (words[1] == "teleporter")
|
||||
{
|
||||
game.mapmenuchange(TELEPORTERMODE);
|
||||
game.gamestate = GAMEMODE; /* to set prevgamestate */
|
||||
game.mapmenuchange(TELEPORTERMODE, false);
|
||||
|
||||
game.useteleporter = false; //good heavens don't actually use it
|
||||
}
|
||||
|
||||
@@ -6724,6 +6724,26 @@ void scriptclass::load(const std::string& name)
|
||||
};
|
||||
filllines(lines);
|
||||
}
|
||||
else if (SDL_strcmp(t, "disableaccessibility") == 0)
|
||||
{
|
||||
static const char* lines[] = {
|
||||
"cutscene()",
|
||||
"untilbars()",
|
||||
|
||||
"squeak(terminal)",
|
||||
"text(gray,0,114,3)",
|
||||
"Please disable invincibility",
|
||||
"and/or slowdown before entering",
|
||||
"the Super Gravitron.",
|
||||
"position(center)",
|
||||
"speak",
|
||||
|
||||
"endtext",
|
||||
"endcutscene()",
|
||||
"untilbars()",
|
||||
};
|
||||
filllines(lines);
|
||||
}
|
||||
else
|
||||
{
|
||||
loadother(t);
|
||||
|
||||
@@ -143,7 +143,7 @@ static const inline struct ImplFunc* get_gamestate_funcs(
|
||||
FUNC_LIST_END
|
||||
|
||||
FUNC_LIST_BEGIN(TELEPORTERMODE)
|
||||
{Func_fixed, maprenderfixed},
|
||||
{Func_fixed, teleporterrenderfixed},
|
||||
{Func_delta, teleporterrender},
|
||||
{Func_input, teleportermodeinput},
|
||||
{Func_fixed, maplogic},
|
||||
|
||||
Reference in New Issue
Block a user