[Scummvm-cvs-logs] scummvm master -> 5492307982b3af117f2314cc22c680b48afe9689

digitall digitall at scummvm.org
Wed Dec 28 01:40:41 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:
5492307982 DREAMWEB: Move 'speechloaded' flag out of data blob.


Commit: 5492307982b3af117f2314cc22c680b48afe9689
    https://github.com/scummvm/scummvm/commit/5492307982b3af117f2314cc22c680b48afe9689
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-27T16:40:00-08:00

Commit Message:
DREAMWEB: Move 'speechloaded' flag out of data blob.

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreambase.h
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/dreamweb.cpp
    engines/dreamweb/sound.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/talk.cpp



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index f934325..8cf4bf4 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -179,6 +179,7 @@ p = parser(skip_binary_data = [
 	'ch1blocksplayed',
 	'soundemmpage',
 	'speechemmpage',
+	'speechloaded',
 	'lineroutine',
 	'increment1',
 	'increment2',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index b9eee14..07afc16 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -181,6 +181,8 @@ public:
 	uint8 _channel0Repeat;
 	uint8 _channel1Playing;
 
+	bool _speechLoaded;
+
 	// from backdrop.cpp
 	void doBlocks();
 	uint8 getXAd(const uint8 *setData, uint8 *result);
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 79c3672..53d814e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -63,11 +63,11 @@ void DreamGenContext::__start() {
 		//0x00f0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0100: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 
 		//0x0110: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0120: .... .... .... ....
-		0x00, 0x00, };
+		0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
 }
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9fada48..f1f5f96 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -240,33 +240,32 @@ static const uint16 kAddtogreen = 264;
 static const uint16 kAddtored = 265;
 static const uint16 kAddtoblue = 266;
 static const uint16 kLastsoundreel = 267;
-static const uint16 kSpeechloaded = 269;
-static const uint16 kVolume = 270;
-static const uint16 kVolumeto = 271;
-static const uint16 kVolumedirection = 272;
-static const uint16 kVolumecount = 273;
-static const uint16 kLasthardkey = 274;
-static const uint16 kBufferin = 275;
-static const uint16 kBufferout = 277;
-static const uint16 kWorkspace = 279;
-static const uint16 kMainsprites = 281;
-static const uint16 kBackdrop = 283;
-static const uint16 kRecordspace = 285;
-static const uint16 kBlinkframe = 287;
-static const uint16 kBlinkcount = 288;
-static const uint16 kReasseschanges = 289;
-static const uint16 kPointerspath = 290;
-static const uint16 kManspath = 291;
-static const uint16 kPointerfirstpath = 292;
-static const uint16 kFinaldest = 293;
-static const uint16 kDestination = 294;
-static const uint16 kLinestartx = 295;
-static const uint16 kLinestarty = 297;
-static const uint16 kLineendx = 299;
-static const uint16 kLineendy = 301;
-static const uint16 kLinepointer = 303;
-static const uint16 kLinedirection = 304;
-static const uint16 kLinelength = 305;
+static const uint16 kVolume = 269;
+static const uint16 kVolumeto = 270;
+static const uint16 kVolumedirection = 271;
+static const uint16 kVolumecount = 272;
+static const uint16 kLasthardkey = 273;
+static const uint16 kBufferin = 274;
+static const uint16 kBufferout = 276;
+static const uint16 kWorkspace = 278;
+static const uint16 kMainsprites = 280;
+static const uint16 kBackdrop = 282;
+static const uint16 kRecordspace = 284;
+static const uint16 kBlinkframe = 286;
+static const uint16 kBlinkcount = 287;
+static const uint16 kReasseschanges = 288;
+static const uint16 kPointerspath = 289;
+static const uint16 kManspath = 290;
+static const uint16 kPointerfirstpath = 291;
+static const uint16 kFinaldest = 292;
+static const uint16 kDestination = 293;
+static const uint16 kLinestartx = 294;
+static const uint16 kLinestarty = 296;
+static const uint16 kLineendx = 298;
+static const uint16 kLineendy = 300;
+static const uint16 kLinepointer = 302;
+static const uint16 kLinedirection = 303;
+static const uint16 kLinelength = 304;
 static const uint16 kBlocktextdat = (0);
 static const uint16 kPersonframes = (0);
 static const uint16 kDebuglevel1 = (0);
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 39ef5eb..c89da25 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -419,6 +419,8 @@ DreamBase::DreamBase(DreamWeb::DreamWebEngine *en) :
 	_channel0Repeat = 0;
 	_channel1Playing = 0xff;
 
+	_speechLoaded = false;
+
 	_backdropBlocks = 0;
 	_reelList = 0;
 
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index ac98ad2..8985950 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -37,7 +37,7 @@ bool DreamBase::loadSpeech(byte type1, int idx1, byte type2, int idx2) {
 	//debug("name = %s", name.c_str());
 	bool result = engine->loadSpeech(name);
 
-	data.byte(kSpeechloaded) = result;
+	_speechLoaded = result;
 	return result;
 }
 
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 8c4d738..44c5dec 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -944,7 +944,7 @@ void DreamBase::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8
 		// FIXME: This fallthrough does not properly support subtitles+speech
 		// mode. The parameters to setuptimedtemp() are sometimes different
 		// for speech and for subtitles. See e.g., madmantext()
-		if ((data.byte(kSpeechloaded) == 1) && !_subtitles)
+		if (_speechLoaded && !_subtitles)
 			return;
 	}
 #endif
