From 33ed84ff74fabac68d0900223e82c2717927ef2f Mon Sep 17 00:00:00 2001 From: Borja Lorente Date: Sun, 17 Jul 2016 02:06:35 +0200 Subject: MACVENTURE: Fix small render error --- engines/macventure/image.cpp | 6 ++++-- engines/macventure/image.h | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'engines/macventure') diff --git a/engines/macventure/image.cpp b/engines/macventure/image.cpp index fa281eb19a..feb4d2e78b 100644 --- a/engines/macventure/image.cpp +++ b/engines/macventure/image.cpp @@ -386,11 +386,13 @@ bool ImageAsset::isRectInside(Common::Rect rect) { return false; } -uint ImageAsset::getWidth() { +int ImageAsset::getWidth() { + if (_imgData.size() == 0) return 0; return MAX(0, (int)_bitWidth); } -uint ImageAsset::getHeight() { +int ImageAsset::getHeight() { + if (_imgData.size() == 0) return 0; return MAX(0, (int)_bitHeight); } diff --git a/engines/macventure/image.h b/engines/macventure/image.h index 5cbe146055..b529109442 100644 --- a/engines/macventure/image.h +++ b/engines/macventure/image.h @@ -55,7 +55,7 @@ struct PPICHuff { class ImageAsset { public: - ImageAsset(ObjID original, Container *container); + ImageAsset(ObjID original, Container *container); ~ImageAsset(); void blitInto(Graphics::ManagedSurface *target, uint32 x, uint32 y, BlitMode mode); @@ -63,8 +63,8 @@ public: bool isPointInside(Common::Point point); bool isRectInside(Common::Rect rect); - uint getWidth(); - uint getHeight(); + int getWidth(); + int getHeight(); private: void decodePPIC(ObjID id, Common::Array &data); -- cgit v1.2.3