diff options
author | Eugene Sandulenko | 2013-07-11 08:09:11 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:48:17 +0300 |
commit | f18e318f788d126b6c39232afaf0012ef401d55d (patch) | |
tree | 0ded7bb7305ca6bb2147bc46fd81574dbf39a596 /engines/fullpipe/utils.cpp | |
parent | c2103bb9cd4b8b2958ea99c7797df2cd4f0905d5 (diff) | |
download | scummvm-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.cpp | 18 |
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; } |