aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2011-12-24 23:00:11 +0000
committerD G Turner2011-12-24 23:00:11 +0000
commita1ffa11620fcd0ba48b5cc2c1ca505ca4baab436 (patch)
tree1d2858cf215f2b6b639f60132908decdb77dafe8
parentdf269f839d7e0fb1e2ba029e1fadba078d125030 (diff)
downloadscummvm-rg350-a1ffa11620fcd0ba48b5cc2c1ca505ca4baab436.tar.gz
scummvm-rg350-a1ffa11620fcd0ba48b5cc2c1ca505ca4baab436.tar.bz2
scummvm-rg350-a1ffa11620fcd0ba48b5cc2c1ca505ca4baab436.zip
DREAMWEB: Port 'getpersontext' to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover1
-rw-r--r--engines/dreamweb/dreamgen.cpp14
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/stubs.h1
-rw-r--r--engines/dreamweb/talk.cpp8
5 files changed, 7 insertions, 18 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 4e8a0c9adf..9cacf01ea3 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -483,6 +483,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'getobtextstart',
'getopenedsize',
'getpersframe',
+ 'getpersontext',
'getreelframeax',
'getreelstart',
'getridofall',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 487839c03b..e321c50993 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -975,20 +975,6 @@ cantpurge2:
goto lookforpurge2;
}
-void DreamGenContext::getPersonText() {
- STACK_CHECK;
- ah = 0;
- cx = 64*2;
- _mul(cx);
- si = ax;
- es = data.word(kPeople);
- _add(si, (0+24));
- cx = (0+24+(1026*2));
- ax = es.word(si);
- _add(ax, cx);
- si = ax;
-}
-
void DreamGenContext::doSomeTalk() {
STACK_CHECK;
dospeech:
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f6399b4e7d..7717c7fb1c 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -454,7 +454,6 @@ public:
void __start();
#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
- void getPersonText();
void checkObjectSize();
void doSomeTalk();
void outOfOpen();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5f777e4e9a..921b8ed2eb 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -99,6 +99,7 @@
uint16 getPersFrame(uint8 index);
void convIcons();
void startTalk();
+ void getPersonText(uint8 index);
void examineOb(bool examineAgain = true);
void dumpWatch();
void transferText();
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 20ac58dd7a..c0622f7d53 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -87,8 +87,7 @@ uint16 DreamGenContext::getPersFrame(uint8 index) {
void DreamGenContext::startTalk() {
data.byte(kTalkmode) = 0;
- al = (data.byte(kCharacter) & 0x7F);
- getPersonText();
+ getPersonText(data.byte(kCharacter) & 0x7F);
const uint8 *str = es.ptr(si, 0);
uint16 y;
@@ -109,7 +108,10 @@ void DreamGenContext::startTalk() {
}
}
-// TODO: put Getpersontext here
+void DreamGenContext::getPersonText(uint8 index) {
+ es = data.word(kPeople);
+ si = es.word((index * 64 * 2) + 24) + (1026 * 2) + 24;
+}
void DreamGenContext::moreTalk() {
if (data.byte(kTalkmode) != 0) {