From af8d7345c917c9fa3c6815a630dfe0fe3ed6fe83 Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 1 Apr 2020 15:35:27 -0700 Subject: [PATCH] Remove unused arguments from Graphics::Hitest() The two arguments 'col' and 'col2', both the only integer arguments of the function, do absolutely nothing. Remove those and update callers. --- desktop_version/src/Entity.cpp | 8 ++++---- desktop_version/src/Graphics.cpp | 2 +- desktop_version/src/Graphics.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index 3b705f9f..1c5c654c 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -5274,7 +5274,7 @@ void entityclass::entitycollisioncheck() if (graphics.flipmode) { if (graphics.Hitest(graphics.flipsprites[entities[i].drawframe], - colpoint1, 1, graphics.flipsprites[entities[j].drawframe], colpoint2, 1)) + colpoint1, graphics.flipsprites[entities[j].drawframe], colpoint2)) { //Do the collision stuff game.deathseq = 30; @@ -5283,7 +5283,7 @@ void entityclass::entitycollisioncheck() else { if (graphics.Hitest(graphics.sprites[entities[i].drawframe], - colpoint1, 1, graphics.sprites[entities[j].drawframe], colpoint2, 1) ) + colpoint1, graphics.sprites[entities[j].drawframe], colpoint2) ) { //Do the collision stuff game.deathseq = 30; @@ -5402,7 +5402,7 @@ void entityclass::entitycollisioncheck() if (graphics.flipmode) { if (graphics.Hitest(graphics.flipsprites[entities[i].drawframe], - colpoint1, 1, graphics.flipsprites[entities[j].drawframe], colpoint2, 1)) + colpoint1, graphics.flipsprites[entities[j].drawframe], colpoint2)) { //Do the collision stuff game.deathseq = 30; @@ -5412,7 +5412,7 @@ void entityclass::entitycollisioncheck() else { if (graphics.Hitest(graphics.sprites[entities[i].drawframe], - colpoint1, 1, graphics.sprites[entities[j].drawframe], colpoint2, 1)) + colpoint1, graphics.sprites[entities[j].drawframe], colpoint2)) { //Do the collision stuff game.deathseq = 30; diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 8645fc97..018e99d5 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1253,7 +1253,7 @@ void Graphics::drawcoloredtile( int x, int y, int t, int r, int g, int b ) } -bool Graphics::Hitest(SDL_Surface* surface1, point p1, int col, SDL_Surface* surface2, point p2, int col2) +bool Graphics::Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, point p2) { //find rectangle where they intersect: diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index a077e312..0ed0c8a7 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -132,7 +132,7 @@ public: void render(); - bool Hitest(SDL_Surface* surface1, point p1, int col, SDL_Surface* surface2, point p2, int col2); + bool Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, point p2); void drawentities();