[Scummvm-cvs-logs] scummvm master -> 903ce79138c52a8ecde29a99964ed2dc3ec373ad
bluegr
md5 at scummvm.org
Mon Dec 12 17:00:17 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:
903ce79138 DREAMWEB: Port 'usewire' to C++
Commit: 903ce79138c52a8ecde29a99964ed2dc3ec373ad
https://github.com/scummvm/scummvm/commit/903ce79138c52a8ecde29a99964ed2dc3ec373ad
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-12T07:59:36-08:00
Commit Message:
DREAMWEB: Port 'usewire' 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 d7490a6..7f7b245 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -806,6 +806,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'usewall',
'usewinch',
'usewindow',
+ 'usewire',
'viewfolder',
'vsync',
'volumeadjust',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 9ce8c03..6aad4f0 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4135,55 +4135,6 @@ axeoncontrols:
putBackObStuff();
}
-void DreamGenContext::useWire() {
- STACK_CHECK;
- _cmp(data.byte(kWithobject), 255);
- if (!flags.z())
- goto gotwirewith;
- withWhat();
- return;
-gotwirewith:
- al = data.byte(kWithobject);
- ah = data.byte(kWithtype);
- cl = 'K';
- ch = 'N';
- dl = 'F';
- dh = 'E';
- compare();
- if (flags.z())
- goto wireknife;
- al = data.byte(kWithobject);
- ah = data.byte(kWithtype);
- cl = 'A';
- ch = 'X';
- dl = 'E';
- dh = 'D';
- compare();
- if (flags.z())
- goto wireaxe;
- cx = 300;
- al = 14;
- showPuzText();
- putBackObStuff();
- return;
-wireaxe:
- cx = 300;
- al = 16;
- showPuzText();
- putBackObStuff();
- return;
-wireknife:
- al = 51;
- removeSetObject();
- al = 52;
- placeSetObject();
- cx = 300;
- al = 11;
- showPuzText();
- _inc(data.byte(kProgresspoints));
- data.byte(kGetback) = 1;
-}
-
void DreamGenContext::useHandle() {
STACK_CHECK;
al = 'C';
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 811af2f..7d01158 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -486,13 +486,11 @@ public:
void __start();
#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
- void useWire();
void identifyOb();
void runEndSeq();
void useOpenBox();
void clearBuffers();
void getObTextStart();
- void dumpDiaryKeys();
void entryTexts();
void putUnderCentre();
void checkObjectSize();
@@ -519,6 +517,7 @@ public:
void usePipe();
void reminders();
void runTap();
+ void dumpDiaryKeys();
void checkForExit();
void lookInInterface();
void inToInv();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0447a89..52cb3a3 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -348,6 +348,7 @@
void useCardReader3();
void usePoolReader();
void useCooker();
+ void useWire();
bool defaultUseHandler(const char *id);
void openTVDoor();
void wearWatch();
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 76ecdc7..9778fe1 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -1110,6 +1110,33 @@ void DreamGenContext::useLighter() {
}
}
+void DreamGenContext::useWire() {
+ if (data.byte(kWithobject) == 255) {
+ withWhat();
+ return;
+ }
+
+ char knife[4] = { 'K', 'N', 'F', 'E' }; // TODO: convert to string with trailing zero
+ if (compare(data.byte(kWithobject), data.byte(kWithtype), knife)) {
+ removeSetObject(51);
+ placeSetObject(52);
+ showPuzText(11, 300);
+ data.byte(kProgresspoints)++;
+ data.byte(kGetback) = 1;
+ return;
+ }
+
+ char axe[4] = { 'A', 'X', 'E', 'D' }; // TODO: convert to string with trailing zero
+ if (!compare(data.byte(kWithobject), data.byte(kWithtype), axe)) {
+ showPuzText(16, 300);
+ putBackObStuff();
+ return;
+ }
+
+ showPuzText(14, 300);
+ putBackObStuff();
+}
+
void DreamGenContext::openTomb() {
data.byte(kProgresspoints)++;
showFirstUse();
More information about the Scummvm-git-logs
mailing list