[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.61,1.62 actor.h,1.12,1.13 saveload.cpp,1.50,1.51 saveload.h,1.11,1.12 script_v8.cpp,2.130,2.131 sound.cpp,1.78,1.79

James Brown ender at users.sourceforge.net
Sun Jan 26 02:55:04 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv23244/scumm

Modified Files:
	actor.cpp actor.h saveload.cpp saveload.h script_v8.cpp 
	sound.cpp 
Log Message:
Patch 671701: SO_TALK_FREQUENCY


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- actor.cpp	16 Jan 2003 18:07:52 -0000	1.61
+++ actor.cpp	26 Jan 2003 10:54:33 -0000	1.62
@@ -41,6 +41,7 @@
 		y = 0;
 		facing = 180;
 		newDirection = 180;
+		talkFrequency = 256;
 	} else if (mode == 2) {
 		facing = 180;
 		newDirection = 180;

Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- actor.h	26 Jan 2003 06:17:24 -0000	1.12
+++ actor.h	26 Jan 2003 10:54:33 -0000	1.13
@@ -77,6 +77,7 @@
 	uint16 costume;
 	byte room;
 	byte talkColor;
+	int talkFrequency;
 	byte scalex, scaley;
 	byte charset;
 	int16 newDirection;

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- saveload.cpp	16 Jan 2003 18:07:52 -0000	1.50
+++ saveload.cpp	26 Jan 2003 10:54:34 -0000	1.51
@@ -247,6 +247,7 @@
 		MKLINE(Actor, costume, sleUint16, VER_V8),
 		MKLINE(Actor, room, sleByte, VER_V8),
 		MKLINE(Actor, talkColor, sleByte, VER_V8),
+		MKLINE(Actor, talkFrequency, sleInt16, VER_V16),
 		MKLINE(Actor, scalex, sleByte, VER_V8),
 		MKLINE(Actor, scaley, sleByte, VER_V8),
 		MKLINE(Actor, charset, sleByte, VER_V8),

Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- saveload.h	15 Jan 2003 14:14:00 -0000	1.11
+++ saveload.h	26 Jan 2003 10:54:34 -0000	1.12
@@ -34,10 +34,11 @@
 	VER_V12,
 	VER_V13,
 	VER_V14,
-	VER_V15
+	VER_V15,
+	VER_V16
 };
 
-#define CURRENT_VER VER_V15
+#define CURRENT_VER VER_V16
 
 
 // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types,

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.130
retrieving revision 2.131
diff -u -d -r2.130 -r2.131
--- script_v8.cpp	26 Jan 2003 06:23:12 -0000	2.130
+++ script_v8.cpp	26 Jan 2003 10:54:34 -0000	2.131
@@ -1187,10 +1187,7 @@
 		warning("o8_actorOps: setActorVolume(%d) not implemented", i);
 		break;
 	case 0x88:		// SO_ACTOR_FREQUENCY Set frequency of actor speech
-		// TODO - implement this!
-		i = pop();
-		if (i != 256)	// De-verbosed: 256 is the default frequency so don't warn on it
-			warning("o8_actorOps: setActorFrequency(%d) not implemented", i);
+		a->talkFrequency = pop();
 		break;
 	case 0x89:		// SO_ACTOR_PAN
 		// TODO - implement this!

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- sound.cpp	25 Jan 2003 20:01:23 -0000	1.78
+++ sound.cpp	26 Jan 2003 10:54:34 -0000	1.79
@@ -1226,6 +1226,13 @@
 	
 	byte * final = (byte *)malloc(size);
 	memcpy(final, ptr, size);
+
+	if (_scumm->_actorToPrintStrFor != 0xFF && _scumm->_actorToPrintStrFor != 0) {
+		Actor *a = _scumm->derefActorSafe(_scumm->_actorToPrintStrFor, "playBundleSound");
+		if (a)
+			rate = (rate * a->talkFrequency) / 256;
+	}
+	
 	if (bits == 8) {
 		return _scumm->_mixer->playRaw(NULL, final, size, rate, SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE);
 	} else if (bits == 16){





More information about the Scummvm-git-logs mailing list