diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index 2aff5771..3b705f9f 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -4309,7 +4309,7 @@ bool entityclass::gettype( int t ) return false; } -int entityclass::getcompanion( int t ) +int entityclass::getcompanion() { //Returns the index of the companion with rule t for (int i = 0; i < nentity; i++) diff --git a/desktop_version/src/Entity.h b/desktop_version/src/Entity.h index fc3e2c0d..3faeb5b8 100644 --- a/desktop_version/src/Entity.h +++ b/desktop_version/src/Entity.h @@ -97,7 +97,7 @@ public: bool gettype(int t); - int getcompanion(int t); + int getcompanion(); int getplayer(); diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 8cd31a2f..8a34fd7d 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -1534,7 +1534,7 @@ void Game::updatestate() companion = 6; - i = obj.getcompanion(6); + i = obj.getcompanion(); obj.entities[i].tile = 0; obj.entities[i].state = 1; @@ -1560,7 +1560,7 @@ void Game::updatestate() state++; music.playef(2, 10); graphics.textboxactive(); - i = obj.getcompanion(6); + i = obj.getcompanion(); obj.entities[i].tile = 54; obj.entities[i].state = 0; } @@ -1575,7 +1575,7 @@ void Game::updatestate() case 110: { - i = obj.getcompanion(6); + i = obj.getcompanion(); obj.entities[i].tile = 0; obj.entities[i].state = 1; graphics.createtextbox("Follow me!", 185, 154, 164, 164, 255); @@ -1650,7 +1650,7 @@ void Game::updatestate() break; case 122: companion = 7; - i = obj.getcompanion(7); + i = obj.getcompanion(); obj.entities[i].tile = 6; obj.entities[i].state = 1; @@ -1667,7 +1667,7 @@ void Game::updatestate() state++; music.playef(2, 10); 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; case 126: graphics.createtextbox("I can help with that!", 125, 152-40, 164, 164, 255); @@ -1688,7 +1688,7 @@ void Game::updatestate() state++; music.playef(14, 10); graphics.textboxactive(); - i = obj.getcompanion(7); + i = obj.getcompanion(); obj.entities[i].tile = 6; obj.entities[i].state = 1; break; @@ -2317,7 +2317,7 @@ void Game::updatestate() obj.entities[i].colour = 0; obj.entities[i].invis = true; - i = obj.getcompanion(companion); + i = obj.getcompanion(); if(i>-1) { obj.entities[i].active = false; diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index c45bf8ac..19e650c3 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -2082,7 +2082,7 @@ void gameinput() int player = obj.getplayer(); obj.entities[player].colour = 102; - int companion = obj.getcompanion(game.companion); + int companion = obj.getcompanion(); if(companion>-1) obj.entities[companion].colour = 102; int teleporter = obj.getteleporter(); diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index f6923b94..f7c343a6 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -1361,7 +1361,7 @@ void gamelogic() { case 6: 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].dir = obj.entities[i].dir; 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! } - j = obj.getcompanion(7); + j = obj.getcompanion(); obj.entities[j].vx = obj.entities[i].vx; obj.entities[j].dir = obj.entities[i].dir; } @@ -1387,14 +1387,14 @@ void gamelogic() if (game.roomx == 102) { obj.createentity(310, 177, 17, 1); - j = obj.getcompanion(8); + j = obj.getcompanion(); obj.entities[j].vx = obj.entities[i].vx; obj.entities[j].dir = obj.entities[i].dir; } else { 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].dir = obj.entities[i].dir; } @@ -1411,7 +1411,7 @@ void gamelogic() { 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].dir = obj.entities[i].dir; } @@ -1423,7 +1423,7 @@ void gamelogic() if (obj.flags[59] == 0) { 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].dir = obj.entities[i].dir; } @@ -1433,7 +1433,7 @@ void gamelogic() if (obj.flags[59] == 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].dir = obj.entities[i].dir; } @@ -1441,7 +1441,7 @@ void gamelogic() { obj.flags[59] = 1; 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].dir = obj.entities[i].dir; }