diff options
author | Bertrand Augereau | 2011-08-29 14:55:57 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-08-29 15:19:22 +0200 |
commit | 14ac4efa09f1b6b59f60769770a519397c6da3de (patch) | |
tree | fb7dcc798a9e274eb5fc4ea49376f117dd2d3de3 /engines | |
parent | 3d85a4974bfd93a69fa51f54b12c0728509450fa (diff) | |
download | scummvm-rg350-14ac4efa09f1b6b59f60769770a519397c6da3de.tar.gz scummvm-rg350-14ac4efa09f1b6b59f60769770a519397c6da3de.tar.bz2 scummvm-rg350-14ac4efa09f1b6b59f60769770a519397c6da3de.zip |
DREAMWEB: 'addpeoplelist' takes a ReelRoutine* param
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/sprite.cpp | 12 | ||||
-rw-r--r-- | engines/dreamweb/structs.h | 8 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 4 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 16 insertions, 9 deletions
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index f555daa626..c2ec27739c 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -890,10 +890,16 @@ void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uin } void DreamGenContext::addtopeoplelist() { + addtopeoplelist((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine))); +} + +void DreamGenContext::addtopeoplelist(ReelRoutine *routine) { + uint16 routinePointer = (const uint8 *)routine - cs.ptr(0, 0); + People *people = (People *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(People)); - people->setW0(es.word(bx+3)); - people->setW2(bx); - people->b4 = es.byte(bx+7); + people->setReelPointer(routine->reelPointer()); + people->setRoutinePointer(routinePointer); + people->b4 = routine->b7; data.word(kListpos) += sizeof(People); } diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h index 804684ad33..6d3deacc6f 100644 --- a/engines/dreamweb/structs.h +++ b/engines/dreamweb/structs.h @@ -178,12 +178,12 @@ struct ReelRoutine { struct People { uint8 b0; uint8 b1; - uint16 w0() const { return READ_LE_UINT16(&b0); } - void setW0(uint16 v) { WRITE_LE_UINT16(&b0, v); } + uint16 reelPointer() const { return READ_LE_UINT16(&b0); } + void setReelPointer(uint16 v) { WRITE_LE_UINT16(&b0, v); } uint8 b2; uint8 b3; - uint16 w2() const { return READ_LE_UINT16(&b2); } - void setW2(uint16 v) { WRITE_LE_UINT16(&b2, v); } + uint16 routinePointer() const { return READ_LE_UINT16(&b2); } + void setRoutinePointer(uint16 v) { WRITE_LE_UINT16(&b2, v); } uint8 b4; }; diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index d56394ea3f..33f7a414f9 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -985,7 +985,7 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) { for (size_t i = 0; i < 12; ++i, ++people) { if (people->b4 == 255) continue; - data.word(kReelpointer) = people->w0(); + data.word(kReelpointer) = people->reelPointer(); Reel *reel = getreelstart(); if (reel->frame() == 0xffff) ++reel; @@ -1002,7 +1002,7 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) { continue; if (y >= ymax) continue; - data.word(kPersondata) = people->w2(); + data.word(kPersondata) = people->routinePointer(); obname(people->b4, 5); return true; } diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 2d5d45a692..70236aacb1 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -195,4 +195,5 @@ uint16 waitframes(); void drawflags(); void addtopeoplelist(); + void addtopeoplelist(ReelRoutine *routine); |