aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-09-21 19:44:42 -0400
committerMatthew Hoops2011-09-21 19:44:42 -0400
commit46bc7e6c4d6ec9addccff397f1c8439d6a86bb20 (patch)
tree06d7fa4a0e6c99877eb201c2aae42382845f7a3e
parent64d0b6df58195fb42cfc813270b6d2107c3404c8 (diff)
downloadscummvm-rg350-46bc7e6c4d6ec9addccff397f1c8439d6a86bb20.tar.gz
scummvm-rg350-46bc7e6c4d6ec9addccff397f1c8439d6a86bb20.tar.bz2
scummvm-rg350-46bc7e6c4d6ec9addccff397f1c8439d6a86bb20.zip
PEGASUS: Fix bounds of Pictures
-rwxr-xr-xengines/pegasus/surface.cpp16
-rwxr-xr-xengines/pegasus/surface.h3
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 &);
};