aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-08-03 13:54:03 +0200
committerBertrand Augereau2011-08-03 14:04:53 +0200
commitc6049ac0c49c83d6367c77c23aafec0369d0e335 (patch)
treea9752a7113f03adbb530d41bb496d4748c756a67
parent4e39a41e6218c7206e706734eb608e9706e2678a (diff)
downloadscummvm-rg350-c6049ac0c49c83d6367c77c23aafec0369d0e335.tar.gz
scummvm-rg350-c6049ac0c49c83d6367c77c23aafec0369d0e335.tar.bz2
scummvm-rg350-c6049ac0c49c83d6367c77c23aafec0369d0e335.zip
DREAMWEB: 'crosshair' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp27
-rw-r--r--engines/dreamweb/dreamgen.h7
-rw-r--r--engines/dreamweb/stubs.cpp15
-rw-r--r--engines/dreamweb/stubs.h2
5 files changed, 21 insertions, 31 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 4774dc564d..48301c6e84 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -90,6 +90,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'plotreel',
'facerightway',
'zoom',
+ 'crosshair',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 99ad3b36a9..e619dcae13 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -18632,32 +18632,6 @@ void DreamGenContext::putunderzoom() {
multiput();
}
-void DreamGenContext::crosshair() {
- STACK_CHECK;
- _cmp(data.byte(kCommandtype), 3);
- if (flags.z())
- goto nocross;
- _cmp(data.byte(kCommandtype), 10);
- if (!flags.c())
- goto nocross;
- es = data.word(kWorkspace);
- ds = data.word(kIcons1);
- di = (8)+24;
- bx = (132)+19;
- al = 9;
- ah = 0;
- showframe();
- return;
-nocross:
- es = data.word(kWorkspace);
- ds = data.word(kIcons1);
- di = (8)+24;
- bx = (132)+19;
- al = 29;
- ah = 0;
- showframe();
-}
-
void DreamGenContext::showpointer() {
STACK_CHECK;
showblink();
@@ -20706,7 +20680,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_getunderzoom: getunderzoom(); break;
case addr_dumpzoom: dumpzoom(); break;
case addr_putunderzoom: putunderzoom(); break;
- case addr_crosshair: crosshair(); break;
case addr_showpointer: showpointer(); break;
case addr_delpointer: delpointer(); break;
case addr_dumppointer: dumppointer(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 3e6a720a15..3642627763 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -93,7 +93,6 @@ public:
static const uint16 addr_dumppointer = 0xcacc;
static const uint16 addr_delpointer = 0xcac8;
static const uint16 addr_showpointer = 0xcac4;
- static const uint16 addr_crosshair = 0xcac0;
static const uint16 addr_putunderzoom = 0xcabc;
static const uint16 addr_dumpzoom = 0xcab8;
static const uint16 addr_getunderzoom = 0xcab4;
@@ -1343,7 +1342,7 @@ public:
void getreelstart();
void buttonenter();
void checkinput();
- void crosshair();
+ //void crosshair();
void bresenhams();
void getbackfromops();
//void frameoutv();
@@ -1458,6 +1457,7 @@ public:
void fadescreenup();
void loadold();
void loadtempcharset();
+ void showbyte();
void useslab();
//void aboutturn();
void usealtar();
@@ -1563,7 +1563,7 @@ public:
void wearwatch();
void runintroseq();
void doblocks();
- void showbyte();
+ void opensarters();
void allpalette();
void findormake();
void nextsymbol();
@@ -1933,7 +1933,6 @@ public:
//void dodoor();
void greyscalesum();
void buttoneight();
- void opensarters();
void findexobject();
void errormessage2();
void usechurchhole();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 0dcaa9e72b..c1cef6c79b 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -867,5 +867,20 @@ void DreamGenContext::plotreel() {
es = pop();
}
+void DreamGenContext::crosshair() {
+ uint8 frame;
+ if ((data.byte(kCommandtype) != 3) && (data.byte(kCommandtype) < 10)) {
+ frame = 9;
+ } else {
+ frame = 29;
+ }
+ push(ds);
+ ds = data.word(kIcons1);
+ uint8 *src = ds.ptr(0, 0);
+ ds = pop();
+ uint8 width, height;
+ showframe(src, kZoomx + 24, kZoomy + 19, frame, 0, &width, &height);
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0f2202d28b..466a486e7b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -110,4 +110,6 @@
void plotreel();
void dealwithspecial();
void zoom();
+ void crosshair();
+