[Scummvm-cvs-logs] scummvm master -> 210b9f92e10a5ddb1715b9f97a451f03ac1a862a
m-kiewitz
m_kiewitz at users.sourceforge.net
Sat Jun 13 00:38:26 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
210b9f92e1 SHERLOCK: 3DO: adjust object cAnim loading
Commit: 210b9f92e10a5ddb1715b9f97a451f03ac1a862a
https://github.com/scummvm/scummvm/commit/210b9f92e10a5ddb1715b9f97a451f03ac1a862a
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-13T00:37:32+02:00
Commit Message:
SHERLOCK: 3DO: adjust object cAnim loading
data layout is also not the same as on PC
Changed paths:
engines/sherlock/objects.cpp
engines/sherlock/scene.cpp
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 27bbb39..9ef1acc 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 5232457..8b1b41d 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)
More information about the Scummvm-git-logs
mailing list