[Scummvm-cvs-logs] CVS: scummvm/saga game.cpp,1.55,1.56 resnames.h,1.20,1.21 saga.h,1.76,1.77 scene.cpp,1.84,1.85 sfuncs.cpp,1.79,1.80

Eugene Sandulenko sev at users.sourceforge.net
Mon Jan 17 10:50:21 CET 2005


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

Modified Files:
	game.cpp resnames.h saga.h scene.cpp sfuncs.cpp 
Log Message:
o Proper implementation of sfPlaySound() which knows about CD<->floppy
  difference
o Fix regression in Mac titles where scene LUT wasn't conversed
o Fix sound types in many games. Old Win demo is still wrong.


Index: game.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/game.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- game.cpp	14 Jan 2005 01:17:33 -0000	1.55
+++ game.cpp	17 Jan 2005 18:48:55 -0000	1.56
@@ -432,7 +432,7 @@
 		ARRAYSIZE(ITEMACDEMO_GameFonts),
 		ITEMACDEMO_GameFonts,
 		&ITECD_GameSound,
-		GF_VOX_VOICES | GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP
+		GF_VOX_VOICES | GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX
 	},
 
 	// Inherit the earth - early MAC Demo version
@@ -449,7 +449,7 @@
 		ARRAYSIZE(ITEMACDEMO_GameFonts),
 		ITEMACDEMO_GameFonts,
 		&ITECD_GameSound,
-		GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP
+		GF_VOX_VOICES | GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX
 	},
 
 	// Inherit the earth - MAC CD Wyrmkeep version
@@ -466,7 +466,7 @@
 		ARRAYSIZE(ITEMACDEMO_GameFonts),
 		ITEMACDEMO_GameFonts,
 		&ITECD_GameSound,
-		GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP
+		GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX
 	},
 
 	// Inherit the earth - Linux Demo version
@@ -484,7 +484,7 @@
 		ARRAYSIZE(ITECD_GameFonts),
 		ITECD_GameFonts,
 		&ITECD_GameSound,
-		GF_VOX_VOICES | GF_WYRMKEEP
+		GF_VOX_VOICES | GF_WYRMKEEP | GF_CD_FX
 	},
 	
 	// Inherit the earth - Linux Demo version
@@ -501,7 +501,7 @@
 		ARRAYSIZE(ITECD_GameFonts),
 		ITECD_GameFonts,
 		&ITECD_GameSound,
-		GF_VOX_VOICES | GF_WYRMKEEP
+		GF_VOX_VOICES | GF_WYRMKEEP | GF_CD_FX
 	},
 	
 	// Inherit the earth - Win32 Demo version
@@ -518,7 +518,7 @@
 		ARRAYSIZE(ITEWINDEMO_GameFonts),
 		ITEWINDEMO_GameFonts,
 		&ITECD_GameSound,
-		GF_VOX_VOICES | GF_WYRMKEEP
+		GF_VOX_VOICES | GF_WYRMKEEP | GF_CD_FX
 	},
 	
 	// Inherit the earth - Wyrmkeep Linux CD version
@@ -536,7 +536,7 @@
 		ARRAYSIZE(ITECD_GameFonts),
 		ITECD_GameFonts,
 		&ITECD_GameSound,
-		GF_WYRMKEEP
+		GF_WYRMKEEP | GF_CD_FX
 	},
 
 	// Inherit the earth - DOS CD version
@@ -553,7 +553,7 @@
 		ARRAYSIZE(ITECD_GameFonts),
 		ITECD_GameFonts,
 		&ITECD_GameSound,
-		0
+		GF_CD_FX
 	},
 
 	// Inherit the earth - DOS CD German version
@@ -570,7 +570,7 @@
 		ARRAYSIZE(ITECD_GameFonts),
 		ITECD_GameFonts,
 		&ITECD_GameSound,
-		GF_LANG_DE
+		GF_LANG_DE | GF_CD_FX
 	},
 
 	// Inherit the earth - CD version
@@ -587,7 +587,7 @@
 		ARRAYSIZE(ITECD_GameFonts),
 		ITECD_GameFonts,
 		&ITECD_GameSound,
-		0
+		GF_CD_FX
 	},
 
 	// Inherit the earth - German Floppy version

