aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 &);
};