1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 15:38:30 +02:00

Remove map.customcrewmates

Same as the previous commit, except for the amount of custom crewmates.
This commit is contained in:
Misa 2020-04-08 22:01:32 -07:00 committed by Ethan Lee
parent 85bd7d9a2d
commit 6b317c5ab9
4 changed files with 22 additions and 25 deletions

View File

@ -1999,6 +1999,7 @@ void Game::updatestate()
state++; state++;
statedelay = 15; statedelay = 15;
break; break;
#if !defined(NO_CUSTOM_LEVELS)
case 1011: case 1011:
//Found a crewmate! //Found a crewmate!
advancetext = true; advancetext = true;
@ -2010,17 +2011,17 @@ void Game::updatestate()
graphics.addline("You have found a lost crewmate!"); graphics.addline("You have found a lost crewmate!");
graphics.textboxcenterx(); graphics.textboxcenterx();
if(int(map.customcrewmates-crewmates())==0) if(int(ed.numcrewmates-crewmates())==0)
{ {
graphics.createtextbox(" All crewmates rescued! ", 50, 65, 174, 174, 174); graphics.createtextbox(" All crewmates rescued! ", 50, 65, 174, 174, 174);
} }
else if(map.customcrewmates-crewmates()==1) else if(ed.numcrewmates-crewmates()==1)
{ {
graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates()))+ " remains ", 50, 65, 174, 174, 174); graphics.createtextbox(" " + help.number(int(ed.numcrewmates-crewmates()))+ " remains ", 50, 65, 174, 174, 174);
} }
else else
{ {
graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates()))+ " remain ", 50, 65, 174, 174, 174); graphics.createtextbox(" " + help.number(int(ed.numcrewmates-crewmates()))+ " remain ", 50, 65, 174, 174, 174);
} }
graphics.textboxcenterx(); graphics.textboxcenterx();
@ -2032,22 +2033,21 @@ void Game::updatestate()
graphics.addline("You have found a lost crewmate!"); graphics.addline("You have found a lost crewmate!");
graphics.textboxcenterx(); graphics.textboxcenterx();
if(int(map.customcrewmates-crewmates())==0) if(int(ed.numcrewmates-crewmates())==0)
{ {
graphics.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174); graphics.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174);
} }
else if(map.customcrewmates-crewmates()==1) else if(ed.numcrewmates-crewmates()==1)
{ {
graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates()))+ " remains ", 50, 135, 174, 174, 174); graphics.createtextbox(" " + help.number(int(ed.numcrewmates-crewmates()))+ " remains ", 50, 135, 174, 174, 174);
} }
else else
{ {
graphics.createtextbox(" " + help.number(int(map.customcrewmates-crewmates()))+ " remain ", 50, 135, 174, 174, 174); graphics.createtextbox(" " + help.number(int(ed.numcrewmates-crewmates()))+ " remain ", 50, 135, 174, 174, 174);
} }
graphics.textboxcenterx(); graphics.textboxcenterx();
} }
break; break;
#if !defined(NO_CUSTOM_LEVELS)
case 1013: case 1013:
graphics.textboxremove(); graphics.textboxremove();
hascontrol = true; hascontrol = true;
@ -2055,7 +2055,7 @@ void Game::updatestate()
completestop = false; completestop = false;
state = 0; state = 0;
if(map.customcrewmates-crewmates()==0) if(ed.numcrewmates-crewmates()==0)
{ {
if(map.custommodeforreal) if(map.custommodeforreal)
{ {
@ -2090,10 +2090,10 @@ void Game::updatestate()
music.play(6); music.play(6);
graphics.backgrounddrawn = true; graphics.backgrounddrawn = true;
map.tdrawback = true; map.tdrawback = true;
//Update level stats
if(map.customcrewmates-crewmates()==0)
{
#if !defined(NO_CUSTOM_LEVELS) #if !defined(NO_CUSTOM_LEVELS)
//Update level stats
if(ed.numcrewmates-crewmates()==0)
{
//Finished level //Finished level
if(ed.numtrinkets-trinkets()==0) if(ed.numtrinkets-trinkets()==0)
{ {
@ -2101,11 +2101,11 @@ void Game::updatestate()
updatecustomlevelstats(customlevelfilename, 3); updatecustomlevelstats(customlevelfilename, 3);
} }
else else
#endif
{ {
updatecustomlevelstats(customlevelfilename, 1); updatecustomlevelstats(customlevelfilename, 1);
} }
} }
#endif
createmenu("levellist"); createmenu("levellist");
state = 0; state = 0;
break; break;

View File

@ -1731,8 +1731,6 @@ void mapclass::loadlevel(int rx, int ry)
} }
} }
customcrewmates=ed.numcrewmates;
//do the appear/remove roomname here //do the appear/remove roomname here
break; break;
#endif #endif

View File

@ -134,7 +134,6 @@ public:
bool custommodeforreal; bool custommodeforreal;
int customx, customy; int customx, customy;
int customwidth, customheight; int customwidth, customheight;
int customcrewmates;
int custommmxoff, custommmyoff, custommmxsize, custommmysize; int custommmxoff, custommmyoff, custommmxsize, custommmysize;
int customzoom; int customzoom;
bool customshowmm; bool customshowmm;

View File

@ -2138,10 +2138,10 @@ void maprender()
graphics.Print( -1, 220-110, ed.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true); graphics.Print( -1, 220-110, ed.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true);
graphics.Print( -1, 220-120, ed.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true); graphics.Print( -1, 220-120, ed.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true);
if(map.customcrewmates-game.crewmates()==1){ if(ed.numcrewmates-game.crewmates()==1){
graphics.Print(1,220-165, help.number(int(map.customcrewmates-game.crewmates()))+ " crewmate remains", 196, 196, 255 - help.glow, true); graphics.Print(1,220-165, help.number(int(ed.numcrewmates-game.crewmates()))+ " crewmate remains", 196, 196, 255 - help.glow, true);
}else if(map.customcrewmates-game.crewmates()>0){ }else if(ed.numcrewmates-game.crewmates()>0){
graphics.Print(1,220-165, help.number(int(map.customcrewmates-game.crewmates()))+ " crewmates remain", 196, 196, 255 - help.glow, true); graphics.Print(1,220-165, help.number(int(ed.numcrewmates-game.crewmates()))+ " crewmates remain", 196, 196, 255 - help.glow, true);
} }
} }
else else
@ -2153,10 +2153,10 @@ void maprender()
graphics.Print( -1, 110, ed.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true); graphics.Print( -1, 110, ed.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true);
graphics.Print( -1, 120, ed.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true); graphics.Print( -1, 120, ed.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true);
if(map.customcrewmates-game.crewmates()==1){ if(ed.numcrewmates-game.crewmates()==1){
graphics.Print(1,165, help.number(int(map.customcrewmates-game.crewmates()))+ " crewmate remains", 196, 196, 255 - help.glow, true); graphics.Print(1,165, help.number(int(ed.numcrewmates-game.crewmates()))+ " crewmate remains", 196, 196, 255 - help.glow, true);
}else if(map.customcrewmates-game.crewmates()>0){ }else if(ed.numcrewmates-game.crewmates()>0){
graphics.Print(1,165, help.number(int(map.customcrewmates-game.crewmates()))+ " crewmates remain", 196, 196, 255 - help.glow, true); graphics.Print(1,165, help.number(int(ed.numcrewmates-game.crewmates()))+ " crewmates remain", 196, 196, 255 - help.glow, true);
} }
} }
} }