[Scummvm-cvs-logs] scummvm master -> 088c145f8f551a7faaf50e317529549503b1b7e8
digitall
digitall at scummvm.org
Sun Dec 25 07:23:33 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
088c145f8f DREAMWEB: Port 'dosometalk' to C++
Commit: 088c145f8f551a7faaf50e317529549503b1b7e8
https://github.com/scummvm/scummvm/commit/088c145f8f551a7faaf50e317529549503b1b7e8
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-24T23:28:29-08:00
Commit Message:
DREAMWEB: Port 'dosometalk' to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/stubs.h
engines/dreamweb/talk.cpp
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index eb10c88..da77e6f 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -379,6 +379,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'dontloadseg',
'doorway',
'dosaveload',
+ 'dosometalk',
'dosreturn',
'doshake',
'drawflags',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 7416e1b..8cd5dd4 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -927,146 +927,6 @@ cantpurge2:
goto lookforpurge2;
}
-void DreamGenContext::doSomeTalk() {
- STACK_CHECK;
-dospeech:
- al = data.byte(kTalkpos);
- al = data.byte(kCharacter);
- _and(al, 127);
- ah = 0;
- cx = 64;
- _mul(cx);
- cx = ax;
- al = data.byte(kTalkpos);
- ah = 0;
- _add(ax, cx);
- _add(ax, ax);
- si = ax;
- es = data.word(kPeople);
- _add(si, (0+24));
- cx = (0+24+(1026*2));
- ax = es.word(si);
- _add(ax, cx);
- si = ax;
- _cmp(es.byte(si), 0);
- if (flags.z())
- goto endheartalk;
- push(es);
- push(si);
- createPanel();
- showPanel();
- showMan();
- showExit();
- convIcons();
- si = pop();
- es = pop();
- di = 164;
- bx = 64;
- dl = 144;
- al = 0;
- ah = 0;
- printDirect();
- al = data.byte(kCharacter);
- _and(al, 127);
- ah = 0;
- cx = 64;
- _mul(cx);
- cl = data.byte(kTalkpos);
- ch = 0;
- _add(ax, cx);
- cl = 'C';
- dl = 'R';
- dh = data.byte(kReallocation);
- loadSpeech();
- _cmp(data.byte(kSpeechloaded), 0);
- if (flags.z())
- goto noplay1;
- al = 62;
- playChannel1();
-noplay1:
- data.byte(kPointermode) = 3;
- workToScreenM();
- cx = 180;
- hangOnPQ();
- if (!flags.c())
- goto _tmp1;
- return;
-_tmp1:
- _inc(data.byte(kTalkpos));
- al = data.byte(kTalkpos);
- al = data.byte(kCharacter);
- _and(al, 127);
- ah = 0;
- cx = 64;
- _mul(cx);
- cx = ax;
- al = data.byte(kTalkpos);
- ah = 0;
- _add(ax, cx);
- _add(ax, ax);
- si = ax;
- es = data.word(kPeople);
- _add(si, (0+24));
- cx = (0+24+(1026*2));
- ax = es.word(si);
- _add(ax, cx);
- si = ax;
- _cmp(es.byte(si), 0);
- if (flags.z())
- goto endheartalk;
- _cmp(es.byte(si), ':');
- if (flags.z())
- goto skiptalk2;
- _cmp(es.byte(si), 32);
- if (flags.z())
- goto skiptalk2;
- push(es);
- push(si);
- createPanel();
- showPanel();
- showMan();
- showExit();
- convIcons();
- si = pop();
- es = pop();
- di = 48;
- bx = 128;
- dl = 144;
- al = 0;
- ah = 0;
- printDirect();
- al = data.byte(kCharacter);
- _and(al, 127);
- ah = 0;
- cx = 64;
- _mul(cx);
- cl = data.byte(kTalkpos);
- ch = 0;
- _add(ax, cx);
- cl = 'C';
- dl = 'R';
- dh = data.byte(kReallocation);
- loadSpeech();
- _cmp(data.byte(kSpeechloaded), 0);
- if (flags.z())
- goto noplay2;
- al = 62;
- playChannel1();
-noplay2:
- data.byte(kPointermode) = 3;
- workToScreenM();
- cx = 180;
- hangOnPQ();
- if (!flags.c())
- goto skiptalk2;
- return;
-skiptalk2:
- _inc(data.byte(kTalkpos));
- goto dospeech;
-endheartalk:
- data.byte(kPointermode) = 0;
-}
-
void DreamGenContext::locationPic() {
STACK_CHECK;
getDestInfo();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index d8270ef..52009dc 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 doSomeTalk();
void outOfOpen();
void dirCom();
void findFirstPath();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 09a6868..b140618 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -100,6 +100,7 @@
void convIcons();
void startTalk();
void getPersonText(uint8 index);
+ void doSomeTalk();
void examineOb(bool examineAgain = true);
void dumpWatch();
void transferText();
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index c0622f7..834109b 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -110,7 +110,7 @@ void DreamGenContext::startTalk() {
void DreamGenContext::getPersonText(uint8 index) {
es = data.word(kPeople);
- si = es.word((index * 64 * 2) + 24) + (1026 * 2) + 24;
+ si = es.word((index * 64 * 2) + kPersontxtdat) + kPersontext;
}
void DreamGenContext::moreTalk() {
@@ -138,7 +138,89 @@ void DreamGenContext::moreTalk() {
doSomeTalk();
}
-// TODO: put Dosometalk here
+void DreamGenContext::doSomeTalk() {
+ while (true) {
+ es = data.word(kPeople);
+ si = ((data.byte(kTalkpos) + (64 * (data.byte(kCharacter) & 0x7F))) * 2) + kPersontxtdat;
+ si = es.word(si) + kPersontext;
+
+ if (es.byte(si) == 0) {
+ // endheartalk
+ data.byte(kPointermode) = 0;
+ return;
+ }
+
+ push(es);
+ push(si);
+
+ createPanel();
+ showPanel();
+ showMan();
+ showExit();
+ convIcons();
+
+ si = pop();
+ es = pop();
+
+ const uint8 *str = es.ptr(si, 0);
+ uint16 y = 64;
+ printDirect(&str, 164, &y, 144, false);
+
+ loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
+ if (data.byte(kSpeechloaded) != 0)
+ playChannel1(62);
+
+ data.byte(kPointermode) = 3;
+ workToScreenM();
+ cx = 180;
+ hangOnPQ();
+ if (flags.c())
+ return;
+
+ data.byte(kTalkpos)++;
+
+ es = data.word(kPeople);
+ si = kPersontxtdat + (((64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos)) * 2);
+ si = es.word(si) + kPersontext;
+
+ if (es.byte(si) == 0) {
+ // endheartalk
+ data.byte(kPointermode) = 0;
+ return;
+ }
+
+ if (es.byte(si) != ':' && es.byte(si) != 32) {
+ push(es);
+ push(si);
+
+ createPanel();
+ showPanel();
+ showMan();
+ showExit();
+ convIcons();
+
+ si = pop();
+ es = pop();
+
+ str = es.ptr(si, 0);
+ y = 128;
+ printDirect(&str, 48, &y, 144, false);
+
+ loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
+ if (data.byte(kSpeechloaded) != 0)
+ playChannel1(62);
+
+ data.byte(kPointermode) = 3;
+ workToScreenM();
+ cx = 180;
+ hangOnPQ();
+ if (flags.c())
+ return;
+ }
+
+ data.byte(kTalkpos)++;
+ }
+}
void DreamGenContext::hangOnPQ() {
data.byte(kGetback) = 0;
More information about the Scummvm-git-logs
mailing list