diff options
-rw-r--r-- | engines/prince/script.cpp | 14 | ||||
-rw-r--r-- | engines/prince/script.h | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index a0c015d48b..4c90dd5454 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -46,6 +46,7 @@ bool Room::loadRoom(byte *roomData) { _mobs = roomStream.readSint32LE(); _backAnim = roomStream.readSint32LE(); + debug("%d", _backAnim); _obj = roomStream.readSint32LE(); _nak = roomStream.readSint32LE(); _itemUse = roomStream.readSint32LE(); @@ -201,7 +202,18 @@ uint32 Script::getStartGameOffset() { } uint8 *Script::getRoomOffset(int locationNr) { - return &_data[_scriptInfo.rooms + locationNr * 64]; // Room_Len (64?) + return &_data[_scriptInfo.rooms + locationNr * 64]; +} + +void Script::installBackAnims(int offset) { + // 3760 + int numberOfSubAnimations = READ_UINT32(&_data[offset]); + debug("nrOfSubAnimations: %d", numberOfSubAnimations); + // begin data of animations: + int value1 = READ_UINT32(&_data[offset + 28]); //size of BAS - first anim Nr + debug("firstAnimNr: %d", value1); + int value2 = READ_UINT32(&_data[offset + 28 + 8]); // + size of BASA - next anim Nr + debug("secondAnimNr: %d", value2); } InterpreterFlags::InterpreterFlags() { diff --git a/engines/prince/script.h b/engines/prince/script.h index 5a1e49ab23..ee8f5a3bf7 100644 --- a/engines/prince/script.h +++ b/engines/prince/script.h @@ -130,6 +130,7 @@ public: int16 getLightY(int locationNr); int32 getShadowScale(int locationNr); uint8 *getRoomOffset(int locationNr); + void installBackAnims(int offset); const char *getString(uint32 offset) { return (const char *)(&_data[offset]); |