mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
state locking
This commit is contained in:
parent
01d2cdd42a
commit
4b66920865
6 changed files with 382 additions and 332 deletions
|
@ -2667,7 +2667,7 @@ bool entityclass::updateentities( int i )
|
|||
}
|
||||
else
|
||||
{
|
||||
game.state = 1000;
|
||||
game.setstate(1000);
|
||||
if(music.currentsong!=-1) music.silencedasmusik();
|
||||
music.playef(3);
|
||||
if (game.trinkets() > game.stat_trinkets && !map.custommode)
|
||||
|
@ -3316,7 +3316,7 @@ bool entityclass::updateentities( int i )
|
|||
}
|
||||
else
|
||||
{
|
||||
game.state = 1010;
|
||||
game.setstate(1010);
|
||||
//music.haltdasmusik();
|
||||
if(music.currentsong!=-1) music.silencedasmusik();
|
||||
music.playef(27);
|
||||
|
@ -3336,7 +3336,7 @@ bool entityclass::updateentities( int i )
|
|||
entities[i].colour = 101;
|
||||
if(!game.intimetrial && !game.nodeathmode)
|
||||
{
|
||||
game.state = 2000;
|
||||
game.setstate(2000);
|
||||
game.statedelay = 0;
|
||||
}
|
||||
|
||||
|
@ -4744,7 +4744,7 @@ void entityclass::entitycollisioncheck(void)
|
|||
game.startscript = true;
|
||||
game.newscript = blocks[block_idx].script;
|
||||
removetrigger(activetrigger);
|
||||
game.state = 0;
|
||||
game.setstate(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -159,6 +159,16 @@ public:
|
|||
void actionprompt_textbox(void);
|
||||
void savetele_textbox(void);
|
||||
|
||||
void setstate(int gamestate);
|
||||
|
||||
void setstate(int gamestate, int delay);
|
||||
|
||||
void incstate();
|
||||
|
||||
void lockstate();
|
||||
|
||||
void unlockstate();
|
||||
|
||||
void updatestate(void);
|
||||
|
||||
void unlocknum(int t);
|
||||
|
@ -489,6 +499,8 @@ public:
|
|||
bool disableaudiopause;
|
||||
bool disabletemporaryaudiopause;
|
||||
bool inputdelay;
|
||||
|
||||
bool statelocked;
|
||||
};
|
||||
|
||||
#ifndef GAME_DEFINITION
|
||||
|
|
|
@ -2167,7 +2167,7 @@ void gameinput(void)
|
|||
obj.entities[teleporter].colour = 102;
|
||||
}
|
||||
//which teleporter script do we use? it depends on the companion!
|
||||
game.state = 4000;
|
||||
game.setstate(4000);
|
||||
game.statedelay = 0;
|
||||
}
|
||||
else if (game.companion == 0)
|
||||
|
@ -2200,7 +2200,7 @@ void gameinput(void)
|
|||
obj.entities[teleporter].colour = 102;
|
||||
}
|
||||
//which teleporter script do we use? it depends on the companion!
|
||||
game.state = 3000;
|
||||
game.setstate(3000);
|
||||
game.statedelay = 0;
|
||||
}
|
||||
}
|
||||
|
@ -2457,7 +2457,7 @@ void mapinput(void)
|
|||
|
||||
if (game.menupage >= 20 && game.menupage <= 21)
|
||||
{
|
||||
game.state = 96;
|
||||
game.setstate(96);
|
||||
game.statedelay = 0;
|
||||
}
|
||||
else
|
||||
|
@ -2466,7 +2466,7 @@ void mapinput(void)
|
|||
script.running = false;
|
||||
graphics.textboxes.clear();
|
||||
|
||||
game.state = 80;
|
||||
game.setstate(80);
|
||||
game.statedelay = 0;
|
||||
}
|
||||
}
|
||||
|
@ -2632,8 +2632,8 @@ static void mapmenuactionpress(const bool version2_2)
|
|||
}
|
||||
|
||||
//which teleporter script do we use? it depends on the companion!
|
||||
game.state = 4000;
|
||||
game.statedelay = 0;
|
||||
game.setstate(4000, 0);
|
||||
game.lockstate();
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
|
@ -2866,7 +2866,7 @@ void teleporterinput(void)
|
|||
obj.entities[i].colour = 102;
|
||||
}
|
||||
//which teleporter script do we use? it depends on the companion!
|
||||
game.state = 4000;
|
||||
game.setstate(4000);
|
||||
game.statedelay = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1098,10 +1098,10 @@ void mapclass::gotoroom(int rx, int ry)
|
|||
{
|
||||
if (!obj.flags[5] && !finalmode)
|
||||
{
|
||||
game.state = 0;
|
||||
game.setstate(0);
|
||||
if (game.roomx == 113 && game.roomy == 104)
|
||||
{
|
||||
game.state = 50;
|
||||
game.setstate(50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2289,7 +2289,7 @@ void mapclass::twoframedelayfix(void)
|
|||
|
||||
game.newscript = obj.blocks[block_idx].script;
|
||||
obj.removetrigger(activetrigger);
|
||||
game.state = 0;
|
||||
game.setstate(0);
|
||||
game.statedelay = 0;
|
||||
script.load(game.newscript);
|
||||
}
|
||||
|
|
|
@ -3043,44 +3043,44 @@ void scriptclass::teleport(void)
|
|||
|
||||
if(game.teleport_to_x==0 && game.teleport_to_y==0)
|
||||
{
|
||||
game.state = 4020;
|
||||
game.setstate(4020);
|
||||
}
|
||||
else if(game.teleport_to_x==0 && game.teleport_to_y==16)
|
||||
{
|
||||
game.state = 4030;
|
||||
game.setstate(4030);
|
||||
}
|
||||
else if(game.teleport_to_x==7 && game.teleport_to_y==9)
|
||||
{
|
||||
game.state = 4040;
|
||||
game.setstate(4040);
|
||||
}
|
||||
else if(game.teleport_to_x==8 && game.teleport_to_y==11)
|
||||
{
|
||||
game.state = 4050;
|
||||
game.setstate(4050);
|
||||
}
|
||||
else if(game.teleport_to_x==14 && game.teleport_to_y==19)
|
||||
{
|
||||
game.state = 4030;
|
||||
game.setstate(4030);
|
||||
}
|
||||
else if(game.teleport_to_x==17 && game.teleport_to_y==12)
|
||||
{
|
||||
game.state = 4020;
|
||||
game.setstate(4020);
|
||||
}
|
||||
else if(game.teleport_to_x==17 && game.teleport_to_y==17)
|
||||
{
|
||||
game.state = 4020;
|
||||
game.setstate(4020);
|
||||
}
|
||||
else if(game.teleport_to_x==18 && game.teleport_to_y==7)
|
||||
{
|
||||
game.state = 4060;
|
||||
game.setstate(4060);
|
||||
}
|
||||
else
|
||||
{
|
||||
game.state = 4010;
|
||||
game.setstate(4010);
|
||||
}
|
||||
|
||||
if (game.teleportscript != "")
|
||||
{
|
||||
game.state = 0;
|
||||
game.setstate(0);
|
||||
load(game.teleportscript);
|
||||
game.teleportscript = "";
|
||||
}
|
||||
|
@ -3199,6 +3199,7 @@ void scriptclass::hardreset(void)
|
|||
game.inintermission = false;
|
||||
game.insecretlab = false;
|
||||
|
||||
game.unlockstate();
|
||||
game.state = 0;
|
||||
game.statedelay = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue