fix some more 32/64bit incompatibilities
authornotaz <notasas@gmail.com>
Wed, 21 Nov 2012 22:18:21 +0000 (00:18 +0200)
committernotaz <notasas@gmail.com>
Sat, 24 Nov 2012 02:25:25 +0000 (04:25 +0200)
libpcsxcore/coff.h
plugins/cdrcimg/cdrcimg.c
plugins/dfsound/externals.h
plugins/dfsound/freeze.c
plugins/dfsound/psemuxa.h
plugins/dfsound/stdafx.h
plugins/spunull/xa.h

index 1d084d2..b472e1d 100644 (file)
@@ -25,9 +25,9 @@
 struct external_filehdr {
        unsigned short f_magic;         /* magic number                 */
        unsigned short f_nscns;         /* number of sections           */
-       unsigned long f_timdat; /* time & date stamp            */
-       unsigned long f_symptr; /* file pointer to symtab       */
-       unsigned long f_nsyms;          /* number of symtab entries     */
+       unsigned int f_timdat;  /* time & date stamp            */
+       unsigned int f_symptr;  /* file pointer to symtab       */
+       unsigned int f_nsyms;           /* number of symtab entries     */
        unsigned short f_opthdr;        /* sizeof(optional hdr)         */
        unsigned short f_flags;         /* flags                        */
 };
index e327500..e04ec93 100644 (file)
@@ -49,8 +49,8 @@ extern long CDR__getStatus(struct CdrStat *stat);
 
 struct CdrStat
 {
-       unsigned long Type;
-       unsigned long Status;
+       unsigned int Type;
+       unsigned int Status;
        unsigned char Time[3]; // current playing time
 };
 
index 28dab57..2f3028e 100644 (file)
 ///////////////////////////////////////////////////////////\r
 \r
 // ADSR INFOS PER CHANNEL\r
-typedef struct\r
-{\r
- int            AttackModeExp;\r
- long           AttackTime;\r
- long           DecayTime;\r
- long           SustainLevel;\r
- int            SustainModeExp;\r
- long           SustainModeDec;\r
- long           SustainTime;\r
- int            ReleaseModeExp;\r
- unsigned long  ReleaseVal;\r
- long           ReleaseTime;\r
- long           ReleaseStartTime; \r
- long           ReleaseVol; \r
- long           lTime;\r
- long           lVolume;\r
-} ADSRInfo;\r
-\r
 typedef struct\r
 {\r
  unsigned char  State:2;\r
@@ -215,11 +197,10 @@ extern int decode_pos;
 extern SPUCHAN s_chan[];\r
 extern REVERBInfo rvb;\r
 \r
-extern unsigned long dwNoiseVal;\r
 extern unsigned short spuCtrl;\r
 extern unsigned short spuStat;\r
 extern unsigned short spuIrq;\r
-extern unsigned long  spuAddr;\r
+extern unsigned int   spuAddr;\r
 extern int      bSpuInit;\r
 extern unsigned int dwNewChannel;\r
 extern unsigned int dwChannelOn;\r
index 58a8347..8787db0 100644 (file)
 // freeze structs\r
 ////////////////////////////////////////////////////////////////////////\r
 \r
+typedef struct\r
+{\r
+ int            AttackModeExp;\r
+ int            AttackTime;\r
+ int            DecayTime;\r
+ int            SustainLevel;\r
+ int            SustainModeExp;\r
+ int            SustainModeDec;\r
+ int            SustainTime;\r
+ int            ReleaseModeExp;\r
+ unsigned int   ReleaseVal;\r
+ int            ReleaseTime;\r
+ int            ReleaseStartTime; \r
+ int            ReleaseVol; \r
+ int            lTime;\r
+ int            lVolume;\r
+} ADSRInfo;\r
+\r
 typedef struct\r
 {\r
  int            State;\r
@@ -40,9 +58,9 @@ typedef struct
  int            ReleaseModeExp;\r
  int            ReleaseRate;\r
  int            EnvelopeVol;\r
long           lVolume;\r
long           lDummy1;\r
long           lDummy2;\r
int            lVolume;\r
int            lDummy1;\r
int            lDummy2;\r
 } ADSRInfoEx_orig;\r
 \r
 typedef struct\r
index 84c6260..402d273 100644 (file)
@@ -8,7 +8,7 @@
 \r
 typedef struct\r
 {\r
-       long    y0, y1;\r
+       int     y0, y1;\r
 } ADPCM_Decode_t;\r
 \r
 typedef struct\r
@@ -21,7 +21,7 @@ typedef struct
        short                   pcm[16384];\r
 } xa_decode_t;\r
 \r
-long xa_decode_sector( xa_decode_t *xdp,\r
+int xa_decode_sector( xa_decode_t *xdp,\r
                                           unsigned char *sectorp,\r
                                           int is_first_sector );\r
 \r
index d40344f..8993bb3 100644 (file)
@@ -32,9 +32,9 @@
 
 #undef CALLBACK
 #define CALLBACK
-#define DWORD unsigned long
+#define DWORD unsigned int
 #define LOWORD(l)           ((unsigned short)(l)) 
-#define HIWORD(l)           ((unsigned short)(((unsigned long)(l) >> 16) & 0xFFFF)) 
+#define HIWORD(l)           ((unsigned short)(((unsigned int)(l) >> 16) & 0xFFFF)) 
 
 #ifndef INLINE
 #define INLINE static inline
index cd38f96..6fb7bfd 100644 (file)
@@ -5,7 +5,7 @@
 \r
 typedef struct\r
 {\r
-       long    y0, y1;\r
+       int     y0, y1;\r
 } ADPCM_Decode_t;\r
 \r
 typedef struct\r