aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/utils.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-11 08:09:11 +0300
committerEugene Sandulenko2013-09-06 14:48:17 +0300
commitf18e318f788d126b6c39232afaf0012ef401d55d (patch)
tree0ded7bb7305ca6bb2147bc46fd81574dbf39a596 /engines/fullpipe/utils.cpp
parentc2103bb9cd4b8b2958ea99c7797df2cd4f0905d5 (diff)
downloadscummvm-rg350-f18e318f788d126b6c39232afaf0012ef401d55d.tar.gz
scummvm-rg350-f18e318f788d126b6c39232afaf0012ef401d55d.tar.bz2
scummvm-rg350-f18e318f788d126b6c39232afaf0012ef401d55d.zip
FULLPIPE: Bitmap loading
Diffstat (limited to 'engines/fullpipe/utils.cpp')
-rw-r--r--engines/fullpipe/utils.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 88a21a08fe..be1bcd38a6 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -134,15 +134,27 @@ void MemoryObject::loadFile(char *filename) {
if (s) {
assert(s->size() > 0);
- debug(0, "Loading %s", filename);
- _data = calloc(s->size(), 1);
- s->read(_data, s->size());
+ _dataSize = s->size();
+
+ debug(0, "Loading %s (%d bytes)", filename, _dataSize);
+ _data = (byte *)calloc(_dataSize, 1);
+ s->read(_data, _dataSize);
delete s;
}
}
}
+void *MemoryObject::getData() {
+ load();
+
+ if (_field_14 || _flags & 1) {
+ return _data;
+ } else {
+ error("Unhandled packed data");
+ }
+}
+
MemoryObject2::MemoryObject2() {
_data2 = 0;
}