diff options
Diffstat (limited to 'engines/macventure/image.cpp')
-rw-r--r-- | engines/macventure/image.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/macventure/image.cpp b/engines/macventure/image.cpp index 323b8a1089..1a50a4ffbc 100644 --- a/engines/macventure/image.cpp +++ b/engines/macventure/image.cpp @@ -350,6 +350,18 @@ bool ImageAsset::isPointInside(Common::Point point) { return pix != 0; } +bool ImageAsset::isRectInside(Common::Rect rect) { + for (uint y = rect.top; y < rect.top + rect.height(); y++) { + uint bmpofs = y * _rowBytes; + byte pix; + for (uint x = rect.left; x < rect.left + rect.width(); x++) { + pix = _maskData[bmpofs + (x >> 3)] & (1 << (7 - (x & 7))); + if (pix) return true; + } + } + return false; +} + uint ImageAsset::getWidth() { return _bitWidth; } |