diff options
author | Bertrand Augereau | 2011-08-29 12:38:22 +0200 |
---|---|---|
committer | Bertrand Augereau | 2011-08-29 15:19:21 +0200 |
commit | 3623ae35efd6269c862ab894ef03fbeb7704d765 (patch) | |
tree | 6bd0cf050112ed681113fb6cc895032195674667 /engines | |
parent | 57f00ff1dc920c132bd821ac61fd5261c848493c (diff) | |
download | scummvm-rg350-3623ae35efd6269c862ab894ef03fbeb7704d765.tar.gz scummvm-rg350-3623ae35efd6269c862ab894ef03fbeb7704d765.tar.bz2 scummvm-rg350-3623ae35efd6269c862ab894ef03fbeb7704d765.zip |
DREAMWEB: 'addtopeoplelist' ported to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 19 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 3 | ||||
-rw-r--r-- | engines/dreamweb/sprite.cpp | 8 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 10 insertions, 21 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index f716d89769..b7e5ba5917 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -2032,24 +2032,6 @@ gottrainframe: showgamereel(); } -void DreamGenContext::addtopeoplelist() { - STACK_CHECK; - push(es); - push(bx); - push(bx); - cl = es.byte(bx+7); - ax = es.word(bx+3); - bx = data.word(kListpos); - es = data.word(kBuffers); - es.word(bx) = ax; - ax = pop(); - es.word(bx+2) = ax; - es.byte(bx+4) = cl; - bx = pop(); - es = pop(); - _add(data.word(kListpos), 5); -} - void DreamGenContext::checkspeed() { STACK_CHECK; _cmp(data.byte(kLastweapon), -1); @@ -17948,7 +17930,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) { case addr_copper: copper(); break; case addr_sparky: sparky(); break; case addr_train: train(); break; - case addr_addtopeoplelist: addtopeoplelist(); break; case addr_checkspeed: checkspeed(); break; case addr_delsprite: delsprite(); break; case addr_mainman: mainman(); break; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 3ad99d1543..18b982f3e4 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -596,7 +596,6 @@ public: static const uint16 addr_mainman = 0xc138; static const uint16 addr_delsprite = 0xc11c; static const uint16 addr_checkspeed = 0xc110; - static const uint16 addr_addtopeoplelist = 0xc108; static const uint16 addr_train = 0xc104; static const uint16 addr_sparky = 0xc100; static const uint16 addr_copper = 0xc0fc; @@ -1413,7 +1412,7 @@ public: void showdiary(); void purgealocation(); //void updatepeople(); - void addtopeoplelist(); + //void addtopeoplelist(); void hangoncurs(); void sparkydrip(); void compare(); diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 17d4ddbbed..95d8321ad1 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -889,5 +889,13 @@ void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uin *type = tileData[2]; } +void DreamGenContext::addtopeoplelist() { + 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); + data.word(kListpos) += sizeof(People); +} + } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index bb5568e20d..746855b18d 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -193,4 +193,5 @@ void readmouse4(); uint16 waitframes(); void drawflags(); + void addtopeoplelist(); |