[Scummvm-cvs-logs] scummvm master -> 90c1793d4771a71af737d10dad8a2761c4696794
bluegr
md5 at scummvm.org
Mon Dec 12 23:11:58 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
90c1793d47 DREAMWEB: Port 'useaxe', 'usekey' to C++
Commit: 90c1793d4771a71af737d10dad8a2761c4696794
https://github.com/scummvm/scummvm/commit/90c1793d4771a71af737d10dad8a2761c4696794
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-12T14:11:05-08:00
Commit Message:
DREAMWEB: Port 'useaxe', 'usekey' to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/stubs.h
engines/dreamweb/use.cpp
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 4eafce7..b663a01 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -772,6 +772,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'twodigitnum',
'undertextline',
'updatepeople',
+ 'useaxe',
'usebalcony',
'usebuttona',
'usecardreader1',
@@ -795,6 +796,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'useelvdoor',
'usefullcart',
'usehole',
+ 'usekey',
'useladder',
'useladderb',
'uselighter',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 851cca7..b917f58 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3830,58 +3830,6 @@ havecutwire:
data.byte(kGetback) = 1;
}
-void DreamGenContext::useKey() {
- STACK_CHECK;
- _cmp(data.byte(kLocation), 5);
- if (flags.z())
- goto usekey1;
- _cmp(data.byte(kLocation), 30);
- if (flags.z())
- goto usekey1;
- _cmp(data.byte(kLocation), 21);
- if (flags.z())
- goto usekey2;
- cx = 200;
- al = 1;
- showPuzText();
- putBackObStuff();
- return;
-usekey1:
- _cmp(data.byte(kMapx), 22);
- if (!flags.z())
- goto wrongroom1;
- _cmp(data.byte(kMapy), 10);
- if (!flags.z())
- goto wrongroom1;
- cx = 300;
- al = 0;
- showPuzText();
- data.byte(kCounttoclose) = 100;
- data.byte(kGetback) = 1;
- return;
-usekey2:
- _cmp(data.byte(kMapx), 11);
- if (!flags.z())
- goto wrongroom1;
- _cmp(data.byte(kMapy), 10);
- if (!flags.z())
- goto wrongroom1;
- cx = 300;
- al = 3;
- showPuzText();
- data.byte(kNewlocation) = 30;
- al = 2;
- fadeScreenDown();
- showFirstUse();
- putBackObStuff();
- return;
-wrongroom1:
- cx = 200;
- al = 2;
- showPuzText();
- putBackObStuff();
-}
-
void DreamGenContext::useStereo() {
STACK_CHECK;
_cmp(data.byte(kLocation), 0);
@@ -3944,37 +3892,6 @@ stereoon:
putBackObStuff();
}
-void DreamGenContext::useAxe() {
- STACK_CHECK;
- _cmp(data.byte(kReallocation), 22);
- if (!flags.z())
- goto notinpool;
- _cmp(data.byte(kMapy), 10);
- if (flags.z())
- goto axeondoor;
- showSecondUse();
- _inc(data.byte(kProgresspoints));
- data.byte(kLastweapon) = 2;
- data.byte(kGetback) = 1;
- removeObFromInv();
- return;
-notinpool:
- showFirstUse();
- return;
-/*continuing to unbounded code: axeondoor from useelvdoor:19-30*/
-axeondoor:
- al = 15;
- cx = 300;
- showPuzText();
- _inc(data.byte(kProgresspoints));
- data.word(kWatchingtime) = 46*2;
- data.word(kReeltowatch) = 31;
- data.word(kEndwatchreel) = 77;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- data.byte(kGetback) = 1;
-}
-
void DreamGenContext::withWhat() {
STACK_CHECK;
createPanel();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 7be8488..f146649 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -521,7 +521,6 @@ public:
void getFreeAd();
void removeObFromInv();
void heavy();
- void useKey();
void dirFile();
void pickupConts();
void nextColon();
@@ -549,7 +548,6 @@ public:
void rollEm();
void poolGuard();
void lookAtPlace();
- void useAxe();
void findAllOpen();
void fillOpen();
void findSetObject();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 18d90ff..4376f5b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -334,6 +334,8 @@
void useSLab();
void usePipe();
void useOpenBox();
+ void useAxe();
+ void useKey();
void wheelSound();
void callHotelLift();
void useShield();
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 0ede2f4..531f465 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -1376,4 +1376,67 @@ void DreamGenContext::useOpenBox() {
showFirstUse();
}
+void DreamGenContext::useAxe() {
+ if (data.byte(kReallocation) != 22) {
+ // Not in pool
+ showFirstUse();
+ return;
+ }
+
+ if (data.byte(kMapy) == 10) {
+ // Axe on door
+ al = 15;
+ cx = 300;
+ showPuzText(15, 300);
+ data.byte(kProgresspoints)++;
+ data.word(kWatchingtime) = 46*2;
+ data.word(kReeltowatch) = 31;
+ data.word(kEndwatchreel) = 77;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ return;
+ }
+
+ showSecondUse();
+ data.byte(kProgresspoints)++;
+ data.byte(kLastweapon) = 2;
+ data.byte(kGetback) = 1;
+ removeObFromInv();
+}
+
+void DreamGenContext::useKey() {
+ switch(data.byte(kLocation)) {
+ case 5:
+ case 30:
+ if (data.byte(kMapx) == 22 && data.byte(kMapy) == 10) {
+ showPuzText(0, 300);
+ data.byte(kCounttoclose) = 100;
+ data.byte(kGetback) = 1;
+ } else {
+ // Wrong room
+ showPuzText(2, 200);
+ putBackObStuff();
+ }
+ break;
+ case 21:
+ if (data.byte(kMapx) == 11 && data.byte(kMapy) == 10) {
+ showPuzText(3, 300);
+ data.byte(kNewlocation) = 30;
+ al = 2;
+ fadeScreenDown();
+ showFirstUse();
+ putBackObStuff();
+ } else {
+ // Wrong room
+ showPuzText(2, 200);
+ putBackObStuff();
+ }
+ default:
+ showPuzText(1, 200);
+ putBackObStuff();
+ break;
+ }
+}
+
} // End of namespace DreamGen
More information about the Scummvm-git-logs
mailing list