[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.132,2.133 script_v6he.cpp,2.7,2.8

Travis Howell kirben at users.sourceforge.net
Mon Feb 9 06:57:19 CET 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21673/scumm

Modified Files:
	intern.h script_v6he.cpp 
Log Message:

Add opcode


Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.132
retrieving revision 2.133
diff -u -d -r2.132 -r2.133
--- intern.h	7 Feb 2004 04:11:40 -0000	2.132
+++ intern.h	9 Feb 2004 14:53:13 -0000	2.133
@@ -584,7 +584,7 @@
 	void o6_rename();
 	void o6_writeFile();
 	void o6_findAllObjects();
-	void o6_unknownE0();
+	void o6_setVolume();
 	void o6_unknownE1();
 	void o6_unknownE4();
 	void o6_seekFile();

Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -d -r2.7 -r2.8
--- script_v6he.cpp	9 Feb 2004 14:11:44 -0000	2.7
+++ script_v6he.cpp	9 Feb 2004 14:53:13 -0000	2.8
@@ -329,7 +329,7 @@
 		OPCODE(o6_deleteFile),
 		OPCODE(o6_rename),
 		/* E0 */
-		OPCODE(o6_unknownE0),
+		OPCODE(o6_setVolume),
 		OPCODE(o6_unknownE1),
 		OPCODE(o6_localizeArray),
 		OPCODE(o6_pickVarRandom),
@@ -1114,16 +1114,21 @@
 	push(area);
 }
 
-void ScummEngine_v6he::o6_unknownE0() {
-	int a = fetchScriptByte();
-	a -= 222;
-	if (a != 0) {
-		a -= 2;
-		if (a != 0) 
-			return;
-		warning("o6_unknownE0(%d) stub", pop());
-	} else {
-		warning("o6_uknownE0, sound volume %d stub", pop());
+void ScummEngine_v6he::o6_setVolume() {
+	byte subOp = fetchScriptByte();
+	int soundVolumeMaster;
+	int volume = pop();
+	switch (subOp) {
+	case 222:
+		if (_imuse)
+			_imuse->set_music_volume(volume);
+		else
+			_mixer->setMusicVolume(volume);
+		break;
+	case 224:
+		soundVolumeMaster = ConfMan.getInt("master_volume");
+		_mixer->setVolume(volume * soundVolumeMaster / 255);
+		break;
 	}
 }
 





More information about the Scummvm-git-logs mailing list