[Scummvm-cvs-logs] CVS: scummvm/backends/midi/mt32 partial.h,1.2,1.3 structures.h,1.3,1.4 synth.cpp,1.6,1.7 synth.h,1.2,1.3

Max Horn fingolfin at users.sourceforge.net
Fri Oct 22 09:06:20 CEST 2004


Update of /cvsroot/scummvm/scummvm/backends/midi/mt32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13817

Modified Files:
	partial.h structures.h synth.cpp synth.h 
Log Message:
cleanup

Index: partial.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/partial.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- partial.h	22 Oct 2004 15:39:27 -0000	1.2
+++ partial.h	22 Oct 2004 15:56:39 -0000	1.3
@@ -20,8 +20,8 @@
  *
  */
 
-#ifndef __CPARTIALMT32_H__
-#define __CPARTIALMT32_H__
+#ifndef CPARTIALMT32_H
+#define CPARTIALMT32_H
 
 #include "backends/midi/mt32/structures.h"
 

Index: structures.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/structures.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- structures.h	22 Oct 2004 15:39:27 -0000	1.3
+++ structures.h	22 Oct 2004 15:56:39 -0000	1.4
@@ -20,8 +20,8 @@
  *
  */
 
-#if !defined __MT32STRUCTURES_H__
-#define __MT32STRUCTURES_H__
+#ifndef MT32STRUCTURES_H
+#define MT32STRUCTURES_H
 
 #include "stdafx.h"
 #include "common/scummsys.h"
@@ -48,15 +48,12 @@
 	fflush(stdout);
 }
 
-#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
+#define ALIGN_PACKED GCC_PACK
 
-#define ALIGN_PACKED
+#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__))
 
 #else
 
-//#define ALIGN_PACKED __attribute__ ((__packed__))
-#define ALIGN_PACKED __attribute__ ((aligned (1)))
-
 #ifdef HAVE_X86
 #define eflag(value) __asm__ __volatile__("pushfl \n popfl \n" : : "a"(value))
 #define cpuid_flag  (1 << 21)
@@ -441,10 +438,10 @@
 
 #endif
 
-extern bool enabled3DNow;
-extern bool enabledSSE;
+#if !defined(__GNUC__)
+	#pragma START_PACK_STRUCTS
+#endif
 
-#pragma pack(1)
 struct timbreParam {
 	struct commonParam {
 		char name[10];
@@ -571,7 +568,9 @@
 	char mt32memory[sizeof(memBanks)];
 } ALIGN_PACKED;
 
-#pragma pack()
+#if !defined(__GNUC__)
+	#pragma END_PACK_STRUCTS
+#endif
 
 struct partialFormat {
 	uint32 addr;

Index: synth.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/synth.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- synth.cpp	22 Oct 2004 15:39:27 -0000	1.6
+++ synth.cpp	22 Oct 2004 15:56:39 -0000	1.7
@@ -56,22 +56,24 @@
 #define NEW_REVERB_TIME   14
 #define NEW_REVERB_LEVEL  15
 
-#pragma pack(1)
+#if !defined(__GNUC__)
+	#pragma START_PACK_STRUCTS
+#endif
+
 static union mt32ramFormat {
 	memParams params;
 	memBanks patchabs;
 	memAbsolute memabs;
-
-
 	// System memory 10
-
 	// Display 20
-
 	// Reset 7F
+} ALIGN_PACKED mt32ram, mt32default;
+
+#if !defined(__GNUC__)
+	#pragma END_PACK_STRUCTS
+#endif
 
 
-} ALIGN_PACKED mt32ram, mt32default;
-#pragma pack()
 // Borrowed from Borland's site
 int axtoi(char *hexStg) {
   unsigned int n = 0;         // position in string
@@ -3410,14 +3412,14 @@
 	return true;
 }
 
-BOOL RecalcWaveforms(char * baseDir, int sampRate, recalcStatusCallback callBack) {
+bool RecalcWaveforms(char * baseDir, int sampRate, recalcStatusCallback callBack) {
 
 #ifdef NOMANSLAND
 
 	File fp;
 	fp.open("waveforms.raw", File::kFileWriteMode);
 
-	if(!fp.isOpen()) return FALSE;
+	if(!fp.isOpen()) return false;
 
 	double ampsize = WGAMP;
 	int f;
@@ -3512,11 +3514,7 @@
 	fp.close();
 #endif
 
-	return TRUE;
-
-
-
-
+	return true;
 }
 
 bool CSynthMT32::ClassicOpen(const char *baseDir, SynthProperties useProp) {

Index: synth.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/synth.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- synth.h	22 Oct 2004 15:39:28 -0000	1.2
+++ synth.h	22 Oct 2004 15:56:39 -0000	1.3
@@ -20,8 +20,8 @@
  *
  */
 
-#if !defined __CSYNTHMT32_H__
-#define __CSYNTHMT32_H__
+#ifndef CSYNTHMT32_H
+#define CSYNTHMT32_H
 
 #ifdef HAVE_X86
 #if defined(_MSC_VER)
@@ -35,8 +35,6 @@
 #define USE_MMX 0
 #endif
 
-extern const char *rom_path;
-
 #define AMPENV 0
 #define FILTENV 1
 #define PITCHENV 2
@@ -79,16 +77,6 @@
 	int RevLevel;
 };
 
-#ifndef BOOL
-	#define BOOL bool
-#endif
-#ifndef TRUE
-	#define TRUE true
-#endif
-#ifndef FALSE
-	#define FALSE false
-#endif
-
 // This is the specification of the Callback routine used when calling the RecalcWaveforms
 // function
 typedef void (*recalcStatusCallback)(int percDone);
@@ -97,7 +85,7 @@
 // sampling rate.  The callback routine provides interactivity to let the user know what
 // percentage is complete in regenerating the waveforms.  When a NULL pointer is used as the
 // callback routine, no status is reported.
-BOOL RecalcWaveforms(char * baseDir, int sampRate, recalcStatusCallback callBack);
+bool RecalcWaveforms(char * baseDir, int sampRate, recalcStatusCallback callBack);
 
 typedef float (*iir_filter_type)(float input,float *hist1_ptr, float *coef_ptr, int revLevel);
 extern iir_filter_type usefilter;
@@ -130,7 +118,7 @@
 extern int32 getAmpEnvelope(dpoly::partialStatus *pStat, dpoly *poly);
 extern int32 getFiltEnvelope(int16 wg, dpoly::partialStatus *pStat, dpoly *poly);
 
-class CSynthMT32  {
+class CSynthMT32 {
 private:
 
 	unsigned char initmode;
@@ -155,11 +143,11 @@
 	void PlayMsg(uint32 msg);
 
 	// Sends a string of Sysex commands to the MT-32 for immediate interpretation
-        void PlaySysex(uint8 * sysex, uint32 len);
-        
-        // Save the system state to a sysex file specified by filename 
-        int DumpSysex(char *filename);
-   
+	void PlaySysex(uint8 * sysex, uint32 len);
+
+	// Save the system state to a sysex file specified by filename 
+	int DumpSysex(char *filename);
+
 	// This callback routine is used to have the MT-32 generate samples to the specified
 	// output stream.  The length is in whole samples, not bytes. (I.E. in 16-bit stereo,
 	// one sample is 4 bytes)





More information about the Scummvm-git-logs mailing list