diff options
author | Filippos Karapetis | 2011-12-06 04:54:59 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-06 04:54:59 +0200 |
commit | 1763415fe601de16bbf41ac7d99de5def117d55a (patch) | |
tree | 09d8766f285bacf269260abd611798d8b47223fe /engines/dreamweb | |
parent | 1bedd8bc1829e70f70fc22df298aa9c5f30c31cd (diff) | |
download | scummvm-rg350-1763415fe601de16bbf41ac7d99de5def117d55a.tar.gz scummvm-rg350-1763415fe601de16bbf41ac7d99de5def117d55a.tar.bz2 scummvm-rg350-1763415fe601de16bbf41ac7d99de5def117d55a.zip |
DREAMWEB: 'useWall' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 56 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/use.cpp | 44 |
4 files changed, 45 insertions, 57 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 0129dbdedd..721a5f9184 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -7470,62 +7470,6 @@ void DreamGenContext::setupTimedUse() { data.word(kTimedoffset) = bx; } -void DreamGenContext::useWall() { - STACK_CHECK; - showFirstUse(); - _cmp(data.byte(kManspath), 3); - if (flags.z()) - goto gobackover; - data.word(kWatchingtime) = 30*2; - data.word(kReeltowatch) = 2; - data.word(kEndwatchreel) = 31; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; - al = 3; - turnPathOn(); - al = 4; - turnPathOn(); - al = 0; - turnPathOff(); - al = 1; - turnPathOff(); - al = 2; - turnPathOff(); - al = 5; - turnPathOff(); - data.byte(kManspath) = 3; - data.byte(kFinaldest) = 3; - findXYFromPath(); - data.byte(kResetmanxy) = 1; - switchRyanOff(); - return; -gobackover: - data.word(kWatchingtime) = 30*2; - data.word(kReeltowatch) = 34; - data.word(kEndwatchreel) = 60; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; - al = 3; - turnPathOff(); - al = 4; - turnPathOff(); - al = 0; - turnPathOn(); - al = 1; - turnPathOn(); - al = 2; - turnPathOn(); - al = 5; - turnPathOn(); - data.byte(kManspath) = 5; - data.byte(kFinaldest) = 5; - findXYFromPath(); - data.byte(kResetmanxy) = 1; - switchRyanOff(); -} - void DreamGenContext::useChurchGate() { STACK_CHECK; _cmp(data.byte(kWithobject), 255); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 678a14858e..72ef49259b 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -564,7 +564,6 @@ public: void isRyanHolding(); void showSlots(); void useCashCard(); - void useWall(); void openTomb(); void doSomeTalk(); void getAnyAdDir(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index a4eb596ede..80c764549c 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -392,6 +392,7 @@ void wheelSound(); void callHotelLift(); void useShield(); + void useWall(); void wearWatch(); void wearShades(); void checkFolderCoords(); diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index e8c9f508cd..15e9a04cce 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -520,5 +520,49 @@ void DreamGenContext::openLouis() { data.byte(kGetback) = 1; } + +void DreamGenContext::useWall() { + showFirstUse(); + + if (data.byte(kManspath) != 3) { + data.word(kWatchingtime) = 30*2; + data.word(kReeltowatch) = 2; + data.word(kEndwatchreel) = 31; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; + turnPathOn(3); + turnPathOn(4); + turnPathOff(0); + turnPathOff(1); + turnPathOff(2); + turnPathOff(5); + data.byte(kManspath) = 3; + data.byte(kFinaldest) = 3; + findXYFromPath(); + data.byte(kResetmanxy) = 1; + switchRyanOff(); + } else { + // Go back over + data.word(kWatchingtime) = 30 * 2; + data.word(kReeltowatch) = 34; + data.word(kEndwatchreel) = 60; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; + turnPathOff(3); + turnPathOff(4); + turnPathOn(0); + turnPathOn(1); + turnPathOn(2); + turnPathOn(5); + data.byte(kManspath) = 5; + data.byte(kFinaldest) = 5; + findXYFromPath(); + data.byte(kResetmanxy) = 1; + switchRyanOff(); + } +} + } /*namespace dreamgen */ |