[Scummvm-cvs-logs] scummvm master -> b27a6e72ad63441c561866682bdebb0059db56a3
bluegr
md5 at scummvm.org
Tue Dec 13 00:03:28 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:
b27a6e72ad DREAMWEB: Port 'runtap' to C++
Commit: b27a6e72ad63441c561866682bdebb0059db56a3
https://github.com/scummvm/scummvm/commit/b27a6e72ad63441c561866682bdebb0059db56a3
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-12T15:02:41-08:00
Commit Message:
DREAMWEB: Port 'runtap' 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 566ad8a..ce8b025 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -649,6 +649,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'rollendcredits',
'rollendcredits2',
'roomname',
+ 'runtap',
'runintroseq',
'saveems',
'savefileread',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 7ab361b..09ea145 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3522,55 +3522,6 @@ finishpars:
di = offset_operand1;
}
-void DreamGenContext::runTap() {
- STACK_CHECK;
- _cmp(data.byte(kWithobject), 255);
- if (!flags.z())
- goto tapwith;
- withWhat();
- return;
-tapwith:
- al = data.byte(kWithobject);
- ah = data.byte(kWithtype);
- cl = 'C';
- ch = 'U';
- dl = 'P';
- dh = 'E';
- compare();
- if (flags.z())
- goto fillcupfromtap;
- al = data.byte(kWithobject);
- ah = data.byte(kWithtype);
- cl = 'C';
- ch = 'U';
- dl = 'P';
- dh = 'F';
- compare();
- if (flags.z())
- goto cupfromtapfull;
- cx = 300;
- al = 56;
- showPuzText();
- putBackObStuff();
- return;
-fillcupfromtap:
- al = data.byte(kWithobject);
- getExAd();
- es.byte(bx+15) = 'F'-'A';
- al = 8;
- playChannel1();
- cx = 300;
- al = 57;
- showPuzText();
- putBackObStuff();
- return;
-cupfromtapfull:
- cx = 300;
- al = 58;
- showPuzText();
- putBackObStuff();
-}
-
void DreamGenContext::notHeldError() {
STACK_CHECK;
createPanel();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 3bb554e..92c6f82 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -511,7 +511,6 @@ public:
void startTalk();
void getAnyAd();
void reminders();
- void runTap();
void dumpDiaryKeys();
void checkForExit();
void lookInInterface();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index b32f546..ed45e40 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -492,6 +492,7 @@
void useCart();
void useTrainer();
void useHole();
+ void runTap();
void chewy();
void sLabDoorA();
void sLabDoorB();
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index f62daf9..c591eca 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -1376,6 +1376,36 @@ void DreamGenContext::useOpenBox() {
showFirstUse();
}
+void DreamGenContext::runTap() {
+ if (data.byte(kWithobject) == 255) {
+ withWhat();
+ return;
+ }
+
+ char cupEmpty[4] = { 'C', 'U', 'P', 'E' }; // TODO: convert to string with trailing zero
+ char cupFull[4] = { 'C', 'U', 'P', 'F' }; // TODO: convert to string with trailing zero
+
+ if (compare(data.byte(kWithobject), data.byte(kWithtype), cupEmpty)) {
+ // Fill cup from tap
+ DynObject *exObject = getExAd(data.byte(kWithobject));
+ exObject->id[3] = 'F'-'A'; // CUPE (empty cup) -> CUPF (full cup)
+ playChannel1(8);
+ showPuzText(57, 300);
+ putBackObStuff();
+ return;
+ }
+
+ if (compare(data.byte(kWithobject), data.byte(kWithtype), cupFull)) {
+ // Cup from tap full
+ showPuzText(58, 300);
+ putBackObStuff();
+ return;
+ }
+
+ showPuzText(56, 300);
+ putBackObStuff();
+}
+
void DreamGenContext::useAxe() {
if (data.byte(kReallocation) != 22) {
// Not in pool
More information about the Scummvm-git-logs
mailing list