mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Remove unused argument of entityclass::getcompanion()
The argument provided to entityclass::getcompanion() does absolutely nothing. Remove it, and update all callers.
This commit is contained in:
parent
d910800423
commit
7abf40881a
5 changed files with 18 additions and 18 deletions
|
@ -4309,7 +4309,7 @@ bool entityclass::gettype( int t )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int entityclass::getcompanion( int t )
|
int entityclass::getcompanion()
|
||||||
{
|
{
|
||||||
//Returns the index of the companion with rule t
|
//Returns the index of the companion with rule t
|
||||||
for (int i = 0; i < nentity; i++)
|
for (int i = 0; i < nentity; i++)
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
|
|
||||||
bool gettype(int t);
|
bool gettype(int t);
|
||||||
|
|
||||||
int getcompanion(int t);
|
int getcompanion();
|
||||||
|
|
||||||
int getplayer();
|
int getplayer();
|
||||||
|
|
||||||
|
|
|
@ -1534,7 +1534,7 @@ void Game::updatestate()
|
||||||
|
|
||||||
|
|
||||||
companion = 6;
|
companion = 6;
|
||||||
i = obj.getcompanion(6);
|
i = obj.getcompanion();
|
||||||
obj.entities[i].tile = 0;
|
obj.entities[i].tile = 0;
|
||||||
obj.entities[i].state = 1;
|
obj.entities[i].state = 1;
|
||||||
|
|
||||||
|
@ -1560,7 +1560,7 @@ void Game::updatestate()
|
||||||
state++;
|
state++;
|
||||||
music.playef(2, 10);
|
music.playef(2, 10);
|
||||||
graphics.textboxactive();
|
graphics.textboxactive();
|
||||||
i = obj.getcompanion(6);
|
i = obj.getcompanion();
|
||||||
obj.entities[i].tile = 54;
|
obj.entities[i].tile = 54;
|
||||||
obj.entities[i].state = 0;
|
obj.entities[i].state = 0;
|
||||||
}
|
}
|
||||||
|
@ -1575,7 +1575,7 @@ void Game::updatestate()
|
||||||
case 110:
|
case 110:
|
||||||
{
|
{
|
||||||
|
|
||||||
i = obj.getcompanion(6);
|
i = obj.getcompanion();
|
||||||
obj.entities[i].tile = 0;
|
obj.entities[i].tile = 0;
|
||||||
obj.entities[i].state = 1;
|
obj.entities[i].state = 1;
|
||||||
graphics.createtextbox("Follow me!", 185, 154, 164, 164, 255);
|
graphics.createtextbox("Follow me!", 185, 154, 164, 164, 255);
|
||||||
|
@ -1650,7 +1650,7 @@ void Game::updatestate()
|
||||||
break;
|
break;
|
||||||
case 122:
|
case 122:
|
||||||
companion = 7;
|
companion = 7;
|
||||||
i = obj.getcompanion(7);
|
i = obj.getcompanion();
|
||||||
obj.entities[i].tile = 6;
|
obj.entities[i].tile = 6;
|
||||||
obj.entities[i].state = 1;
|
obj.entities[i].state = 1;
|
||||||
|
|
||||||
|
@ -1667,7 +1667,7 @@ void Game::updatestate()
|
||||||
state++;
|
state++;
|
||||||
music.playef(2, 10);
|
music.playef(2, 10);
|
||||||
graphics.textboxactive();
|
graphics.textboxactive();
|
||||||
i = obj.getcompanion(7); //obj.entities[i].tile = 66; obj.entities[i].state = 0;
|
i = obj.getcompanion(); //obj.entities[i].tile = 66; obj.entities[i].state = 0;
|
||||||
break;
|
break;
|
||||||
case 126:
|
case 126:
|
||||||
graphics.createtextbox("I can help with that!", 125, 152-40, 164, 164, 255);
|
graphics.createtextbox("I can help with that!", 125, 152-40, 164, 164, 255);
|
||||||
|
@ -1688,7 +1688,7 @@ void Game::updatestate()
|
||||||
state++;
|
state++;
|
||||||
music.playef(14, 10);
|
music.playef(14, 10);
|
||||||
graphics.textboxactive();
|
graphics.textboxactive();
|
||||||
i = obj.getcompanion(7);
|
i = obj.getcompanion();
|
||||||
obj.entities[i].tile = 6;
|
obj.entities[i].tile = 6;
|
||||||
obj.entities[i].state = 1;
|
obj.entities[i].state = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -2317,7 +2317,7 @@ void Game::updatestate()
|
||||||
obj.entities[i].colour = 0;
|
obj.entities[i].colour = 0;
|
||||||
obj.entities[i].invis = true;
|
obj.entities[i].invis = true;
|
||||||
|
|
||||||
i = obj.getcompanion(companion);
|
i = obj.getcompanion();
|
||||||
if(i>-1)
|
if(i>-1)
|
||||||
{
|
{
|
||||||
obj.entities[i].active = false;
|
obj.entities[i].active = false;
|
||||||
|
|
|
@ -2082,7 +2082,7 @@ void gameinput()
|
||||||
|
|
||||||
int player = obj.getplayer();
|
int player = obj.getplayer();
|
||||||
obj.entities[player].colour = 102;
|
obj.entities[player].colour = 102;
|
||||||
int companion = obj.getcompanion(game.companion);
|
int companion = obj.getcompanion();
|
||||||
if(companion>-1) obj.entities[companion].colour = 102;
|
if(companion>-1) obj.entities[companion].colour = 102;
|
||||||
|
|
||||||
int teleporter = obj.getteleporter();
|
int teleporter = obj.getteleporter();
|
||||||
|
|
|
@ -1361,7 +1361,7 @@ void gamelogic()
|
||||||
{
|
{
|
||||||
case 6:
|
case 6:
|
||||||
obj.createentity(obj.entities[i].xp, 121.0f, 15.0f,1); //Y=121, the floor in that particular place!
|
obj.createentity(obj.entities[i].xp, 121.0f, 15.0f,1); //Y=121, the floor in that particular place!
|
||||||
j = obj.getcompanion(6);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
break;
|
break;
|
||||||
|
@ -1376,7 +1376,7 @@ void gamelogic()
|
||||||
{
|
{
|
||||||
obj.createentity(obj.entities[i].xp, 86.0f, 16.0f, 1); //Y=86, the ROOF in that particular place!
|
obj.createentity(obj.entities[i].xp, 86.0f, 16.0f, 1); //Y=86, the ROOF in that particular place!
|
||||||
}
|
}
|
||||||
j = obj.getcompanion(7);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
}
|
}
|
||||||
|
@ -1387,14 +1387,14 @@ void gamelogic()
|
||||||
if (game.roomx == 102)
|
if (game.roomx == 102)
|
||||||
{
|
{
|
||||||
obj.createentity(310, 177, 17, 1);
|
obj.createentity(310, 177, 17, 1);
|
||||||
j = obj.getcompanion(8);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
obj.createentity(obj.entities[i].xp, 177.0f, 17.0f, 1);
|
obj.createentity(obj.entities[i].xp, 177.0f, 17.0f, 1);
|
||||||
j = obj.getcompanion(8);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
}
|
}
|
||||||
|
@ -1411,7 +1411,7 @@ void gamelogic()
|
||||||
{
|
{
|
||||||
obj.createentity(obj.entities[i].xp, 185.0f, 18.0f, 15, 0, 1);
|
obj.createentity(obj.entities[i].xp, 185.0f, 18.0f, 15, 0, 1);
|
||||||
}
|
}
|
||||||
j = obj.getcompanion(9);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
}
|
}
|
||||||
|
@ -1423,7 +1423,7 @@ void gamelogic()
|
||||||
if (obj.flags[59] == 0)
|
if (obj.flags[59] == 0)
|
||||||
{
|
{
|
||||||
obj.createentity(225.0f, 169.0f, 18, graphics.crewcolour(game.lastsaved), 0, 10);
|
obj.createentity(225.0f, 169.0f, 18, graphics.crewcolour(game.lastsaved), 0, 10);
|
||||||
j = obj.getcompanion(10);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
}
|
}
|
||||||
|
@ -1433,7 +1433,7 @@ void gamelogic()
|
||||||
if (obj.flags[59] == 1)
|
if (obj.flags[59] == 1)
|
||||||
{
|
{
|
||||||
obj.createentity(160.0f, 177.0f, 18, graphics.crewcolour(game.lastsaved), 0, 18, 1);
|
obj.createentity(160.0f, 177.0f, 18, graphics.crewcolour(game.lastsaved), 0, 18, 1);
|
||||||
j = obj.getcompanion(10);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
}
|
}
|
||||||
|
@ -1441,7 +1441,7 @@ void gamelogic()
|
||||||
{
|
{
|
||||||
obj.flags[59] = 1;
|
obj.flags[59] = 1;
|
||||||
obj.createentity(obj.entities[i].xp, -20.0f, 18.0f, graphics.crewcolour(game.lastsaved), 0, 10, 0);
|
obj.createentity(obj.entities[i].xp, -20.0f, 18.0f, graphics.crewcolour(game.lastsaved), 0, 10, 0);
|
||||||
j = obj.getcompanion(10);
|
j = obj.getcompanion();
|
||||||
obj.entities[j].vx = obj.entities[i].vx;
|
obj.entities[j].vx = obj.entities[i].vx;
|
||||||
obj.entities[j].dir = obj.entities[i].dir;
|
obj.entities[j].dir = obj.entities[i].dir;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue