diff options
author | Filippos Karapetis | 2011-12-06 03:20:30 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-06 03:20:30 +0200 |
commit | e1a53cc455c79ce72415581d01aeacc86ee9a2eb (patch) | |
tree | 76a3a649224fe7a44b0b569b6391f1df31d88292 | |
parent | f50fd3b7f93a8425f1a22e85b2012bca933252db (diff) | |
download | scummvm-rg350-e1a53cc455c79ce72415581d01aeacc86ee9a2eb.tar.gz scummvm-rg350-e1a53cc455c79ce72415581d01aeacc86ee9a2eb.tar.bz2 scummvm-rg350-e1a53cc455c79ce72415581d01aeacc86ee9a2eb.zip |
DREAMWEB: 'calledensdlift', 'calledenslift', 'sitdowninbar', 'trapdoor', 'usebalcony', 'usechurchhole', 'usecoveredbox', 'useelevator2', 'useelevator5', 'usedryer', 'userailing', 'usewindow', 'wearwatch', 'wearshades' ported to C++
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 14 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 215 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 14 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 14 | ||||
-rw-r--r-- | engines/dreamweb/use.cpp | 178 |
5 files changed, 206 insertions, 229 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 9ff1f26250..930091d394 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -176,6 +176,8 @@ generator = cpp(context, "DreamGen", blacklist = [ 'buttontwo', 'calcfrframe', 'calcmapad', + 'calledensdlift', + 'calledenslift', 'callhotellift', 'cancelch0', 'cancelch1', @@ -505,6 +507,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'showwatch', 'showword', 'singlekey', + 'sitdowninbar', 'smokebloke', 'sortoutmap', 'soundonreels', @@ -528,6 +531,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'titles', 'transferinv', 'transfertext', + 'trapdoor', 'trysoundalloc', 'turnanypathoff', 'turnanypathon', @@ -536,24 +540,34 @@ generator = cpp(context, "DreamGen", blacklist = [ 'turnpathon', 'twodigitnum', 'updatepeople', + 'usebalcony', 'usecharset1', + 'usechurchhole', + 'usecoveredbox', + 'usedryer', 'useelevator1', + 'useelevator2', 'useelevator3', 'useelevator4', + 'useelevator5', 'usehatch', 'usemenu', 'usemon', + 'userailing', 'useroutine', 'useshield', 'usetempcharset', 'usetext', 'usetimedtext', + 'usewindow', 'viewfolder', 'waitframes', 'walkandexamine', 'walking', 'walktotext', 'watchcount', + 'wearwatch', + 'wearshades', 'wheelsound', 'widedoor', 'width160', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index c1a4a41138..d5bf1977d0 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -6127,30 +6127,6 @@ openbox: data.byte(kGetback) = 1; } -void DreamGenContext::useCoveredBox() { - STACK_CHECK; - _inc(data.byte(kProgresspoints)); - showFirstUse(); - data.word(kWatchingtime) = 50; - data.word(kReeltowatch) = 41; - data.word(kEndwatchreel) = 66; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; -} - -void DreamGenContext::useRailing() { - STACK_CHECK; - showFirstUse(); - data.word(kWatchingtime) = 80; - data.word(kReeltowatch) = 0; - data.word(kEndwatchreel) = 30; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; - data.byte(kMandead) = 4; -} - void DreamGenContext::useOpenBox() { STACK_CHECK; _cmp(data.byte(kWithobject), 255); @@ -6203,69 +6179,6 @@ openboxwrong: putBackObStuff(); } -void DreamGenContext::wearWatch() { - STACK_CHECK; - _cmp(data.byte(kWatchon), 1); - if (flags.z()) - goto wearingwatch; - showFirstUse(); - data.byte(kWatchon) = 1; - data.byte(kGetback) = 1; - getAnyAd(); - makeWorn(); - return; -wearingwatch: - showSecondUse(); - putBackObStuff(); -} - -void DreamGenContext::wearShades() { - STACK_CHECK; - _cmp(data.byte(kShadeson), 1); - if (flags.z()) - goto wearingshades; - data.byte(kShadeson) = 1; - showFirstUse(); - data.byte(kGetback) = 1; - getAnyAd(); - makeWorn(); - return; -wearingshades: - showSecondUse(); - putBackObStuff(); -} - -void DreamGenContext::sitDownInBar() { - STACK_CHECK; - _cmp(data.byte(kWatchmode), -1); - if (!flags.z()) - goto satdown; - showFirstUse(); - data.word(kWatchingtime) = 50; - data.word(kReeltowatch) = 55; - data.word(kEndwatchreel) = 71; - data.word(kReeltohold) = 73; - data.word(kEndofholdreel) = 83; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; - return; -satdown: - showSecondUse(); - putBackObStuff(); -} - -void DreamGenContext::useChurchHole() { - STACK_CHECK; - showFirstUse(); - data.byte(kGetback) = 1; - data.word(kWatchingtime) = 28; - data.word(kReeltowatch) = 13; - data.word(kEndwatchreel) = 26; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; -} - void DreamGenContext::useHole() { STACK_CHECK; _cmp(data.byte(kWithobject), 255); @@ -6374,14 +6287,6 @@ keyontv: data.byte(kGetback) = 1; } -void DreamGenContext::useDryer() { - STACK_CHECK; - al = 12; - playChannel1(); - showFirstUse(); - data.byte(kGetback) = 1; -} - void DreamGenContext::openLouis() { STACK_CHECK; al = 5; @@ -6412,53 +6317,6 @@ void DreamGenContext::openYourNeighbour() { data.byte(kGetback) = 1; } -void DreamGenContext::useWindow() { - STACK_CHECK; - _cmp(data.byte(kManspath), 6); - if (!flags.z()) - goto notonbalc; - _inc(data.byte(kProgresspoints)); - showFirstUse(); - data.byte(kNewlocation) = 29; - data.byte(kGetback) = 1; - return; -notonbalc: - showSecondUse(); - putBackObStuff(); -} - -void DreamGenContext::useBalcony() { - STACK_CHECK; - showFirstUse(); - al = 6; - turnPathOn(); - al = 0; - turnPathOff(); - al = 1; - turnPathOff(); - al = 2; - turnPathOff(); - al = 3; - turnPathOff(); - al = 4; - turnPathOff(); - al = 5; - turnPathOff(); - _inc(data.byte(kProgresspoints)); - data.byte(kManspath) = 6; - data.byte(kDestination) = 6; - data.byte(kFinaldest) = 6; - findXYFromPath(); - switchRyanOff(); - data.byte(kResetmanxy) = 1; - data.word(kWatchingtime) = 30*2; - data.word(kReeltowatch) = 183; - data.word(kEndwatchreel) = 212; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; -} - void DreamGenContext::openRyan() { STACK_CHECK; al = 5; @@ -6593,45 +6451,6 @@ dograf: putBackObStuff(); } -void DreamGenContext::trapDoor() { - STACK_CHECK; - _inc(data.byte(kProgresspoints)); - showFirstUse(); - switchRyanOff(); - data.word(kWatchingtime) = 20*2; - data.word(kReeltowatch) = 181; - data.word(kEndwatchreel) = 197; - data.byte(kNewlocation) = 26; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - data.byte(kGetback) = 1; -} - -void DreamGenContext::callEdensLift() { - STACK_CHECK; - showFirstUse(); - data.byte(kCounttoopen) = 8; - data.byte(kGetback) = 1; - al = 2; - turnPathOn(); -} - -void DreamGenContext::callEdensDLift() { - STACK_CHECK; - _cmp(data.byte(kLiftflag), 1); - if (flags.z()) - goto edensdhere; - showFirstUse(); - data.byte(kCounttoopen) = 8; - data.byte(kGetback) = 1; - al = 2; - turnPathOn(); - return; -edensdhere: - showSecondUse(); - putBackObStuff(); -} - void DreamGenContext::usePoolReader() { STACK_CHECK; _cmp(data.byte(kWithobject), 255); @@ -7179,40 +6998,6 @@ havecutwire: data.byte(kGetback) = 1; } -void DreamGenContext::useElevator2() { - STACK_CHECK; - _cmp(data.byte(kLocation), 23); - if (flags.z()) - goto inpoolhall; - showFirstUse(); - data.byte(kNewlocation) = 23; - data.byte(kCounttoclose) = 20; - data.byte(kCounttoopen) = 0; - data.word(kWatchingtime) = 80; - data.byte(kGetback) = 1; - return; -inpoolhall: - showFirstUse(); - data.byte(kNewlocation) = 31; - data.byte(kCounttoclose) = 20; - data.byte(kCounttoopen) = 0; - data.word(kWatchingtime) = 80; - data.byte(kGetback) = 1; -} - -void DreamGenContext::useElevator5() { - STACK_CHECK; - al = 4; - placeSetObject(); - al = 0; - removeSetObject(); - data.byte(kNewlocation) = 20; - data.word(kWatchingtime) = 80; - data.byte(kLiftflag) = 1; - data.byte(kCounttoclose) = 8; - data.byte(kGetback) = 1; -} - void DreamGenContext::useKey() { STACK_CHECK; _cmp(data.byte(kLocation), 5); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index a70133f5ce..327a8a1e44 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -575,9 +575,7 @@ public: void introMonks1(); void resetLocation(); void introMonks2(); - void useElevator5(); void greyscaleSum(); - void useElevator2(); void keyboardRead(); void getOpenedSize(); void resetKeyboard(); @@ -616,7 +614,6 @@ public: void selectSlot2(); void runTap(); void talk(); - void useBalcony(); void dumpDiaryKeys(); void disableSoundInt(); void priestText(); @@ -625,7 +622,6 @@ public: void lookInInterface(); void loadSpeech(); void adjustLeft(); - void callEdensLift(); void useClearBox(); void entryAnims(); void getFreeAd(); @@ -634,7 +630,6 @@ public: void printOuterMon(); void showDecisions(); void removeObFromInv(); - void useCoveredBox(); void openYourNeighbour(); void heavy(); void useKey(); @@ -646,7 +641,6 @@ public: void dirFile(); void pickupConts(); void lockLightOff(); - void wearWatch(); void runIntroSeq(); void advisor(); void attendant(); @@ -711,7 +705,6 @@ public: void setKeyboardInt(); void priest(); void printmessage2(); - void wearShades(); void hangOnPQ(); void findOpenPos(); void describeOb(); @@ -722,7 +715,6 @@ public: void chewy(); void getBack1(); void fadeFromWhite(); - void useWindow(); void rollEm(); void delEverything(); void poolGuard(); @@ -746,7 +738,6 @@ public: void destSelect(); void lastDest(); void removeFreeObject(); - void trapDoor(); void openLouis(); void lookAtCard(); void helicopter(); @@ -779,7 +770,6 @@ public: void swapWithOpen(); void dreamweb(); void dropError(); - void callEdensDLift(); void checkInside(); void newGame(); void setWalk(); @@ -811,7 +801,6 @@ public: void incRyanPage(); void findExObject(); void manAsleep2(); - void useChurchHole(); void searchForFiles(); void monkSpeaking(); void clearRest(); @@ -849,7 +838,6 @@ public: void openHotelDoor2(); void selectLocation(); void underTextLine(); - void sitDownInBar(); void showNames(); void saveFileRead(); void emergencyPurge(); @@ -859,12 +847,10 @@ public: void processTrigger(); void volumeAdjust(); void transferConToEx(); - void useDryer(); void adjustDown(); void withWhat(); void openOb(); void createFile(); - void useRailing(); void useHole(); void useObject(); void fadeToWhite(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 03b796a180..ff5c02e0d7 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -373,13 +373,27 @@ void edensCDPlayer(); void hotelBell(); void playGuitar(); + void callEdensDLift(); + void callEdensLift(); + void sitDownInBar(); + void trapDoor(); + void useBalcony(); + void useChurchHole(); + void useCoveredBox(); void useElevator1(); + void useElevator2(); void useElevator3(); void useElevator4(); + void useElevator5(); + void useDryer(); + void useRailing(); + void useWindow(); void useHatch(); void wheelSound(); void callHotelLift(); void useShield(); + void wearWatch(); + void wearShades(); void checkFolderCoords(); void loadFolder(); void showFolder(); diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 4421134f9b..467f8673b5 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -251,6 +251,20 @@ void DreamGenContext::useElevator1() { data.byte(kGetback) = 1; } +void DreamGenContext::useElevator2() { + showFirstUse(); + + if (data.byte(kLocation) == 23) // In pool hall + data.byte(kNewlocation) = 31; + else + data.byte(kNewlocation) = 23; + + data.byte(kCounttoclose) = 20; + data.byte(kCounttoopen) = 0; + data.word(kWatchingtime) = 80; + data.byte(kGetback) = 1; +} + void DreamGenContext::useElevator3() { showFirstUse(); data.byte(kCounttoclose) = 20; @@ -275,6 +289,16 @@ void DreamGenContext::useElevator4() { data.byte(kNewlocation) = 24; } +void DreamGenContext::useElevator5() { + placeSetObject(4); + removeSetObject(0); + data.byte(kNewlocation) = 20; + data.word(kWatchingtime) = 80; + data.byte(kLiftflag) = 1; + data.byte(kCounttoclose) = 8; + data.byte(kGetback) = 1; +} + void DreamGenContext::useHatch() { showFirstUse(); data.byte(kNewlocation) = 40; @@ -312,5 +336,159 @@ void DreamGenContext::useShield() { } } +void DreamGenContext::useCoveredBox() { + data.byte(kProgresspoints) = data.byte(kProgresspoints) + 1; + showFirstUse(); + data.word(kWatchingtime) = 50; + data.word(kReeltowatch) = 41; + data.word(kEndwatchreel) = 66; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; +} + +void DreamGenContext::useRailing() { + showFirstUse(); + data.word(kWatchingtime) = 80; + data.word(kReeltowatch) = 0; + data.word(kEndwatchreel) = 30; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; + data.byte(kMandead) = 4; +} + +void DreamGenContext::wearWatch() { + if (data.byte(kWatchon) == 1) { + // Already wearing watch + showSecondUse(); + putBackObStuff(); + } else { + showFirstUse(); + data.byte(kWatchon) = 1; + data.byte(kGetback) = 1; + getAnyAd(); + makeWorn(); + } +} + +void DreamGenContext::wearShades() { + if (data.byte(kShadeson) == 1) { + // Already wearing shades + showSecondUse(); + putBackObStuff(); + } else { + data.byte(kShadeson) = 1; + showFirstUse(); + data.byte(kGetback) = 1; + getAnyAd(); + makeWorn(); + } +} + +void DreamGenContext::useChurchHole() { + showFirstUse(); + data.byte(kGetback) = 1; + data.word(kWatchingtime) = 28; + data.word(kReeltowatch) = 13; + data.word(kEndwatchreel) = 26; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; +} + +void DreamGenContext::sitDownInBar() { + if (data.byte(kWatchmode) == 0xFF) { + // Sat down + showSecondUse(); + putBackObStuff(); + } else { + showFirstUse(); + data.word(kWatchingtime) = 50; + data.word(kReeltowatch) = 55; + data.word(kEndwatchreel) = 71; + data.word(kReeltohold) = 73; + data.word(kEndofholdreel) = 83; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; + } +} + +void DreamGenContext::useDryer() { + playChannel1(12); + showFirstUse(); + data.byte(kGetback) = 1; +} + +void DreamGenContext::useBalcony() { + showFirstUse(); + turnPathOn(6); + turnPathOff(0); + turnPathOff(1); + turnPathOff(2); + turnPathOff(3); + turnPathOff(4); + turnPathOff(5); + data.byte(kProgresspoints) = data.byte(kProgresspoints) + 1; + data.byte(kManspath) = 6; + data.byte(kDestination) = 6; + data.byte(kFinaldest) = 6; + findXYFromPath(); + switchRyanOff(); + data.byte(kResetmanxy) = 1; + data.word(kWatchingtime) = 30 * 2; + data.word(kReeltowatch) = 183; + data.word(kEndwatchreel) = 212; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; +} + +void DreamGenContext::useWindow() { + if (data.byte(kManspath) != 6) { + // Not on balcony + showSecondUse(); + putBackObStuff(); + } else { + data.byte(kProgresspoints) = data.byte(kProgresspoints) + 1; + showFirstUse(); + data.byte(kNewlocation) = 29; + data.byte(kGetback) = 1; + } +} + +void DreamGenContext::trapDoor() { + data.byte(kProgresspoints) = data.byte(kProgresspoints) + 1; + showFirstUse(); + switchRyanOff(); + data.word(kWatchingtime) = 20 * 2; + data.word(kReeltowatch) = 181; + data.word(kEndwatchreel) = 197; + data.byte(kNewlocation) = 26; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; +} + +void DreamGenContext::callEdensLift() { + showFirstUse(); + data.byte(kCounttoopen) = 8; + data.byte(kGetback) = 1; + turnPathOn(2); +} + +void DreamGenContext::callEdensDLift() { + if (data.byte(kLiftflag) == 1) { + // Eden's D here + showSecondUse(); + putBackObStuff(); + } else { + showFirstUse(); + data.byte(kCounttoopen) = 8; + data.byte(kGetback) = 1; + turnPathOn(2); + } +} + } /*namespace dreamgen */ |