diff options
author | Filippos Karapetis | 2011-12-12 16:55:32 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-12 16:55:32 +0200 |
commit | 273fc3ff1a0ed8b1d1140bb5225ad77e07cb08d7 (patch) | |
tree | 82357d8b25a92a7678d90cbbe9d56dee59ecd360 | |
parent | cc079c739a428c3a85bfa7eb365e25f5cbcc3361 (diff) | |
download | scummvm-rg350-273fc3ff1a0ed8b1d1140bb5225ad77e07cb08d7.tar.gz scummvm-rg350-273fc3ff1a0ed8b1d1140bb5225ad77e07cb08d7.tar.bz2 scummvm-rg350-273fc3ff1a0ed8b1d1140bb5225ad77e07cb08d7.zip |
DREAMWEB: Port 'usebuttona' to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 28 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
5 files changed, 22 insertions, 29 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 5558a93f7a..c35edbfba1 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -750,6 +750,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'undertextline', 'updatepeople', 'usebalcony', + 'usebuttona', 'usecardreader1', 'usecardreader2', 'usecardreader3', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 8d1eb4cec9..fbe02df17d 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -4849,34 +4849,6 @@ nottvsoldier: putBackObStuff(); } -void DreamGenContext::useButtonA() { - STACK_CHECK; - al = 95; - isSetObOnMap(); - if (flags.z()) - goto donethisbit; - showFirstUse(); - al = 0; - ah = data.byte(kRoomnum); - _dec(ah); - turnAnyPathOn(); - al = 9; - removeSetObject(); - al = 95; - placeSetObject(); - data.word(kWatchingtime) = 15*2; - data.word(kReeltowatch) = 71; - data.word(kEndwatchreel) = 85; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; - _inc(data.byte(kProgresspoints)); - return; -donethisbit: - showSecondUse(); - putBackObStuff(); -} - void DreamGenContext::quitKey() { STACK_CHECK; _cmp(data.byte(kCommandtype), 222); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 04c5116b83..eff4ecf6c8 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -610,7 +610,6 @@ public: void searchForFiles(); void getExAd(); void initialMonCols(); - void useButtonA(); void execCommand(); void updateSymbolBot(); void findPuzText(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 0b3daa861e..71a6834b73 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -4242,4 +4242,24 @@ void DreamGenContext::monkSpeaking() { getRidOfTemp(); } +void DreamGenContext::useButtonA() { + if (!isSetObOnMap(95)) { + showFirstUse(); + turnAnyPathOn(0, data.byte(kRoomnum) - 1); + removeSetObject(9); + placeSetObject(95); + data.word(kWatchingtime) = 15 * 2; + data.word(kReeltowatch) = 71; + data.word(kEndwatchreel) = 85; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; + data.byte(kProgresspoints)++; + } else { + // Done this bit + showSecondUse(); + putBackObStuff(); + } +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 4e9dbb8448..4efcc3c07e 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -564,5 +564,6 @@ void showPuzText(); void monkSpeaking(); void rollEndCredits2(); + void useButtonA(); #endif |