#include #include "dat.h" #include "fns.h" int in_bounds(Image *i, int x, int y, SDL_Rect *bounds) { SDL_Rect r; SDL_Rect irect = { x, y, i->w, i->h }; if (SDL_GetRectUnion(&irect, bounds, &r) == false) { shit("rect union math fail: %s", SDL_GetError()); return false; } return SDL_RectsEqual(&irect, &r); }