Rename INBOUNDS() macro to INBOUNDS_VEC()

Since there's an INBOUNDS_ARR() macro, it's much better to specify the
macro for the vector is a macro for the vector, to avoid confusion.

All usages of this macro have been renamed accordingly.
This commit is contained in:
Misa
2020-09-08 00:31:44 -07:00
committed by Ethan Lee
parent fae14f4e98
commit 7ed495c373
6 changed files with 46 additions and 46 deletions

View File

@@ -4499,7 +4499,7 @@ void entityclass::entitymapcollision( int t )
void entityclass::movingplatformfix( int t, int j )
{
if (!INBOUNDS(t, entities) || !INBOUNDS(j, entities))
if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(j, entities))
{
puts("movingplatformfix() out-of-bounds!");
return;
@@ -4652,7 +4652,7 @@ void entityclass::entitycollisioncheck()
void entityclass::collisioncheck(int i, int j, bool scm /*= false*/)
{
if (!INBOUNDS(i, entities) || !INBOUNDS(j, entities))
if (!INBOUNDS_VEC(i, entities) || !INBOUNDS_VEC(j, entities))
{
puts("collisioncheck() out-of-bounds!");
return;
@@ -4679,7 +4679,7 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/)
int drawframe1 = entities[i].drawframe;
int drawframe2 = entities[j].drawframe;
std::vector<SDL_Surface*>& spritesvec = graphics.flipmode ? graphics.flipsprites : graphics.sprites;
if (INBOUNDS(drawframe1, spritesvec) && INBOUNDS(drawframe2, spritesvec)
if (INBOUNDS_VEC(drawframe1, spritesvec) && INBOUNDS_VEC(drawframe2, spritesvec)
&& graphics.Hitest(spritesvec[drawframe1],
colpoint1, spritesvec[drawframe2], colpoint2))
{
@@ -4774,7 +4774,7 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/)
void entityclass::stuckprevention(int t)
{
if (!INBOUNDS(t, entities))
if (!INBOUNDS_VEC(t, entities))
{
puts("stuckprevention() out-of-bounds!");
return;