aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2015-06-13 00:37:32 +0200
committerMartin Kiewitz2015-06-13 00:37:32 +0200
commit210b9f92e10a5ddb1715b9f97a451f03ac1a862a (patch)
tree1c9012e1bcca7f440729dac530752f928945abbe
parent46a49849ccfbcf18148c21ba9e81d4f956cab9bb (diff)
downloadscummvm-rg350-210b9f92e10a5ddb1715b9f97a451f03ac1a862a.tar.gz
scummvm-rg350-210b9f92e10a5ddb1715b9f97a451f03ac1a862a.tar.bz2
scummvm-rg350-210b9f92e10a5ddb1715b9f97a451f03ac1a862a.zip
SHERLOCK: 3DO: adjust object cAnim loading
data layout is also not the same as on PC
-rw-r--r--engines/sherlock/objects.cpp25
-rw-r--r--engines/sherlock/scene.cpp4
2 files changed, 17 insertions, 12 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 27bbb39ead..9ef1accb80 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -1551,30 +1551,37 @@ void CAnim::load(Common::SeekableReadStream &s, bool isRoseTattoo) {
}
void CAnim::load3DO(Common::SeekableReadStream &s) {
- char buffer[12];
- s.read(buffer, 12);
- _name = Common::String(buffer);
+ // this got reordered on 3DO
+ // maybe it was the 3DO compiler
- s.read(_sequences, 30);
+ _size = s.readUint32BE();
_position.x = s.readSint16BE();
_position.y = s.readSint16BE();
-
- _size = s.readUint32BE();
+
_type = (SpriteType)s.readUint16BE();
- _flags = s.readByte();
_goto.x = s.readSint16BE();
_goto.y = s.readSint16BE();
_gotoDir = s.readSint16BE();
+
_teleportPos.x = s.readSint16BE();
_teleportPos.y = s.readSint16BE();
+ _teleportDir = s.readSint16BE();
+
+ char buffer[12];
+ s.read(buffer, 12);
+ _name = Common::String(buffer);
+
+ s.read(_sequences, 30);
+ _flags = s.readByte();
+
+ s.skip(3); // Filler
+
_goto.x = _goto.x * FIXED_INT_MULTIPLIER / 100;
_goto.y = _goto.y * FIXED_INT_MULTIPLIER / 100;
_teleportPos.x = _teleportPos.x * FIXED_INT_MULTIPLIER / 100;
_teleportPos.y = _teleportPos.y * FIXED_INT_MULTIPLIER / 100;
-
- _teleportDir = s.readSint16BE();
}
/*----------------------------------------------------------------*/
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 523245799f..8b1b41db68 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -686,10 +686,8 @@ bool Scene::loadScene(const Common::String &filename) {
// === CANIM === read cAnim list
_cAnim.clear();
if (header3DO_numAnimations) {
- int animSize = 65;
-
roomStream->seek(header3DO_cAnim_offset);
- Common::SeekableReadStream *canimStream = roomStream->readStream(animSize * header3DO_numAnimations);
+ Common::SeekableReadStream *canimStream = roomStream->readStream(header3DO_cAnim_size);
_cAnim.resize(header3DO_numAnimations);
for (uint idx = 0; idx < _cAnim.size(); ++idx)