diff options
author | Filippos Karapetis | 2011-12-15 00:43:08 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-15 00:43:08 +0200 |
commit | dd8304dd75e051460b96414ab3abac865a5af6e2 (patch) | |
tree | 410e32b324d268f228219d260ea175069ed348e4 /engines | |
parent | 509755a010967cc685001762b11996cc73891015 (diff) | |
download | scummvm-rg350-dd8304dd75e051460b96414ab3abac865a5af6e2.tar.gz scummvm-rg350-dd8304dd75e051460b96414ab3abac865a5af6e2.tar.bz2 scummvm-rg350-dd8304dd75e051460b96414ab3abac865a5af6e2.zip |
DREAMWEB: Port 'usehandle', 'usealtar' to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 71 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/use.cpp | 39 |
4 files changed, 41 insertions, 73 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index fb232ceabc..a33f5a27fc 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -3306,53 +3306,6 @@ void DreamGenContext::notHeldError() { putBackObStuff(); } -void DreamGenContext::useAltar() { - STACK_CHECK; - al = 'C'; - ah = 'N'; - cl = 'D'; - ch = 'A'; - findExObject(); - _cmp(al, (114)); - if (flags.z()) - goto thingsonaltar; - al = 'C'; - ah = 'N'; - cl = 'D'; - ch = 'B'; - findExObject(); - _cmp(al, (114)); - if (flags.z()) - goto thingsonaltar; - _cmp(data.byte(kCanmovealtar), 1); - if (flags.z()) - goto movealtar; - cx = 300; - al = 23; - showPuzText(); - data.byte(kGetback) = 1; - return; -movealtar: - _inc(data.byte(kProgresspoints)); - showSecondUse(); - data.word(kWatchingtime) = 160; - data.word(kReeltowatch) = 81; - data.word(kEndwatchreel) = 174; - data.byte(kWatchspeed) = 1; - data.byte(kSpeedcount) = 1; - al = 47; - bl = 52; - bh = 76; - cx = 32; - dx = 98; - setupTimedUse(); - data.byte(kGetback) = 1; - return; -thingsonaltar: - showFirstUse(); - data.byte(kGetback) = 1; -} - void DreamGenContext::nextColon() { STACK_CHECK; lookcolon: @@ -3463,30 +3416,6 @@ numberpoke3: cs.byte(bx) = al; } -void DreamGenContext::useHandle() { - STACK_CHECK; - al = 'C'; - ah = 'U'; - cl = 'T'; - ch = 'W'; - findSetObject(); - al = es.byte(bx+58); - _cmp(al, 255); - if (!flags.z()) - goto havecutwire; - cx = 300; - al = 12; - showPuzText(); - data.byte(kGetback) = 1; - return; -havecutwire: - cx = 300; - al = 13; - showPuzText(); - data.byte(kNewlocation) = 22; - data.byte(kGetback) = 1; -} - void DreamGenContext::useStereo() { STACK_CHECK; _cmp(data.byte(kLocation), 0); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 2a8a6c613e..c1829ec4c2 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -500,7 +500,6 @@ public: void dirCom(); void endGameSeq(); void findFirstPath(); - void useAltar(); void startTalk(); void getAnyAd(); void reminders(); @@ -559,7 +558,6 @@ public: void searchForString(); void selectOpenOb(); void useGun(); - void useHandle(); void incRyanPage(); void clearChanges(); void searchForFiles(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 6764c18beb..16d7e67d5c 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -345,6 +345,8 @@ void useCooker(); void useWire(); void useControl(); + void useHandle(); + void useAltar(); bool defaultUseHandler(const char *id); void openTVDoor(); void wearWatch(); diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index f5d631aed5..5306522c13 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -1434,4 +1434,43 @@ void DreamGenContext::useKey() { } } +void DreamGenContext::useHandle() { + SetObject *object = getSetAd(findSetObject("CUTW")); + if (object->mapad[0] == 255) { + // Wire not cut + showPuzText(12, 300); + } else { + // Wire has been cut + showPuzText(13, 300); + data.byte(kNewlocation) = 22; + } + + data.byte(kGetback) = 1; +} + +void DreamGenContext::useAltar() { + if (findExObject("CNDA") == 114 || findExObject("CNDB") == 114) { + // Things on altar + showFirstUse(); + data.byte(kGetback) = 1; + return; + } + + if (data.byte(kCanmovealtar) == 1) { + // Move altar + data.byte(kProgresspoints)++; + showSecondUse(); + data.word(kWatchingtime) = 160; + data.word(kReeltowatch) = 81; + data.word(kEndwatchreel) = 174; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + DreamBase::setupTimedUse(47, 32, 98, 52, 76); + data.byte(kGetback) = 1; + } else { + showPuzText(23, 300); + data.byte(kGetback) = 1; + } +} + } // End of namespace DreamGen |