From 5e21cefa72c25fa8695b3be323367411e1e7bd28 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 19 Aug 2013 09:24:36 +0300 Subject: [PATCH] FULLPIPE: Implement PictureObject::isPointInside() --- engines/fullpipe/gfx.cpp | 16 ++++++++++++++++ engines/fullpipe/gfx.h | 1 + 2 files changed, 17 insertions(+) diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index de2b81d76ca..63245a19e01 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -213,6 +213,22 @@ bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) { return false; } +bool PictureObject::isPointInside(int x, int y) { + bool res; + int oldx = _picture->_x; + int oldy = _picture->_y; + + _picture->_x = _ox; + _picture->_y = _oy; + + res = _picture->isPointInside(x, y); + + _picture->_x = oldx; + _picture->_y = oldy; + + return res; +} + GameObject::GameObject() { _okeyCode = 0; _flags = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 4c4ed3034dd..45414eb331b 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -159,6 +159,7 @@ class PictureObject : public GameObject { void draw(); bool setPicAniInfo(PicAniInfo *picAniInfo); + bool isPointInside(int x, int y); }; class Background : public CObject {