[Scummvm-cvs-logs] scummvm master -> df269f839d7e0fb1e2ba029e1fadba078d125030

digitall digitall at scummvm.org
Sat Dec 24 23:24:52 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:
df269f839d DREAMWEB: Ported 'starttalk' to C++


Commit: df269f839d7e0fb1e2ba029e1fadba078d125030
    https://github.com/scummvm/scummvm/commit/df269f839d7e0fb1e2ba029e1fadba078d125030
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-24T14:24:05-08:00

Commit Message:
DREAMWEB: Ported 'starttalk' 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 65c0611..4e8a0c9 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -848,6 +848,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'startdmablock',
 	'startloading',
 	'startpaltoend',
+	'starttalk',
 	'startup',
 	'startup1',
 	'steady',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b9816c2..487839c 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 10abde7..f6399b4 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 c0c8aed..5f777e4 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 40c514b..20ac58d 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
 






More information about the Scummvm-git-logs mailing list