aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Augereau2011-09-07 03:53:53 +0200
committerBertrand Augereau2011-09-07 03:53:53 +0200
commitef1eb9ba24959b16568f83b8a8a6ddf27ae40bab (patch)
tree476433d50a3d4074d0ff83e94cdc40ee482d4602
parent3884ec6355d4445c278d9d011d16940c3ef8697b (diff)
downloadscummvm-rg350-ef1eb9ba24959b16568f83b8a8a6ddf27ae40bab.tar.gz
scummvm-rg350-ef1eb9ba24959b16568f83b8a8a6ddf27ae40bab.tar.bz2
scummvm-rg350-ef1eb9ba24959b16568f83b8a8a6ddf27ae40bab.zip
DREAMWEB: 'usetext' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp21
-rw-r--r--engines/dreamweb/dreamgen.h5
-rw-r--r--engines/dreamweb/stubs.h3
-rw-r--r--engines/dreamweb/use.cpp15
5 files changed, 20 insertions, 25 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 33e232bb41..8238c7e7e8 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -195,6 +195,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'hangon',
'hangonp',
'findnextcolon',
+ 'usetext',
], skip_output = [
# These functions are processed but not output
'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 5c71dc97ed..df235c592f 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -10276,26 +10276,6 @@ notfoundinside:
goto insideloop;
}
-void DreamGenContext::usetext() {
- STACK_CHECK;
- push(es);
- push(si);
- createpanel();
- showpanel();
- showman();
- showexit();
- obicons();
- si = pop();
- es = pop();
- di = 36;
- bx = 104;
- dl = 241;
- al = 0;
- ah = 0;
- printdirect();
- worktoscreenm();
-}
-
void DreamGenContext::putbackobstuff() {
STACK_CHECK;
createpanel();
@@ -17252,7 +17232,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
case addr_findexobject: findexobject(); break;
case addr_isryanholding: isryanholding(); break;
case addr_checkinside: checkinside(); break;
- case addr_usetext: usetext(); break;
case addr_putbackobstuff: putbackobstuff(); break;
case addr_showpuztext: showpuztext(); break;
case addr_findpuztext: findpuztext(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9e209f7f95..cbc376e1f9 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -283,7 +283,6 @@ public:
static const uint16 addr_findpuztext = 0xc6e0;
static const uint16 addr_showpuztext = 0xc6dc;
static const uint16 addr_putbackobstuff = 0xc6d8;
- static const uint16 addr_usetext = 0xc6d4;
static const uint16 addr_checkinside = 0xc6d0;
static const uint16 addr_isryanholding = 0xc6cc;
static const uint16 addr_findexobject = 0xc6c8;
@@ -1535,7 +1534,7 @@ public:
void vsync();
//void finishedwalking();
void findinvpos();
- void usetext();
+ void dumpmenu();
void hangonpq();
void liftnoise();
void workoutframes();
@@ -1552,7 +1551,7 @@ public:
void getkeyandlogo();
void selectob();
//void checkcoords();
- void dumpmenu();
+ //void usetext();
void chewy();
void accesslighton();
void useplinth();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 26acdde45d..4a97fd22f5 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -238,5 +238,6 @@
uint8 findnextcolon(uint8 **string);
void findnextcolon();
uint8 *getobtextstartCPP();
-
+ void usetext(const uint8 *string);
+ void usetext();
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 194aed461d..38fac02c00 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -163,5 +163,20 @@ void DreamGenContext::useroutine() {
data.byte(kCommandtype) = 255;
}
+void DreamGenContext::usetext() {
+ usetext(es.ptr(si, 0));
+}
+
+void DreamGenContext::usetext(const uint8 *string) {
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ obicons();
+ uint16 y = 104;
+ printdirect(&string, 36, &y, 241, true);
+ worktoscreenm();
+}
+
} /*namespace dreamgen */