Remove global args from entityclass

This commit removes all global args from functions on the entityclass
object, and updates the callers of those functions in other files
accordingly (most significantly, the game level files Finalclass.cpp,
Labclass.cpp, Otherlevel.cpp, Spacestation2.cpp, WarpClass.cpp, due to
them using createentity()), as well as renaming all instances of 'dwgfx'
in Entity.cpp to 'graphics'.
This commit is contained in:
Misa
2020-03-30 17:46:36 -07:00
committed by Ethan Lee
parent 0e561f23f8
commit cac1a9e3ab
11 changed files with 1280 additions and 1286 deletions

View File

@@ -1499,7 +1499,7 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
for (int i = 0; i < obj.nentity; i++)
{
//Is this entity on the ground? (needed for jumping)
if (obj.entitycollidefloor(map, i))
if (obj.entitycollidefloor(i))
{
obj.entities[i].onground = 2;
}
@@ -1508,7 +1508,7 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
obj.entities[i].onground--;
}
if (obj.entitycollideroof(map, i))
if (obj.entitycollideroof(i))
{
obj.entities[i].onroof = 2;
}
@@ -1518,7 +1518,7 @@ void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, Ut
}
//Animate the entities
obj.animateentities(i, game, help);
obj.animateentities(i);
}
}
@@ -2758,7 +2758,7 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U
for (int i = 0; i < obj.nentity; i++)
{
//Is this entity on the ground? (needed for jumping)
if (obj.entitycollidefloor(map, i))
if (obj.entitycollidefloor(i))
{
obj.entities[i].onground = 2;
}
@@ -2767,7 +2767,7 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U
obj.entities[i].onground--;
}
if (obj.entitycollideroof(map, i))
if (obj.entitycollideroof(i))
{
obj.entities[i].onroof = 2;
}
@@ -2777,7 +2777,7 @@ void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, U
}
//Animate the entities
obj.animateentities(i, game, help);
obj.animateentities(i);
}
}