aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover4
-rw-r--r--engines/dreamweb/dreamgen.cpp84
-rw-r--r--engines/dreamweb/dreamgen.h4
-rw-r--r--engines/dreamweb/stubs.cpp39
-rw-r--r--engines/dreamweb/stubs.h4
5 files changed, 47 insertions, 88 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 526a01011c..ef04a2c801 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -433,6 +433,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'getroomspaths',
'gettime',
'gettingshot',
+ 'getundercentre',
'getundermenu',
'getundertimed',
'getunderzoom',
@@ -604,7 +605,9 @@ generator = cpp(context, "DreamGen", blacklist = [
'printslow',
'printsprites',
'printundermon',
+ 'processtrigger',
'putbackobstuff',
+ 'putundercentre',
'putundermenu',
'putundertimed',
'putunderzoom',
@@ -759,6 +762,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'transferinv',
'transfertext',
'trapdoor',
+ 'triggermessage',
'trysoundalloc',
'turnanypathoff',
'turnanypathon',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index f449b8f38e..d98b238797 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2821,28 +2821,6 @@ _tmp2:
workToScreenM();
}
-void DreamGenContext::getUnderCentre() {
- STACK_CHECK;
- di = 58;
- bx = 72;
- ds = data.word(kMapstore);
- si = 0;
- cl = 254;
- ch = 110;
- multiGet();
-}
-
-void DreamGenContext::putUnderCentre() {
- STACK_CHECK;
- di = 58;
- bx = 72;
- ds = data.word(kMapstore);
- si = 0;
- cl = 254;
- ch = 110;
- multiPut();
-}
-
void DreamGenContext::locationPic() {
STACK_CHECK;
getDestInfo();
@@ -3544,68 +3522,6 @@ finishpars:
di = offset_operand1;
}
-void DreamGenContext::processTrigger() {
- STACK_CHECK;
- _cmp(data.byte(kLasttrigger), '1');
- if (!flags.z())
- goto notfirsttrigger;
- al = 8;
- setLocation();
- al = 45;
- triggerMessage();
- return;
-notfirsttrigger:
- _cmp(data.byte(kLasttrigger), '2');
- if (!flags.z())
- goto notsecondtrigger;
- al = 9;
- setLocation();
- al = 55;
- triggerMessage();
- return;
-notsecondtrigger:
- _cmp(data.byte(kLasttrigger), '3');
- if (!flags.z())
- return /* (notthirdtrigger) */;
- al = 2;
- setLocation();
- al = 59;
- triggerMessage();
-}
-
-void DreamGenContext::triggerMessage() {
- STACK_CHECK;
- push(ax);
- di = 174;
- bx = 153;
- cl = 200;
- ch = 63;
- ds = data.word(kMapstore);
- si = 0;
- multiGet();
- ax = pop();
- findPuzText();
- di = 174;
- bx = 156;
- dl = 141;
- ah = 16;
- printDirect();
- cx = 140;
- hangOn();
- workToScreen();
- cx = 340;
- hangOn();
- di = 174;
- bx = 153;
- cl = 200;
- ch = 63;
- ds = data.word(kMapstore);
- si = 0;
- multiPut();
- workToScreen();
- data.byte(kLasttrigger) = 0;
-}
-
void DreamGenContext::runTap() {
STACK_CHECK;
_cmp(data.byte(kWithobject), 255);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 337a33152c..746f306b3d 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -491,7 +491,6 @@ public:
void useOpenBox();
void clearBuffers();
void getObTextStart();
- void putUnderCentre();
void checkObjectSize();
void findText1();
void isRyanHolding();
@@ -544,7 +543,6 @@ public:
void purgeALocation();
void notHeldError();
void getSetAd();
- void getUnderCentre();
void showKeys();
void printmessage2();
void findOpenPos();
@@ -572,7 +570,6 @@ public:
void useOpened();
void signOn();
void locationPic();
- void triggerMessage();
void swapWithOpen();
void dreamweb();
void checkInside();
@@ -603,7 +600,6 @@ public:
void getPersonText();
void parser();
void emergencyPurge();
- void processTrigger();
void transferConToEx();
void adjustDown();
void withWhat();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 20d2b64268..1521dddfe8 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -862,6 +862,45 @@ void DreamGenContext::putUnderTimed() {
multiPut(ds.ptr(si, 0), data.byte(kTimedx), y, 240, kUndertimedysize);
}
+void DreamGenContext::getUnderCentre() {
+ ds = data.word(kMapstore);
+ si = 0;
+ multiGet(ds.ptr(si, 0), 58, 72, 254, 110);
+}
+
+void DreamGenContext::putUnderCentre() {
+ ds = data.word(kMapstore);
+ si = 0;
+ multiPut(ds.ptr(si, 0), 58, 72, 254, 110);
+}
+
+void DreamGenContext::triggerMessage(uint16 index) {
+ multiGet(mapStore(), 174, 153, 200, 63);
+ uint16 offset = kTextstart + getSegment(data.word(kPuzzletext)).word(index * 2);
+ const uint8 *string = getSegment(data.word(kPuzzletext)).ptr(offset, 0);
+ uint16 y = 156;
+ printDirect(&string, 174, &y, 141, true);
+ hangOn(140);
+ workToScreenCPP();
+ hangOn(340);
+ multiPut(mapStore(), 174, 153, 200, 63);
+ workToScreenCPP();
+ data.byte(kLasttrigger) = 0;
+}
+
+void DreamGenContext::processTrigger() {
+ if (data.byte(kLasttrigger) == '1') {
+ setLocation(8);
+ triggerMessage(45);
+ } else if (data.byte(kLasttrigger) == '2') {
+ setLocation(9);
+ triggerMessage(55);
+ } else if (data.byte(kLasttrigger) == '3') {
+ setLocation(2);
+ triggerMessage(59);
+ }
+}
+
void DreamGenContext::useTimedText() {
if (data.word(kTimecount) == 0)
return;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ca1b68f219..5cf0466560 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -569,5 +569,9 @@
void quitKey();
void setupTimedUse();
void entryAnims();
+ void getUnderCentre();
+ void putUnderCentre();
+ void triggerMessage(uint16 index);
+ void processTrigger();
#endif