[Scummvm-cvs-logs] CVS: scummvm/sky sound.cpp,1.7,1.8 sound.h,1.4,1.5 logic.cpp,1.57,1.58

Oliver Kiehl olki at users.sourceforge.net
Fri May 30 04:08:07 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv12968

Modified Files:
	sound.cpp sound.h logic.cpp 
Log Message:
add sound effects


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sound.cpp	29 May 2003 16:47:14 -0000	1.7
+++ sound.cpp	30 May 2003 11:07:30 -0000	1.8
@@ -22,8 +22,977 @@
 #include "stdafx.h"
 #include "sky/sound.h"
 #include "sky/struc.h"
+#include "sky/logic.h"
 
 #define SOUND_FILE_BASE 60203
+#define MAX_FX_NUMBER 393
+#define SFXF_START_DELAY 0x80
+#define SFXF_SAVE 0x20
+
+#if !defined(__GNUC__)
[...994 lines suppressed...]
+
+	uint8 volume = 0x7f; // start with max vol
+
+	// if (system_flags & (1 << sf_sblaster))
+		volume = roomList[i].adlibVolume;
+	// if (system_flags & (1 << sf_roland)) {
+	// 	volume = roomList[i].rolandVolume;
+
+	// Check the flags, the sound may come on after a delay.
+	if (sfx->flags & SFXF_START_DELAY) {
+		// queue sound
+	}
+
+	//if (sfx->flags & SFXF_SAVE)
+	//	save_fx_0[stfx_cur_chn] = sound;
+
+	playSound(sfx->soundNo, volume);
+	return true;
 }
 

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sound.h	29 May 2003 16:47:14 -0000	1.4
+++ sound.h	30 May 2003 11:07:30 -0000	1.5
@@ -19,6 +19,9 @@
  *
  */
 
+#ifndef SKYSOUND_H
+#define SKYSOUND_H
+
 #include "sound/mixer.h"
 #include "sky/disk.h"
 #include "common/engine.h"
@@ -46,12 +49,14 @@
 
 	void loadSection(uint8 pSection);
 	void playSound(uint16 sound, uint16 volume);
+	bool fnStartFx(uint32 sound);
 
 private:
 	SkyDisk *_skyDisk;
 	uint8 _soundsTotal;
 	uint16 _sfxBaseOfs;
-    uint8 *_soundData;
+	uint8 *_soundData;
 	uint8 *_sampleRates, *_sfxInfo;
 };
 
+#endif

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- logic.cpp	29 May 2003 15:50:36 -0000	1.57
+++ logic.cpp	30 May 2003 11:07:30 -0000	1.58
@@ -1991,9 +1991,8 @@
 	return true;
 }
 
-bool SkyLogic::fnStartFx(uint32 a, uint32 b, uint32 c) {
-	warning("Stub: fnStartFx");
-	return true;
+bool SkyLogic::fnStartFx(uint32 sound, uint32 b, uint32 c) {
+	return _skySound->fnStartFx(sound);
 }
 
 bool SkyLogic::fnStopFx(uint32 a, uint32 b, uint32 c) {





More information about the Scummvm-git-logs mailing list