diff options
author | lukaslw | 2014-05-22 15:40:02 +0200 |
---|---|---|
committer | lukaslw | 2014-06-22 20:08:10 +0200 |
commit | 67956c58052e1141b97bb35d3096aa83f08478cd (patch) | |
tree | 323ff59affbaa7088d6e41b038982e7e1961a215 | |
parent | 55112318a52155f3fef95173380364c647b8ccf2 (diff) | |
download | scummvm-rg350-67956c58052e1141b97bb35d3096aa83f08478cd.tar.gz scummvm-rg350-67956c58052e1141b97bb35d3096aa83f08478cd.tar.bz2 scummvm-rg350-67956c58052e1141b97bb35d3096aa83f08478cd.zip |
PRINCE: installBackAnims() - memory offset testing
-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]); |