From c668f24877c063db881fa8d1eeb8a6fbc649d5a0 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 22 Nov 2012 00:18:21 +0200 Subject: fix some more 32/64bit incompatibilities --- plugins/dfsound/externals.h | 21 +-------------------- plugins/dfsound/freeze.c | 24 +++++++++++++++++++++--- plugins/dfsound/psemuxa.h | 4 ++-- plugins/dfsound/stdafx.h | 4 ++-- 4 files changed, 26 insertions(+), 27 deletions(-) (limited to 'plugins/dfsound') diff --git a/plugins/dfsound/externals.h b/plugins/dfsound/externals.h index 28dab57..2f3028e 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 58a8347..8787db0 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 84c6260..402d273 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 d40344f..8993bb3 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 -- cgit v1.2.3