aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorD G Turner2011-12-24 22:24:05 +0000
committerD G Turner2011-12-24 22:24:05 +0000
commitdf269f839d7e0fb1e2ba029e1fadba078d125030 (patch)
tree27b168b69db61397d31205105510791b33664c23 /engines/dreamweb
parentc6599ea5eed1b44f4aa8d632384f0dfa014e9327 (diff)
downloadscummvm-rg350-df269f839d7e0fb1e2ba029e1fadba078d125030.tar.gz
scummvm-rg350-df269f839d7e0fb1e2ba029e1fadba078d125030.tar.bz2
scummvm-rg350-df269f839d7e0fb1e2ba029e1fadba078d125030.zip
DREAMWEB: Ported 'starttalk' to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp39
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/stubs.h1
-rw-r--r--engines/dreamweb/talk.cpp25
4 files changed, 25 insertions, 41 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b9816c28b2..487839c03b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -975,45 +975,6 @@ cantpurge2:
goto lookforpurge2;
}
-void DreamGenContext::startTalk() {
- STACK_CHECK;
- data.byte(kTalkmode) = 0;
- al = data.byte(kCharacter);
- _and(al, 127);
- getPersonText();
- data.word(kCharshift) = 91+91;
- di = 66;
- bx = 64;
- dl = 241;
- al = 0;
- ah = 79;
- printDirect();
- data.word(kCharshift) = 0;
- di = 66;
- bx = 80;
- dl = 241;
- al = 0;
- ah = 0;
- printDirect();
- data.byte(kSpeechloaded) = 0;
- al = data.byte(kCharacter);
- _and(al, 127);
- ah = 0;
- cx = 64;
- _mul(cx);
- cl = 'C';
- dl = 'R';
- dh = data.byte(kReallocation);
- loadSpeech();
- _cmp(data.byte(kSpeechloaded), 1);
- if (!flags.z())
- return /* (nospeech1) */;
- data.byte(kVolumedirection) = 1;
- data.byte(kVolumeto) = 6;
- al = 50+12;
- playChannel1();
-}
-
void DreamGenContext::getPersonText() {
STACK_CHECK;
ah = 0;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 10abde7fff..f6399b4e7d 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -460,7 +460,6 @@ public:
void outOfOpen();
void dirCom();
void findFirstPath();
- void startTalk();
void getAnyAd();
void getFreeAd();
void dirFile();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index c0c8aede5b..5f777e4e9a 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -98,6 +98,7 @@
void showCity();
uint16 getPersFrame(uint8 index);
void convIcons();
+ void startTalk();
void examineOb(bool examineAgain = true);
void dumpWatch();
void transferText();
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 40c514b34a..20ac58dd7a 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -84,7 +84,30 @@ uint16 DreamGenContext::getPersFrame(uint8 index) {
return getSegment(data.word(kPeople)).word(kPersonframes + index * 2);
}
-// TODO: put Starttalk here
+void DreamGenContext::startTalk() {
+ data.byte(kTalkmode) = 0;
+
+ al = (data.byte(kCharacter) & 0x7F);
+ getPersonText();
+ const uint8 *str = es.ptr(si, 0);
+ uint16 y;
+
+ data.word(kCharshift) = 91+91;
+ y = 64;
+ printDirect(&str, 66, &y, 241, true);
+
+ data.word(kCharshift) = 0;
+ y = 80;
+ printDirect(&str, 66, &y, 241, true);
+
+ data.byte(kSpeechloaded) = 0;
+ loadSpeech('R', data.byte(kReallocation), 'C', 64*(data.byte(kCharacter) & 0x7F));
+ if (data.byte(kSpeechloaded) == 1) {
+ data.byte(kVolumedirection) = 1;
+ data.byte(kVolumeto) = 6;
+ playChannel1(50 + 12);
+ }
+}
// TODO: put Getpersontext here