aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-11-22 23:53:35 +0100
committerBertrand Augereau2011-11-23 00:15:03 +0100
commit32f86ce834261939600846e24c75c40959a35fae (patch)
tree22585b077e9583f0368f833018c71af85477d918
parent4b931446ee5d03c9899d123da56b947272e1c7d6 (diff)
downloadscummvm-rg350-32f86ce834261939600846e24c75c40959a35fae.tar.gz
scummvm-rg350-32f86ce834261939600846e24c75c40959a35fae.tar.bz2
scummvm-rg350-32f86ce834261939600846e24c75c40959a35fae.zip
DREAMWEB: 'findroominloc' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp20
-rw-r--r--engines/dreamweb/dreamgen.h7
-rw-r--r--engines/dreamweb/stubs.cpp7
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 12 insertions, 24 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 2b4fbb2678..a903e4f33f 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -270,6 +270,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'playchannel1',
'createpanel',
'createpanel2',
+ 'findroominloc',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 65f002bb3e..d12023644b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -13384,25 +13384,6 @@ lookx2:
es.byte(bx+6) = al;
}
-void DreamGenContext::findroominloc() {
- STACK_CHECK;
- al = data.byte(kMapy);
- cx = -6;
-looky:
- _add(cx, 6);
- _sub(al, 10);
- if (!flags.c())
- goto looky;
- al = data.byte(kMapx);
- _dec(cx);
-lookx:
- _inc(cx);
- _sub(al, 11);
- if (!flags.c())
- goto lookx;
- data.byte(kRoomnum) = cl;
-}
-
void DreamGenContext::allocateload() {
STACK_CHECK;
push(es);
@@ -15089,7 +15070,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_restorereels: restorereels(); break;
case addr_restoreall: restoreall(); break;
case addr_disablepath: disablepath(); break;
- case addr_findroominloc: findroominloc(); break;
case addr_dontloadseg: dontloadseg(); break;
case addr_allocateload: allocateload(); break;
case addr_getridoftemp: getridoftemp(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 63173610a9..5309059d95 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -57,7 +57,6 @@ public:
static const uint16 addr_getridoftemp = 0xcb70;
static const uint16 addr_allocateload = 0xcb68;
static const uint16 addr_dontloadseg = 0xcb64;
- static const uint16 addr_findroominloc = 0xcb58;
static const uint16 addr_disablepath = 0xcb50;
static const uint16 addr_restoreall = 0xcb44;
static const uint16 addr_restorereels = 0xcb40;
@@ -1288,7 +1287,7 @@ public:
void slabdoord();
void adjustup();
void slabdoorf();
- void findroominloc();
+ //void loadintotemp();
void loadintroroom();
void saveseg();
//void showblink();
@@ -1603,8 +1602,8 @@ public:
void checksoundint();
void usewindow();
void wearshades();
- void onedigit();
void pitinterupt();
+ void onedigit();
void deleverything();
void fadescreendown();
//void findxyfrompath();
@@ -1890,7 +1889,7 @@ public:
//void printboth();
//void standardload();
void undertextline();
- //void loadintotemp();
+ //void findroominloc();
void sitdowninbar();
void shownames();
void savefileread();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 094b4bb438..73b7b27b56 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2253,5 +2253,12 @@ void DreamGenContext::playchannel1() {
playchannel1(al);
}
+void DreamGenContext::findroominloc() {
+ uint8 x = data.byte(kMapx) / 11;
+ uint8 y = data.byte(kMapy) / 10;
+ uint8 roomNum = y * 6 + x;
+ data.byte(kRoomnum) = roomNum;
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index f9bd62d928..f30b13be4b 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -329,4 +329,5 @@
void showmainops();
void createpanel();
void createpanel2();
+ void findroominloc();