Index: resnames.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/resnames.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- resnames.h	15 Jan 2005 20:12:48 -0000	1.20
+++ resnames.h	17 Jan 2005 18:48:57 -0000	1.21
@@ -172,26 +172,27 @@
 #define FX_DOOR_OPEN_2 53
 #define FX_JAIL_DOOR 54
 #define FX_KILN_FIRE 55
+#define FX_DUMMY 56
 
 // These are only in the CD version
 
-#define FX_CROWD_01 56
-#define FX_CROWD_02 57
-#define FX_CROWD_03 58
-#define FX_CROWD_04 59
-#define FX_CROWD_05 60
-#define FX_CROWD_06 61
-#define FX_CROWD_07 62
-#define FX_CROWD_08 63
-#define FX_CROWD_09 64
-#define FX_CROWD_10 65
-#define FX_CROWD_11 66
-#define FX_CROWD_12 67
-#define FX_CROWD_13 68
-#define FX_CROWD_14 69
-#define FX_CROWD_15 70
-#define FX_CROWD_16 71
-#define FX_CROWD_17 72
+#define FX_CROWD_01 57
+#define FX_CROWD_02 58
+#define FX_CROWD_03 59
+#define FX_CROWD_04 60
+#define FX_CROWD_05 61
+#define FX_CROWD_06 62
+#define FX_CROWD_07 63
+#define FX_CROWD_08 64
+#define FX_CROWD_09 65
+#define FX_CROWD_10 66
+#define FX_CROWD_11 67
+#define FX_CROWD_12 68
+#define FX_CROWD_13 69
+#define FX_CROWD_14 70
+#define FX_CROWD_15 71
+#define FX_CROWD_16 72
+#define FX_CROWD_17 73
 
 } // End of namespace Saga
 

Index: saga.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.h,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- saga.h	15 Jan 2005 23:46:43 -0000	1.76
+++ saga.h	17 Jan 2005 18:48:58 -0000	1.77
@@ -271,7 +271,8 @@
 	GF_BIG_ENDIAN_DATA = 1 << 1,
 	GF_MAC_RESOURCES   = 1 << 2,
 	GF_LANG_DE         = 1 << 3,
-	GF_WYRMKEEP        = 1 << 4
+	GF_WYRMKEEP        = 1 << 4,
+	GF_CD_FX           = 1 << 5
 };
 
 struct GameSoundInfo {

Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- scene.cpp	16 Jan 2005 19:43:28 -0000	1.84
+++ scene.cpp	17 Jan 2005 18:48:58 -0000	1.85
@@ -66,8 +66,8 @@
 
 
 	// Load scene lookup table
-	debug(0, "Loading scene LUT from resource %u.", _vm->getResourceDescription()->scene_lut_rn);
-	result = RSC_LoadResource(_sceneContext, _vm->getResourceDescription()->scene_lut_rn, &scene_lut_p, &scene_lut_len);
+	debug(0, "Loading scene LUT from resource %u.", RSC_ConvertID(_vm->getResourceDescription()->scene_lut_rn));
+	result = RSC_LoadResource(_sceneContext, RSC_ConvertID(_vm->getResourceDescription()->scene_lut_rn), &scene_lut_p, &scene_lut_len);
 	if (result != SUCCESS) {
 		warning("Scene::Scene(): Error: couldn't load scene LUT");
 		return;

Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- sfuncs.cpp	17 Jan 2005 07:21:08 -0000	1.79
+++ sfuncs.cpp	17 Jan 2005 18:49:00 -0000	1.80
@@ -1453,12 +1453,18 @@
 
 // Script function #70 (0x46)
 int Script::sfPlaySound(SCRIPTFUNC_PARAMS) {
-	ScriptDataWord param = thread->pop() - 13;
+	int param = getSWord(thread->pop());
+	int res;
 
-	if (/* param >= 0 && */ param < ARRAYSIZE(sfxTable))
-		_vm->_sndRes->playSound(sfxTable[param].res, sfxTable[param].vol, false);
-	else
+	if (param < ARRAYSIZE(sfxTable)) {
+		res = sfxTable[param].res;
+		if (_vm->getFeatures() & GF_CD_FX)
+			res -= 14;
+
+		_vm->_sndRes->playSound(res, sfxTable[param].vol, false);
+	} else {
 		_vm->_sound->stopSound();
+	}
 
 	return SUCCESS;
 }





More information about the Scummvm-git-logs mailing list