aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-12-22 23:00:21 -0800
committerEugene Sandulenko2017-01-25 22:42:16 +0100
commit2f5932503c849a6001035ae37455ed15d4f19a2d (patch)
treec24c01221b9235bc8f86322cf16a6cdf6f12c854 /engines
parentf08b9f5f5b10491e0aeb14adc76716246ad1da5d (diff)
downloadscummvm-rg350-2f5932503c849a6001035ae37455ed15d4f19a2d.tar.gz
scummvm-rg350-2f5932503c849a6001035ae37455ed15d4f19a2d.tar.bz2
scummvm-rg350-2f5932503c849a6001035ae37455ed15d4f19a2d.zip
CRYO: Fix regression in room loading of the MAC version
Diffstat (limited to 'engines')
-rw-r--r--engines/cryo/eden.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index afd54b95e3..7d537c1bd6 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -4730,7 +4730,7 @@ void EdenGame::loadIconFile(uint16 num, Icon *buffer) {
PakHeaderItem *file = &bigfile_header->_files[num];
int32 size = file->_size;
int32 offs = file->_offs;
- debug("* Loading resource %d (%s) at 0x%X, %d bytes", num, file->_name.c_str(), offs, size);
+ debug("* Loading icon - Resource %d (%s) at 0x%X, %d bytes", num, file->_name.c_str(), offs, size);
h_bigfile.seek(offs, SEEK_SET);
int count = size / sizeof(Icon);
@@ -4765,9 +4765,8 @@ void EdenGame::loadRoomFile(uint16 num, Room *buffer) {
PakHeaderItem *file = &bigfile_header->_files[num];
int32 size = file->_size;
int32 offs = file->_offs;
- debug("* Loading resource %d (%s) at 0x%X, %d bytes", num, file->_name.c_str(), offs, size);
+ debug("* Loading room - Resource %d (%s) at 0x%X, %d bytes", num, file->_name.c_str(), offs, size);
h_bigfile.seek(offs, SEEK_SET);
- h_bigfile.read(buffer, size);
int count = size / sizeof(Room);
for (int i = 0; i < count; i++) {
@@ -4775,8 +4774,13 @@ void EdenGame::loadRoomFile(uint16 num, Room *buffer) {
for (int j = 0; j < 4; j++)
buffer[i]._exits[j] = h_bigfile.readByte();
buffer[i]._flags = h_bigfile.readByte();
- buffer[i]._bank = h_bigfile.readUint16LE();
- buffer[i]._party = h_bigfile.readUint16LE();
+ if (_vm->getPlatform() == Common::kPlatformMacintosh) {
+ buffer[i]._bank = h_bigfile.readUint16BE();
+ buffer[i]._party = h_bigfile.readUint16BE();
+ } else {
+ buffer[i]._bank = h_bigfile.readUint16LE();
+ buffer[i]._party = h_bigfile.readUint16LE();
+ }
buffer[i]._level = h_bigfile.readByte();
buffer[i]._video = h_bigfile.readByte();
buffer[i]._location = h_bigfile.readByte();