@@ -1703,7 +1703,7 @@ bool DreamBase::isCD() {
 	// This is a hack to guess which version to use with the assumption that if we have a cd version
 	// we managed to load the speech. At least it is isolated in this function and can be changed.
 	// Maybe detect the version during game id?
-	return (data.byte(kSpeechloaded) == 1);
+	return (_speechLoaded);
 }
 
 void DreamBase::showIcon() {
diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp
index 992fea2..ed52e76 100644
--- a/engines/dreamweb/talk.cpp
+++ b/engines/dreamweb/talk.cpp
@@ -66,7 +66,7 @@ void DreamBase::talk() {
 
 	redrawMainScrn();
 	workToScreenM();
-	if (data.byte(kSpeechloaded) == 1) {
+	if (_speechLoaded) {
 		cancelCh1();
 		data.byte(kVolumedirection) = (byte)-1;
 		data.byte(kVolumeto) = 0;
@@ -98,9 +98,9 @@ void DreamBase::startTalk() {
 	y = 80;
 	printDirect(&str, 66, &y, 241, true);
 
-	data.byte(kSpeechloaded) = 0;
+	_speechLoaded = false;
 	loadSpeech('R', data.byte(kReallocation), 'C', 64*(data.byte(kCharacter) & 0x7F));
-	if (data.byte(kSpeechloaded) == 1) {
+	if (_speechLoaded) {
 		data.byte(kVolumedirection) = 1;
 		data.byte(kVolumeto) = 6;
 		playChannel1(50 + 12);
@@ -155,7 +155,7 @@ void DreamBase::doSomeTalk() {
 		printDirect(str, 164, 64, 144, false);
 
 		loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
-		if (data.byte(kSpeechloaded) != 0)
+		if (_speechLoaded)
 			playChannel1(62);
 
 		data.byte(kPointermode) = 3;
@@ -181,7 +181,7 @@ void DreamBase::doSomeTalk() {
 			printDirect(str, 48, 128, 144, false);
 
 			loadSpeech('R', data.byte(kReallocation), 'C', (64 * (data.byte(kCharacter) & 0x7F)) + data.byte(kTalkpos));
-			if (data.byte(kSpeechloaded) != 0)
+			if (_speechLoaded)
 				playChannel1(62);
 
 			data.byte(kPointermode) = 3;
@@ -223,7 +223,7 @@ bool DreamBase::hangOnPQ() {
 			return true;
 		}
 
-		if (data.byte(kSpeechloaded) == 1 && _channel1Playing == 255) {
+		if (_speechLoaded && _channel1Playing == 255) {
 			speechFlag++;
 			if (speechFlag == 40)
 				break;






More information about the Scummvm-git-logs mailing list