aboutsummaryrefslogtreecommitdiff
path: root/engines/prince/object.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2018-05-05 20:47:18 +0200
committerEugene Sandulenko2018-05-05 23:17:35 +0200
commit5515f414afd062b78a60c71fb465e978dfef62ae (patch)
tree8a9f80f0f4b3e7f79b5c9726f63693743aecf4e8 /engines/prince/object.cpp
parent85aa17d9ac8c97f0939bdd9380f97c8a71fcd140 (diff)
downloadscummvm-rg350-5515f414afd062b78a60c71fb465e978dfef62ae.tar.gz
scummvm-rg350-5515f414afd062b78a60c71fb465e978dfef62ae.tar.bz2
scummvm-rg350-5515f414afd062b78a60c71fb465e978dfef62ae.zip
PRINCE: Decompress files if they're extracted
Diffstat (limited to 'engines/prince/object.cpp')
-rw-r--r--engines/prince/object.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/prince/object.cpp b/engines/prince/object.cpp
index e4a3eda689..109d180355 100644
--- a/engines/prince/object.cpp
+++ b/engines/prince/object.cpp
@@ -28,6 +28,7 @@
#include "graphics/surface.h"
#include "prince/object.h"
+#include "prince/resource.h"
namespace Prince {
@@ -73,6 +74,8 @@ bool Object::loadFromStream(Common::SeekableReadStream &stream) {
const Common::String obStreamName = Common::String::format("OB%02d", stream.readUint16LE());
Common::SeekableReadStream *obStream = SearchMan.createReadStreamForMember(obStreamName);
if (obStream) {
+ obStream = Resource::getDecompressedStream(obStream);
+
loadSurface(*obStream);
}
delete obStream;