mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Move temp and temp2 off of mapclass
There's no reason these temporary variables need to exist on the class exist.
This commit is contained in:
@@ -529,7 +529,7 @@ void mapclass::changefinalcol(int t)
|
||||
//change the map to colour t - for the game's final stretch.
|
||||
//First up, the tiles. This is just a setting:
|
||||
final_mapcol = t;
|
||||
temp = 6 - t;
|
||||
int temp = 6 - t;
|
||||
//Next, entities
|
||||
for (size_t i = 0; i < obj.entities.size(); i++)
|
||||
{
|
||||
@@ -1040,7 +1040,7 @@ void mapclass::gotoroom(int rx, int ry)
|
||||
//Leaving the Ship
|
||||
if (game.roomx == 104 && game.roomy == 112) music.niceplay(4);
|
||||
}
|
||||
temp = rx + (ry * 100);
|
||||
int temp = rx + (ry * 100);
|
||||
loadlevel(game.roomx, game.roomy);
|
||||
|
||||
|
||||
@@ -1865,8 +1865,8 @@ void mapclass::loadlevel(int rx, int ry)
|
||||
if (obj.entities[i].type == 1 && obj.entities[i].behave >= 8 && obj.entities[i].behave < 10)
|
||||
{
|
||||
//put a block underneath
|
||||
temp = obj.entities[i].xp / 8.0f;
|
||||
temp2 = obj.entities[i].yp / 8.0f;
|
||||
int temp = obj.entities[i].xp / 8.0f;
|
||||
int temp2 = obj.entities[i].yp / 8.0f;
|
||||
settile(temp, temp2, 1);
|
||||
settile(temp+1, temp2, 1);
|
||||
settile(temp+2, temp2, 1);
|
||||
|
||||
Reference in New Issue
Block a user