aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/objects.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-16 22:48:24 -0400
committerPaul Gilbert2015-05-16 22:48:24 -0400
commit46e27b6293c0de767c9713c08e89e63dcf52fcc3 (patch)
tree06453f1a036e673a154521e065a0c2c88f425683 /engines/sherlock/objects.cpp
parent7aa804b5ccd3489c852bbde01362bd2ce91d6cf8 (diff)
downloadscummvm-rg350-46e27b6293c0de767c9713c08e89e63dcf52fcc3.tar.gz
scummvm-rg350-46e27b6293c0de767c9713c08e89e63dcf52fcc3.tar.bz2
scummvm-rg350-46e27b6293c0de767c9713c08e89e63dcf52fcc3.zip
SHERLOCK: Update CAnim loading for Rose Tattoo
Diffstat (limited to 'engines/sherlock/objects.cpp')
-rw-r--r--engines/sherlock/objects.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index c6254ee7b5..2576ff04d6 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -1135,17 +1135,30 @@ const Common::Rect Object::getOldBounds() const {
/**
* Load the data for the animation
*/
-void CAnim::load(Common::SeekableReadStream &s) {
+void CAnim::load(Common::SeekableReadStream &s, bool isRoseTattoo) {
char buffer[12];
s.read(buffer, 12);
_name = Common::String(buffer);
- s.read(_sequences, 30);
+ if (isRoseTattoo) {
+ Common::fill(&_sequences[0], &_sequences[30], 0);
+ _size = s.readUint32LE();
+ } else {
+ s.read(_sequences, 30);
+ }
+
_position.x = s.readSint16LE();
_position.y = s.readSint16LE();
- _size = s.readUint32LE();
- _type = (SpriteType)s.readUint16LE();
- _flags = s.readByte();
+
+ if (isRoseTattoo) {
+ _flags = s.readByte();
+ _scaleVal = s.readSint16LE();
+ } else {
+ _size = s.readUint32LE();
+ _type = (SpriteType)s.readUint16LE();
+ _flags = s.readByte();
+ }
+
_goto.x = s.readSint16LE();
_goto.y = s.readSint16LE();
_gotoDir = s.readSint16LE();