NINTV-DS/arm9/source/emucore/MOBRect.h
2021-09-02 17:32:31 -04:00

26 lines
379 B
C++

#ifndef RECTANGLE_H
#define RECTANGLE_H
#include "types.h"
class MOBRect
{
public:
BOOL intersects(MOBRect* r) {
return !((r->x + r->width <= x) ||
(r->y + r->height <= y) ||
(r->x >= x + width) ||
(r->y >= y + height));
}
INT32 x;
INT32 y;
INT32 width;
INT32 height;
};
#endif