diff options
author | Matthew Hoops | 2011-09-21 19:44:42 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-09-21 19:44:42 -0400 |
commit | 46bc7e6c4d6ec9addccff397f1c8439d6a86bb20 (patch) | |
tree | 06d7fa4a0e6c99877eb201c2aae42382845f7a3e | |
parent | 64d0b6df58195fb42cfc813270b6d2107c3404c8 (diff) | |
download | scummvm-rg350-46bc7e6c4d6ec9addccff397f1c8439d6a86bb20.tar.gz scummvm-rg350-46bc7e6c4d6ec9addccff397f1c8439d6a86bb20.tar.bz2 scummvm-rg350-46bc7e6c4d6ec9addccff397f1c8439d6a86bb20.zip |
PEGASUS: Fix bounds of Pictures
-rwxr-xr-x | engines/pegasus/surface.cpp | 16 | ||||
-rwxr-xr-x | engines/pegasus/surface.h | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/engines/pegasus/surface.cpp b/engines/pegasus/surface.cpp index 48f9fa3cb2..fb64c92c21 100755 --- a/engines/pegasus/surface.cpp +++ b/engines/pegasus/surface.cpp @@ -234,4 +234,20 @@ void Picture::draw(const Common::Rect &r) { drawImage(r2, r1); } +void Picture::initFromPICTFile(const Common::String &fileName, bool transparent) { + Frame::initFromPICTFile(fileName, transparent); + + Common::Rect surfaceBounds; + getSurfaceBounds(surfaceBounds); + setBounds(surfaceBounds); +} + +void Picture::initFromPICTResource(Common::MacResManager *resFork, uint16 id, bool transparent) { + Frame::initFromPICTResource(resFork, id, transparent); + + Common::Rect surfaceBounds; + getSurfaceBounds(surfaceBounds); + setBounds(surfaceBounds); +} + } // End of namespace Pegasus diff --git a/engines/pegasus/surface.h b/engines/pegasus/surface.h index 9493323af6..72d614f963 100755 --- a/engines/pegasus/surface.h +++ b/engines/pegasus/surface.h @@ -120,6 +120,9 @@ public: Picture(const tDisplayElementID id) : DisplayElement(id) {} virtual ~Picture() {} + virtual void initFromPICTFile(const Common::String &fileName, bool transparent = false); + virtual void initFromPICTResource(Common::MacResManager *resFork, uint16 id, bool transparent = false); + virtual void draw(const Common::Rect &); }; |