mirror of
https://github.com/wavemotion-dave/NINTV-DS.git
synced 2025-06-18 13:55:33 -04:00
26 lines
379 B
C++
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
|