Skip to content

Commit

Permalink
DREAMWEB: Port 'getpersontext' to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
digitall committed Dec 24, 2011
1 parent df269f8 commit a1ffa11
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
1 change: 1 addition & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -483,6 +483,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'getobtextstart',
'getopenedsize',
'getpersframe',
'getpersontext',
'getreelframeax',
'getreelstart',
'getridofall',
Expand Down
14 changes: 0 additions & 14 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -975,20 +975,6 @@ void DreamGenContext::purgeAnItem() {
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:
Expand Down
1 change: 0 additions & 1 deletion engines/dreamweb/dreamgen.h
Expand Up @@ -454,7 +454,6 @@ class DreamGenContext : public DreamBase, public Context {
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();
Expand Down
1 change: 1 addition & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -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();
Expand Down
8 changes: 5 additions & 3 deletions engines/dreamweb/talk.cpp
Expand Up @@ -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;

Expand All @@ -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) {
Expand Down

0 comments on commit a1ffa11

Please sign in to comment.