From bcfe176df557b78adf9181a9dfea229ff3fadfe1 Mon Sep 17 00:00:00 2001 From: Bendegúz Nagy Date: Thu, 16 Jun 2016 23:48:18 +0200 Subject: DM: Add mouseclick processing --- engines/dm/gfx.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/dm/gfx.h') diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index 9790517507..50171feaa3 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -2,6 +2,7 @@ #define GFX_H #include "common/scummsys.h" +#include "common/rect.h" #include "dm.h" namespace DM { @@ -20,6 +21,9 @@ public: uint16 Y2; Box(uint16 x1, uint16 x2, uint16 y1, uint16 y2): X1(x1), X2(x2), Y1(y1), Y2(y2) {} + bool isPointInside(Common::Point point) { + return (X1 <= point.x) && (point.x < X2) && (Y1 <= point.y) && (point.y < Y2); + } }; // @ BOX_BYTE, BOX_WORD // The frames in the original sources contain inclusive boundaries and byte widths, not pixel widths -- cgit v1.2.3