From c668f24877c063db881fa8d1eeb8a6fbc649d5a0 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 22 Nov 2012 00:18:21 +0200 Subject: [PATCH] fix some more 32/64bit incompatibilities --- libpcsxcore/coff.h | 6 +++--- plugins/cdrcimg/cdrcimg.c | 4 ++-- plugins/dfsound/externals.h | 21 +-------------------- plugins/dfsound/freeze.c | 24 +++++++++++++++++++++--- plugins/dfsound/psemuxa.h | 4 ++-- plugins/dfsound/stdafx.h | 4 ++-- plugins/spunull/xa.h | 2 +- 7 files changed, 32 insertions(+), 33 deletions(-) diff --git a/libpcsxcore/coff.h b/libpcsxcore/coff.h index 1d084d28..b472e1de 100644 --- a/libpcsxcore/coff.h +++ b/libpcsxcore/coff.h @@ -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 */ }; diff --git a/plugins/cdrcimg/cdrcimg.c b/plugins/cdrcimg/cdrcimg.c index e3275001..e04ec93d 100644 --- a/plugins/cdrcimg/cdrcimg.c +++ b/plugins/cdrcimg/cdrcimg.c @@ -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 }; diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h index 28dab573..2f3028ee 100644 --- a/plugins/dfsound/externals.h +++ b/plugins/dfsound/externals.h @@ -56,24 +56,6 @@ /////////////////////////////////////////////////////////// // ADSR INFOS PER CHANNEL -typedef struct -{ - int AttackModeExp; - long AttackTime; - long DecayTime; - long SustainLevel; - int SustainModeExp; - long SustainModeDec; - long SustainTime; - int ReleaseModeExp; - unsigned long ReleaseVal; - long ReleaseTime; - long ReleaseStartTime; - long ReleaseVol; - long lTime; - long lVolume; -} ADSRInfo; - typedef struct { unsigned char State:2; @@ -215,11 +197,10 @@ extern int decode_pos; extern SPUCHAN s_chan[]; extern REVERBInfo rvb; -extern unsigned long dwNoiseVal; extern unsigned short spuCtrl; extern unsigned short spuStat; extern unsigned short spuIrq; -extern unsigned long spuAddr; +extern unsigned int spuAddr; extern int bSpuInit; extern unsigned int dwNewChannel; extern unsigned int dwChannelOn; diff --git a/plugins/dfsound/freeze.c b/plugins/dfsound/freeze.c index 58a83476..8787db07 100644 --- a/plugins/dfsound/freeze.c +++ b/plugins/dfsound/freeze.c @@ -27,6 +27,24 @@ // freeze structs //////////////////////////////////////////////////////////////////////// +typedef struct +{ + int AttackModeExp; + int AttackTime; + int DecayTime; + int SustainLevel; + int SustainModeExp; + int SustainModeDec; + int SustainTime; + int ReleaseModeExp; + unsigned int ReleaseVal; + int ReleaseTime; + int ReleaseStartTime; + int ReleaseVol; + int lTime; + int lVolume; +} ADSRInfo; + typedef struct { int State; @@ -40,9 +58,9 @@ typedef struct int ReleaseModeExp; int ReleaseRate; int EnvelopeVol; - long lVolume; - long lDummy1; - long lDummy2; + int lVolume; + int lDummy1; + int lDummy2; } ADSRInfoEx_orig; typedef struct diff --git a/plugins/dfsound/psemuxa.h b/plugins/dfsound/psemuxa.h index 84c62604..402d2733 100644 --- a/plugins/dfsound/psemuxa.h +++ b/plugins/dfsound/psemuxa.h @@ -8,7 +8,7 @@ typedef struct { - long y0, y1; + int y0, y1; } ADPCM_Decode_t; typedef struct @@ -21,7 +21,7 @@ typedef struct short pcm[16384]; } xa_decode_t; -long xa_decode_sector( xa_decode_t *xdp, +int xa_decode_sector( xa_decode_t *xdp, unsigned char *sectorp, int is_first_sector ); diff --git a/plugins/dfsound/stdafx.h b/plugins/dfsound/stdafx.h index d40344f3..8993bb35 100644 --- a/plugins/dfsound/stdafx.h +++ b/plugins/dfsound/stdafx.h @@ -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 diff --git a/plugins/spunull/xa.h b/plugins/spunull/xa.h index cd38f96c..6fb7bfdf 100644 --- a/plugins/spunull/xa.h +++ b/plugins/spunull/xa.h @@ -5,7 +5,7 @@ typedef struct { - long y0, y1; + int y0, y1; } ADPCM_Decode_t; typedef struct -- 2.39.2