diff options
author | Borja Lorente | 2016-06-23 00:24:39 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:34:53 +0200 |
commit | ec7eb7cb5bec5174f7fd3446824280ab44050f5e (patch) | |
tree | cc4452b57ae0809eef9b04ecef83958161b59ed7 /engines/macventure/image.cpp | |
parent | 0fb344dfeda53e81a70e89be45bda6d5c0614e7e (diff) | |
download | scummvm-rg350-ec7eb7cb5bec5174f7fd3446824280ab44050f5e.tar.gz scummvm-rg350-ec7eb7cb5bec5174f7fd3446824280ab44050f5e.tar.bz2 scummvm-rg350-ec7eb7cb5bec5174f7fd3446824280ab44050f5e.zip |
MACVENTURE: Game window object selection and some more opcodes
Diffstat (limited to 'engines/macventure/image.cpp')
-rw-r--r-- | engines/macventure/image.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/macventure/image.cpp b/engines/macventure/image.cpp index 60f491cf55..de4e3ba12e 100644 --- a/engines/macventure/image.cpp +++ b/engines/macventure/image.cpp @@ -65,10 +65,6 @@ ImageAsset::ImageAsset(ObjID original, Container * container) { _mask = (original * 2) + 1; _container = container; - - //_imgData = nullptr; - //_maskData = nullptr; - decodePPIC(_id, _imgData); if (_container->getItemByteSize(_mask)) // Has mask @@ -76,11 +72,6 @@ ImageAsset::ImageAsset(ObjID original, Container * container) { } ImageAsset::~ImageAsset() { - //if (_imgData) - // delete[] _imgData; - - //if (_maskData) - // delete[] _maskData; } void ImageAsset::decodePPIC(ObjID id, Common::Array<byte> &data) { @@ -348,6 +339,11 @@ void ImageAsset::blitInto(Graphics::ManagedSurface *target, uint32 x, uint32 y, } } +bool ImageAsset::isPointInside(Common::Point myPos, Common::Point click) { + Common::Rect bounds(myPos.x, myPos.y, myPos.x + _bitWidth, myPos.y + _bitHeight); + return bounds.contains(click); +} + void ImageAsset::blitDirect(Graphics::ManagedSurface * target, uint32 ox, uint32 oy, const Common::Array<byte>& data) { if (_bitWidth == 0 || _bitHeight == 0) return; uint w = _bitWidth; |