aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-11-14 19:49:19 +0100
committerBertrand Augereau2011-11-14 20:57:11 +0100
commitbc509e9e086a5d0025e904b0a0e14fbbd23c6786 (patch)
tree6b82428d786dae7ffb364bc0ee66cb3719c9455e
parentc2ec2851753ad7c65308108cecc5f652915a990f (diff)
downloadscummvm-rg350-bc509e9e086a5d0025e904b0a0e14fbbd23c6786.tar.gz
scummvm-rg350-bc509e9e086a5d0025e904b0a0e14fbbd23c6786.tar.bz2
scummvm-rg350-bc509e9e086a5d0025e904b0a0e14fbbd23c6786.zip
DREAMWEB: 'roomname' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp37
-rw-r--r--engines/dreamweb/dreamgen.h3
-rw-r--r--engines/dreamweb/stubs.cpp14
-rw-r--r--engines/dreamweb/stubs.h1
5 files changed, 17 insertions, 39 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 145c4bbbb2..adaf05aeb2 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -207,6 +207,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'convicons',
'examineob',
'showwatch',
+ 'roomname',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 86ef9c4c23..407e2fcc3b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -14550,42 +14550,6 @@ void DreamGenContext::showman() {
showframe();
}
-void DreamGenContext::roomname() {
- STACK_CHECK;
- di = 88;
- bx = 18;
- al = 53;
- dl = 240;
- printmessage();
- bl = data.byte(kRoomnum);
- _cmp(bl, 32);
- if (flags.c())
- goto notover32;
- _sub(bl, 32);
-notover32:
- bh = 0;
- _add(bx, bx);
- es = data.word(kRoomdesc);
- _add(bx, (0));
- ax = es.word(bx);
- _add(ax, (0+(38*2)));
- si = ax;
- data.word(kLinespacing) = 7;
- di = 88;
- bx = 25;
- dl = 120;
- _cmp(data.byte(kWatchon), 1);
- if (flags.z())
- goto gotpl;
- dl = 160;
-gotpl:
- al = 0;
- ah = 0;
- printdirect();
- data.word(kLinespacing) = 10;
- usecharset1();
-}
-
void DreamGenContext::usecharset1() {
STACK_CHECK;
ax = data.word(kCharset1);
@@ -16856,7 +16820,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_workoutframes: workoutframes(); break;
case addr_middlepanel: middlepanel(); break;
case addr_showman: showman(); break;
- case addr_roomname: roomname(); break;
case addr_usecharset1: usecharset1(); break;
case addr_usetempcharset: usetempcharset(); break;
case addr_showexit: showexit(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 1368a53f85..8429913172 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -93,7 +93,6 @@ public:
static const uint16 addr_showexit = 0xca80;
static const uint16 addr_usetempcharset = 0xca7c;
static const uint16 addr_usecharset1 = 0xca78;
- static const uint16 addr_roomname = 0xca74;
static const uint16 addr_showman = 0xca6c;
static const uint16 addr_middlepanel = 0xca68;
static const uint16 addr_workoutframes = 0xca54;
@@ -1873,7 +1872,7 @@ public:
void clearrest();
//void getreelframeax();
void barwoman();
- void roomname();
+ //void roomname();
void credits();
void madmanrun();
void randomnum1();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 85f620b74a..97d0f08555 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1959,5 +1959,19 @@ void DreamGenContext::showwatch() {
}
}
+void DreamGenContext::roomname() {
+ printmessage(88, 18, 53, 240, false);
+ uint16 textIndex = data.byte(kRoomnum);
+ if (textIndex >= 32)
+ textIndex -= 32;
+ data.word(kLinespacing) = 7;
+ uint8 maxWidth = (data.byte(kWatchon) == 1) ? 120 : 160;
+ uint16 descOffset = segRef(data.word(kRoomdesc)).word(kIntextdat + textIndex * 2);
+ const uint8 *string = segRef(data.word(kRoomdesc)).ptr(kIntext + descOffset, 0);
+ printdirect(string, 88, 25, maxWidth, false);
+ data.word(kLinespacing) = 10;
+ usecharset1();
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 510cc3d43f..0faccc5090 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -251,4 +251,5 @@
void convicons();
void examineob(bool examineAgain = true);
void showwatch();
+ void roomname();