Remove unnecessary intersectRect() function

This function checked the intersection of rectangles, but it used floats
for some reason when its only caller used ints. There's already an
intersection function (UtilityClass::intersects()), so we should be
using that one instead in order to minimize code duplication.

Graphics::Hitest() is used for per-pixel collision detection, directly
checking the pixels of both entities' sprites. I checked with one of my
TASes and it still syncs, so I'm pretty sure this won't cause any
issues.
This commit is contained in:
Misa
2020-08-04 00:55:18 -07:00
committed by Ethan Lee
parent 154e81292e
commit 627e971e90
3 changed files with 3 additions and 8 deletions

View File

@@ -39,8 +39,6 @@ void FillRect( SDL_Surface* surface, SDL_Rect& rect, const int r, int g, int b )
void FillRect( SDL_Surface* surface, SDL_Rect rect, int rgba );
bool intersectRect(float left1, float right1, float bottom1, float top1, float left2, float right2, float bottom2, float top2);
void OverlaySurfaceKeyed(SDL_Surface* _src, SDL_Surface* _dest, Uint32 _key);
void ScrollSurface(SDL_Surface* _src, int pX, int py);