From cc59b8511715005772f967bd655371b809159907 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 5 Dec 2011 13:07:47 +0000 Subject: DREAMWEB: 'hangone' ported to C++ --- devtools/tasmrecover/tasm-recover | 1 + engines/dreamweb/dreamgen.cpp | 13 ------------- engines/dreamweb/dreamgen.h | 7 +++---- engines/dreamweb/stubs.cpp | 11 +++++++++++ engines/dreamweb/stubs.h | 2 ++ 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 3e4fa2dc18..c1985db262 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -289,6 +289,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'getyad', 'hangon', 'hangoncurs', + 'hangone', 'hangonp', 'hangonw', 'initman', diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 7220e45932..6e44289078 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -2423,19 +2423,6 @@ biblequotearly: data.byte(kLasthardkey) = 0; } -void DreamGenContext::hangOne() { - STACK_CHECK; -hangonloope: - push(cx); - vSync(); - cx = pop(); - _cmp(data.byte(kLasthardkey), 1); - if (flags.z()) - return /* (hangonearly) */; - if (--cx) - goto hangonloope; -} - void DreamGenContext::intro() { STACK_CHECK; dx = 1035; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index b9b9467b98..756a280520 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -585,7 +585,6 @@ public: void introMonks1(); void resetLocation(); void introMonks2(); - void advisor(); void additionalText(); void useElevator5(); void useElevator4(); @@ -668,7 +667,7 @@ public: void lockLightOff(); void wearWatch(); void runIntroSeq(); - void nextColon(); + void advisor(); void attendant(); void monks2text(); void clearPalette(); @@ -677,6 +676,7 @@ public: void openHotelDoor(); void blank(); void drinker(); + void nextColon(); void placeFreeObject(); void allPalette(); void adjustRight(); @@ -767,7 +767,6 @@ public: void quitSymbol(); void setTopRight(); void findSetObject(); - void getPersonText(); void carParkDrip(); void useDiary(); void deleteExObject(); @@ -885,7 +884,7 @@ public: void clearReels(); void doSaveLoad(); void createName(); - void hangOne(); + void getPersonText(); void inToInv(); void parser(); void setMouse(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index f72c8a694b..754388d130 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -3136,6 +3136,17 @@ void DreamGenContext::readKey() { data.word(kBufferout) = bufOut; } +void DreamGenContext::hangOne(uint16 delay) { + do { + vSync(); + if (data.byte(kLasthardkey) == 1) + return; // "hangonearly" + } while (--delay); +} + +void DreamGenContext::hangOne() { + hangOne(cx); +} } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 09ac9cad9b..a4515012a1 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -444,4 +444,6 @@ void loadCart(); void soundOnReels(); void readKey(); + void hangOne(uint16 delay); + void hangOne(); -- cgit v1.2.3