diff options
author | lukaslw | 2014-10-07 02:56:34 +0200 |
---|---|---|
committer | lukaslw | 2014-10-07 02:56:34 +0200 |
commit | 80cf4bae8bb8fd11b7eef90f243c4ceade3cfb4c (patch) | |
tree | 6ddad4547e18950f6889e7f78e1d24b8bd861fa7 | |
parent | 115340bc874c0a79d64db93e1ed3d914b27fceb5 (diff) | |
download | scummvm-rg350-80cf4bae8bb8fd11b7eef90f243c4ceade3cfb4c.tar.gz scummvm-rg350-80cf4bae8bb8fd11b7eef90f243c4ceade3cfb4c.tar.bz2 scummvm-rg350-80cf4bae8bb8fd11b7eef90f243c4ceade3cfb4c.zip |
PRINCE: Script::loadAllMasks - fix
-rw-r--r-- | engines/prince/script.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index 5f178d96d2..38c0d3a345 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -347,17 +347,19 @@ void Script::installObjects(int offset) { bool Script::loadAllMasks(Common::Array<Mask> &maskList, int offset) { Mask tempMask; while (1) { - tempMask._state = READ_UINT32(&_data[offset]); + Common::MemoryReadStream maskStream(_data, _dataSize); + maskStream.seek(offset); + tempMask._state = maskStream.readUint16LE(); if (tempMask._state == -1) { break; } - tempMask._flags = READ_UINT32(&_data[offset + 2]); - tempMask._x1 = READ_UINT32(&_data[offset + 4]); - tempMask._y1 = READ_UINT32(&_data[offset + 6]); - tempMask._x2 = READ_UINT32(&_data[offset + 8]); - tempMask._y2 = READ_UINT32(&_data[offset + 10]); - tempMask._z = READ_UINT32(&_data[offset + 12]); - tempMask._number = READ_UINT32(&_data[offset + 14]); + tempMask._flags = maskStream.readUint16LE(); + tempMask._x1 = maskStream.readUint16LE(); + tempMask._y1 = maskStream.readUint16LE(); + tempMask._x2 = maskStream.readUint16LE(); + tempMask._y2 = maskStream.readUint16LE(); + tempMask._z = maskStream.readUint16LE(); + tempMask._number = maskStream.readUint16LE(); const Common::String msStreamName = Common::String::format("MS%02d", tempMask._number); Common::SeekableReadStream *msStream = SearchMan.createReadStreamForMember(msStreamName); |