aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-06 03:59:45 +0200
committerFilippos Karapetis2011-12-06 03:59:45 +0200
commitf224c09afaadddead7df755aa8c247774e6f6bb4 (patch)
tree3730db419760a048eefdf9cba59ee2836f720b70
parent823ff7549681a430b3c73d6925fc3f72bae09024 (diff)
downloadscummvm-rg350-f224c09afaadddead7df755aa8c247774e6f6bb4.tar.gz
scummvm-rg350-f224c09afaadddead7df755aa8c247774e6f6bb4.tar.bz2
scummvm-rg350-f224c09afaadddead7df755aa8c247774e6f6bb4.zip
DREAMWEB: 'initialinv', 'pickupob' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover2
-rw-r--r--engines/dreamweb/dreamgen.cpp50
-rw-r--r--engines/dreamweb/dreamgen.h2
-rw-r--r--engines/dreamweb/stubs.cpp29
-rw-r--r--engines/dreamweb/stubs.h2
5 files changed, 33 insertions, 52 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 6d15c15147..b4f8af06df 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -324,6 +324,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'hangonp',
'hangonw',
'hotelbell',
+ 'initialinv',
'initman',
'initrain',
'input',
@@ -408,6 +409,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'paneltomap',
'parseblaster',
'personnametext',
+ 'pickupob',
'pitinterupt',
'pixelcheckset',
'placesetobject',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index ad0bd189f3..78d3fa2351 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9116,56 +9116,6 @@ notalley:
turnAnyPathOn();
}
-void DreamGenContext::initialInv() {
- STACK_CHECK;
- _cmp(data.byte(kReallocation), 24);
- if (flags.z())
- goto isedens;
- return;
-isedens:
- al = 11;
- ah = 5;
- pickupOb();
- al = 12;
- ah = 6;
- pickupOb();
- al = 13;
- ah = 7;
- pickupOb();
- al = 14;
- ah = 8;
- pickupOb();
- al = 18;
- al = 18;
- ah = 0;
- pickupOb();
- al = 19;
- ah = 1;
- pickupOb();
- al = 20;
- ah = 9;
- pickupOb();
- al = 16;
- ah = 2;
- pickupOb();
- data.byte(kWatchmode) = 1;
- data.word(kReeltohold) = 0;
- data.word(kEndofholdreel) = 6;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- switchRyanOff();
-}
-
-void DreamGenContext::pickupOb() {
- STACK_CHECK;
- data.byte(kLastinvpos) = ah;
- data.byte(kObjecttype) = 2;
- data.byte(kItemframe) = al;
- data.byte(kCommand) = al;
- getAnyAd();
- transferToEx();
-}
-
void DreamGenContext::clearBuffers() {
STACK_CHECK;
es = data.word(kBuffers);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 56a2d90d81..bcaf1343e1 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -560,7 +560,6 @@ public:
void watchReel();
void openFileFromC();
void getTime();
- void pickupOb();
void fadeDOS();
void findText1();
void isRyanHolding();
@@ -725,7 +724,6 @@ public:
void findAllOpen();
void quitSymbol();
void readFromFile();
- void initialInv();
void interruptTest();
void findSetObject();
void useDiary();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 44f4d82394..bee5b83197 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3475,5 +3475,34 @@ void DreamGenContext::getBackToOps() {
}
}
+void DreamGenContext::pickupOb(uint8 command, uint8 pos) {
+ data.byte(kLastinvpos) = pos;
+ data.byte(kObjecttype) = 2;
+ data.byte(kItemframe) = command;
+ data.byte(kCommand) = command;
+ getAnyAd();
+ transferToEx();
+}
+
+void DreamGenContext::initialInv() {
+ if (data.byte(kReallocation) != 24)
+ return;
+
+ pickupOb(11, 5);
+ pickupOb(12, 6);
+ pickupOb(13, 7);
+ pickupOb(14, 8);
+ pickupOb(18, 0);
+ pickupOb(19, 1);
+ pickupOb(20, 9);
+ pickupOb(16, 2);
+ data.byte(kWatchmode) = 1;
+ data.word(kReeltohold) = 0;
+ data.word(kEndofholdreel) = 6;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchRyanOff();
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0139584579..3149b7722d 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -503,5 +503,7 @@
void newGame();
void getBackFromOps();
void getBackToOps();
+ void pickupOb(uint8 command, uint8 pos);
+ void initialInv();
#endif