diff options
author | Willem Jan Palenstijn | 2011-12-25 12:54:12 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-25 12:54:12 +0100 |
commit | 85e54574023fde58933da06a5192793597de1ec0 (patch) | |
tree | 40b1e899aa381bc0b95e62391bb2d7f6c3992c17 /engines | |
parent | fb068a1dbc4471b22ccc088816343e92bd1a94b4 (diff) | |
download | scummvm-rg350-85e54574023fde58933da06a5192793597de1ec0.tar.gz scummvm-rg350-85e54574023fde58933da06a5192793597de1ec0.tar.bz2 scummvm-rg350-85e54574023fde58933da06a5192793597de1ec0.zip |
DREAMWEB: Move talk functions to DreamBase
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreambase.h | 6 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 4 | ||||
-rw-r--r-- | engines/dreamweb/talk.cpp | 15 |
3 files changed, 13 insertions, 12 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 0123943c35..be88295631 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -539,6 +539,12 @@ public: void entryAnims(); bool finishedWalking(); + // from talk.cpp + void convIcons(); + uint16 getPersFrame(uint8 index); + const uint8 *getPersonText(uint8 index); + void startTalk(); + // from use.cpp void placeFreeObject(uint8 index); void removeFreeObject(uint8 index); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index bf5f5c54df..52798f556f 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -96,10 +96,6 @@ DreamBase::hangOn(frameCount); } void showCity(); - uint16 getPersFrame(uint8 index); - void convIcons(); - void startTalk(); - void getPersonText(uint8 index); void doSomeTalk(); void examineOb(bool examineAgain = true); void dumpWatch(); diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index f13f40e229..e364d63e36 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -73,22 +73,21 @@ void DreamGenContext::talk() { } } -void DreamGenContext::convIcons() { +void DreamBase::convIcons() { uint8 index = data.byte(kCharacter) & 127; uint16 frame = getPersFrame(index); const Frame *base = findSource(frame); showFrame(base, 234, 2, frame, 0); } -uint16 DreamGenContext::getPersFrame(uint8 index) { +uint16 DreamBase::getPersFrame(uint8 index) { return getSegment(data.word(kPeople)).word(kPersonframes + index * 2); } -void DreamGenContext::startTalk() { +void DreamBase::startTalk() { data.byte(kTalkmode) = 0; - getPersonText(data.byte(kCharacter) & 0x7F); - const uint8 *str = es.ptr(si, 0); + const uint8 *str = getPersonText(data.byte(kCharacter) & 0x7F); uint16 y; data.word(kCharshift) = 91+91; @@ -108,9 +107,9 @@ void DreamGenContext::startTalk() { } } -void DreamGenContext::getPersonText(uint8 index) { - es = data.word(kPeople); - si = es.word((index * 64 * 2) + kPersontxtdat) + kPersontext; +const uint8 *DreamBase::getPersonText(uint8 index) { + uint16 offset = kPersontext + getSegment(data.word(kPeople)).word((index * 64 * 2) + kPersontxtdat); + return getSegment(data.word(kPeople)).ptr(offset, 0); } void DreamGenContext::moreTalk() { |