mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Make obj.customcollect a vector of bools
It's already treated as a vector of bools, so might as well formally declare it as that.
This commit is contained in:
parent
8507bdc65d
commit
17a64aee7a
4 changed files with 9 additions and 9 deletions
|
@ -1958,7 +1958,7 @@ void entityclass::createentity( float xp, float yp, int t, float vx /*= 0*/, flo
|
|||
|
||||
//Check if it's already been collected
|
||||
entity.para = vx;
|
||||
if (customcollect[vx] == 1) return;
|
||||
if (customcollect[vx]) return;
|
||||
break;
|
||||
case 56: //Custom enemy
|
||||
entity.rule = 1;
|
||||
|
@ -3098,7 +3098,7 @@ void entityclass::updateentities( int i )
|
|||
{
|
||||
if (game.intimetrial)
|
||||
{
|
||||
customcollect[entities[i].para] = 1;
|
||||
customcollect[entities[i].para] = true;
|
||||
music.playef(27);
|
||||
}
|
||||
else
|
||||
|
@ -3107,7 +3107,7 @@ void entityclass::updateentities( int i )
|
|||
//music.haltdasmusik();
|
||||
if(music.currentsong!=-1) music.silencedasmusik();
|
||||
music.playef(27);
|
||||
customcollect[entities[i].para] = 1;
|
||||
customcollect[entities[i].para] = true;
|
||||
}
|
||||
|
||||
removeentity(i);
|
||||
|
|
|
@ -186,7 +186,7 @@ public:
|
|||
std::vector<blockclass> blocks;
|
||||
std::vector<bool> flags;
|
||||
std::vector<bool> collect;
|
||||
std::vector<int> customcollect;
|
||||
std::vector<bool> customcollect;
|
||||
|
||||
bool skipblocks, skipdirblocks;
|
||||
|
||||
|
|
|
@ -5264,7 +5264,7 @@ void Game::customloadquick(std::string savfile)
|
|||
obj.customcollect.clear();
|
||||
for(size_t i = 0; i < values.size(); i++)
|
||||
{
|
||||
obj.customcollect.push_back(atoi(values[i].c_str()));
|
||||
obj.customcollect.push_back((bool) atoi(values[i].c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6065,7 +6065,7 @@ void Game::customsavequick(std::string savfile)
|
|||
std::string customcollect;
|
||||
for(size_t i = 0; i < obj.customcollect.size(); i++ )
|
||||
{
|
||||
customcollect += help.String(obj.customcollect[i]) + ",";
|
||||
customcollect += help.String((int) obj.customcollect[i]) + ",";
|
||||
}
|
||||
msg = new TiXmlElement( "customcollect" );
|
||||
msg->LinkEndChild( new TiXmlText( customcollect.c_str() ));
|
||||
|
@ -7638,5 +7638,5 @@ int Game::trinkets()
|
|||
|
||||
int Game::crewmates()
|
||||
{
|
||||
return std::count(obj.customcollect.begin(), obj.customcollect.end(), 1);
|
||||
return std::count(obj.customcollect.begin(), obj.customcollect.end(), true);
|
||||
}
|
||||
|
|
|
@ -1469,7 +1469,7 @@ void scriptclass::run()
|
|||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
obj.collect[i] = false;
|
||||
obj.customcollect[i] = 0;
|
||||
obj.customcollect[i] = false;
|
||||
}
|
||||
game.deathcounts = 0;
|
||||
game.advancetext = false;
|
||||
|
@ -3561,7 +3561,7 @@ void scriptclass::hardreset()
|
|||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
obj.collect[i] = false;
|
||||
obj.customcollect[i] = 0;
|
||||
obj.customcollect[i] = false;
|
||||
}
|
||||
|
||||
if (obj.getplayer() > -1){
|
||||
|
|
Loading…
Reference in a new issue