Game/Source/ItemCoin.cpp
// Checks the intersection between two rectangles
Checks the intersection between two rectangles
Checks the intersection between two rectangles
inline bool CheckCollision(SDL_Rect rec1, SDL_Rect rec2)
{
	if ((rec1.x < (rec2.x + rec2.w) && (rec1.x + rec1.w) > rec2.x) &&
		(rec1.y < (rec2.y + rec2.h) && (rec1.y + rec1.h) > rec2.y)) return true;
	else return false;
}
inline bool CheckCollision ( SDL_Rect rec1 , SDL_Rect rec2 ) { if ( ( rec1 . x < ( rec2 . x + rec2 . w ) && ( rec1 . x + rec1 . w ) > rec2 . x ) && ( rec1 . y < ( rec2 . y + rec2 . h ) && ( rec1 . y + rec1 . h ) > rec2 . y ) ) return true ; else return false ; }
Checks the intersection between two rectangles
Checks the intersection between two rectangles