aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-06 12:59:18 +0200
committerFilippos Karapetis2011-12-06 12:59:18 +0200
commit6ad12bc093be2cbc9ddc46d0373f1c60d72a39ee (patch)
tree57294433d9228fa604768c4426731b260d36f2f9
parentd5b220220f61a16c0eaaa9ca88e3e0b4d39d1d33 (diff)
downloadscummvm-rg350-6ad12bc093be2cbc9ddc46d0373f1c60d72a39ee.tar.gz
scummvm-rg350-6ad12bc093be2cbc9ddc46d0373f1c60d72a39ee.tar.bz2
scummvm-rg350-6ad12bc093be2cbc9ddc46d0373f1c60d72a39ee.zip
DREAMWEB: 'makemainscreen', 'obsthatdothings', 'openinv' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover3
-rw-r--r--engines/dreamweb/dreamgen.cpp51
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp36
-rw-r--r--engines/dreamweb/stubs.h3
5 files changed, 41 insertions, 55 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 0ef548c8be..9ef055769a 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -383,6 +383,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'mainscreen',
'makebackob',
'makeheader',
+ 'makemainscreen',
'makename',
'makenextblock',
'makesprite',
@@ -408,12 +409,14 @@ generator = cpp(context, "DreamGen", blacklist = [
'obicons',
'obname',
'obpicture',
+ 'obsthatdothings',
'obtoinv',
'oldtonames',
'onedigit',
'openeden',
'openfile',
'openforsave',
+ 'openinv',
'openlouis',
'openpoolboss',
'openryan'
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 820395953a..f9f1667c77 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2135,24 +2135,6 @@ findopen2a:
goto findopen1a;
}
-void DreamGenContext::makeMainScreen() {
- STACK_CHECK;
- createPanel();
- data.byte(kNewobs) = 1;
- drawFloor();
- spriteUpdate();
- printSprites();
- reelsOnScreen();
- showIcon();
- getUnderZoom();
- underTextLine();
- data.byte(kCommandtype) = 255;
- animPointer();
- workToScreenM();
- data.byte(kCommandtype) = 200;
- data.byte(kManisoffscreen) = 0;
-}
-
void DreamGenContext::incRyanPage() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 222);
@@ -2187,18 +2169,6 @@ findnewpage:
delPointer();
}
-void DreamGenContext::openInv() {
- STACK_CHECK;
- data.byte(kInvopen) = 1;
- al = 61;
- di = (80);
- bx = (58)-10;
- dl = 240;
- printMessage();
- fillRyan();
- data.byte(kCommandtype) = 255;
-}
-
void DreamGenContext::openOb() {
STACK_CHECK;
al = data.byte(kOpenedob);
@@ -2310,27 +2280,6 @@ fullcup:
printDirect();
}
-void DreamGenContext::obsThatDoThings() {
- STACK_CHECK;
- al = data.byte(kCommand);
- ah = data.byte(kObjecttype);
- cl = 'M';
- ch = 'E';
- dl = 'M';
- dh = 'B';
- compare();
- if (!flags.z())
- return /* (notlouiscard) */;
- al = 4;
- getLocation();
- _cmp(al, 1);
- if (flags.z())
- return /* (seencard) */;
- al = 4;
- setLocation();
- lookAtCard();
-}
-
void DreamGenContext::getObTextStart() {
STACK_CHECK;
es = data.word(kFreedesc);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9fe38769b2..8dc36b7f11 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -695,7 +695,6 @@ public:
void rollEm();
void delEverything();
void poolGuard();
- void openInv();
void lookAtPlace();
void useAxe();
void useElvDoor();
@@ -779,14 +778,12 @@ public:
void checkForShake();
void useButtonA();
void execCommand();
- void obsThatDoThings();
void updateSymbolBot();
void findPuzText();
void useChurchGate();
void monkAndRyan();
void swapWithInv();
void useControl();
- void makeMainScreen();
void useWinch();
void updateSymbolTop();
void checkSoundInt();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 07170af4a6..0efdd1884a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3580,5 +3580,39 @@ void DreamGenContext::allPointer() {
dumpPointer();
}
-} /*namespace dreamgen */
+void DreamGenContext::makeMainScreen() {
+ createPanel();
+ data.byte(kNewobs) = 1;
+ drawFloor();
+ spriteUpdate();
+ printSprites();
+ reelsOnScreen();
+ showIcon();
+ getUnderZoom();
+ underTextLine();
+ data.byte(kCommandtype) = 255;
+ animPointer();
+ workToScreenM();
+ data.byte(kCommandtype) = 200;
+ data.byte(kManisoffscreen) = 0;
+}
+
+void DreamGenContext::openInv() {
+ data.byte(kInvopen) = 1;
+ printMessage(80, 58 - 10, 61, 240, (240 & 1));
+ fillRyan();
+ data.byte(kCommandtype) = 255;
+}
+void DreamGenContext::obsThatDoThings() {
+ char id[4] = { 'M', 'E', 'M', 'B' }; // TODO: convert to string with trailing zero
+ if (!compare(data.byte(kCommand), data.byte(kObjecttype), id))
+ return; // notlouiscard
+
+ if (getLocation(4) != 1) {
+ setLocation(4);
+ lookAtCard();
+ }
+}
+
+} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5ca0d168db..fa758232bb 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -532,5 +532,8 @@
void sLabDoorE();
void sLabDoorD();
void sLabDoorF();
+ void obsThatDoThings();
+ void makeMainScreen();
+ void openInv();
#endif