diff options
author | Eugene Sandulenko | 2013-08-18 23:20:21 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:16 +0300 |
commit | f9cefd02dfa3a8dd665e23d002aea870a3269e03 (patch) | |
tree | e534aee95cf248d330d2b092b77b31cf2b5d995f | |
parent | 6a172694fb5da9851447eaf30403e63ed032b98b (diff) | |
download | scummvm-rg350-f9cefd02dfa3a8dd665e23d002aea870a3269e03.tar.gz scummvm-rg350-f9cefd02dfa3a8dd665e23d002aea870a3269e03.tar.bz2 scummvm-rg350-f9cefd02dfa3a8dd665e23d002aea870a3269e03.zip |
FULLPIPE: Implement Picture::isPointInside()
-rw-r--r-- | engines/fullpipe/gfx.cpp | 10 | ||||
-rw-r--r-- | engines/fullpipe/gfx.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/statics.cpp | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 9b15d695f0..de2b81d76c 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -454,7 +454,7 @@ void Picture::draw(int x, int y, int style, int angle) { byte *pal = _paletteData; if (!pal) { - warning("Picture:draw: using global palette"); + //warning("Picture:draw: using global palette"); pal = g_fullpipe->_globalPalette; } @@ -537,6 +537,14 @@ void Picture::copyMemoryObject2(Picture *src) { } } +bool Picture::isPointInside(int x, int y) { + if (x >= _x) { + if (y >= _y && x < _x + _width && y < _y + _height) + return true; + } + return false; +} + void Bitmap::putDib(int x, int y, int32 *palette) { debug(0, "Bitmap::putDib(%d, %d)", x, y); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index eeff02646e..4c4ed3034d 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -104,6 +104,7 @@ class Picture : public MemoryObject { void setAlpha(byte alpha) { _alpha = alpha; } Common::Point *getDimensions(Common::Point *p); + bool isPointInside(int x, int y); byte *getPaletteData() { return _paletteData; } void setPaletteData(byte *pal); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 6de3b6981a..a6e9d3ab0a 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -312,7 +312,7 @@ Movement *StaticANIObject::getMovementByName(char *name) { } void Movement::draw(bool flipFlag, int angle) { - warning("STUB: Movement::draw(%d, %d)", flipFlag, angle); + debug(3, "Movement::draw(%d, %d)", flipFlag, angle); Common::Point point; |