diff options
author | D G Turner | 2011-12-24 23:00:11 +0000 |
---|---|---|
committer | D G Turner | 2011-12-24 23:00:11 +0000 |
commit | a1ffa11620fcd0ba48b5cc2c1ca505ca4baab436 (patch) | |
tree | 1d2858cf215f2b6b639f60132908decdb77dafe8 /engines | |
parent | df269f839d7e0fb1e2ba029e1fadba078d125030 (diff) | |
download | scummvm-rg350-a1ffa11620fcd0ba48b5cc2c1ca505ca4baab436.tar.gz scummvm-rg350-a1ffa11620fcd0ba48b5cc2c1ca505ca4baab436.tar.bz2 scummvm-rg350-a1ffa11620fcd0ba48b5cc2c1ca505ca4baab436.zip |
DREAMWEB: Port 'getpersontext' to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 14 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/talk.cpp | 8 |
4 files changed, 6 insertions, 18 deletions
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) { |