[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.214,1.215 script_v7he.cpp,2.18,2.19 scumm.h,1.406,1.407 sound.cpp,1.337,1.338

Travis Howell kirben at users.sourceforge.net
Wed Jun 23 02:14:07 CEST 2004


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

Modified Files:
	resource.cpp script_v7he.cpp scumm.h sound.cpp 
Log Message:

Remove HE7 check that wasn't needed and caused resource load failures.
Enable startSound code in HE7 games.
Avoid loading music resources in HE7 games, since they are unsupported at the moment.


Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -d -r1.214 -r1.215
--- resource.cpp	23 Jun 2004 01:36:57 -0000	1.214
+++ resource.cpp	23 Jun 2004 09:13:24 -0000	1.215
@@ -578,7 +578,7 @@
 
 	debugC(DEBUG_RESOURCE, "ensureResourceLoaded(%s,%d)", resTypeFromId(type), i);
 
-	if ((type == rtRoom || _heversion >= 70) && i > 0x7F && _version < 7) {
+	if ((type == rtRoom) && i > 0x7F && _version < 7) {
 		i = _resourceMapper[i & 0x7F];
 	}
 

Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.18
retrieving revision 2.19
diff -u -d -r2.18 -r2.19
--- script_v7he.cpp	23 Jun 2004 02:21:10 -0000	2.18
+++ script_v7he.cpp	23 Jun 2004 09:13:24 -0000	2.19
@@ -650,42 +650,41 @@
 
 	switch (op) {
 	case 224:
-		// _staticVar1 = pop();
-		pop();
+		_staticVar1 = pop();
 		break;
 
 	case 230:
-		// _staticVar2 = pop();
-		pop();
+		_staticVar2 = pop();
 		break;
 
 	case 231:
-		// _staticVar3 = pop();
-		pop();
+		_staticVar3 = pop();
 		break;
 
 	case 232:
-		//FIXME Ignoring extra arguments for now.
-		_sound->addSoundToQueue(pop());
-		// _staticVar4 = pop();
-		// _staticVar3 = 0;
-		// _staticVar1 = 11025;
-		// _staticVar2 = VAR(VAR_MUSIC_TIMER);
+		_staticVar4 = pop();
+		_staticVar3 = 0;
+		_staticVar1 = 11025;
+		_staticVar2 = VAR(VAR_MUSIC_TIMER);
 		break;
 
 	case 245:
-		// _staticVar5 |= 1;
+		_staticVar5 |= 1;
 		break;
 
 	case 255:
 		// _sound->addSoundToQueue(_staticVar4, _staticVar3, _staticVar2, _staticVar5);
-		// _staticVar5 = 0;
+		// FIXME: Music resources (Id 4000+?) are currently unsupported,
+		// so don't attempt to play them.
+ 		if (_staticVar4 < 4000)
+			_sound->addSoundToQueue(_staticVar4);
+		warning("o7_startSound stub (%d, %d, %d, %d)", _staticVar4, _staticVar3, _staticVar2, _staticVar5);
+		_staticVar5 = 0;
 		break;
 
 	default:
 		break;
 	}
-	warning("o7_startSound stub (%d)", op);
 }
 
 

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.406
retrieving revision 1.407
diff -u -d -r1.406 -r1.407
--- scumm.h	23 Jun 2004 01:36:57 -0000	1.406
+++ scumm.h	23 Jun 2004 09:13:24 -0000	1.407
@@ -1037,6 +1037,7 @@
 	int _saveSound;
 	bool _native_mt32;
 	int _midiDriver; // Use the MD_ values from mididrv.h
+	int _staticVar1, _staticVar2, _staticVar3, _staticVar4, _staticVar5;
 	bool _copyProtection;
 	bool _demoMode;
 	bool _confirmExit;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.337
retrieving revision 1.338
diff -u -d -r1.337 -r1.338
--- sound.cpp	23 Jun 2004 02:21:10 -0000	1.337
+++ sound.cpp	23 Jun 2004 09:13:25 -0000	1.338
@@ -657,7 +657,11 @@
 		return pollCD();
 
 	if (_vm->_features & GF_HUMONGOUS) {
-		if (sound == -2) {
+		if (sound == 10000)
+			// FIXME: Music resources in HE7 games are currently unsupported,
+			// so prevent music restart attempt
+			return 1;
+		else if (sound == -2) {
 			return isSfxFinished();
 		} else if (sound == -1) {
 			// getSoundStatus(), with a -1, will return the





More information about the Scummvm-git-logs mailing list