Fix some int/int32_t confusion where linking to external libraries is concerned, at least as exposed by building with devkitPPC r28.

git-svn-id: https://svn.eduke32.com/eduke32@5980 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-01-01 13:23:35 +00:00
parent 0a14982d4e
commit fa37e062b1
8 changed files with 20 additions and 16 deletions

View file

@ -560,7 +560,7 @@ typedef struct {
} usermaphack_t; } usermaphack_t;
extern usermaphack_t g_loadedMapHack; extern usermaphack_t g_loadedMapHack;
extern int32_t compare_usermaphacks(const void *, const void *); extern int compare_usermaphacks(const void *, const void *);
extern usermaphack_t *usermaphacks; extern usermaphack_t *usermaphacks;
extern int32_t num_usermaphacks; extern int32_t num_usermaphacks;

View file

@ -6,7 +6,7 @@
usermaphack_t g_loadedMapHack; // used only for the MD4 part usermaphack_t g_loadedMapHack; // used only for the MD4 part
int32_t compare_usermaphacks(const void *a, const void *b) int compare_usermaphacks(const void *a, const void *b)
{ {
return Bmemcmp(((usermaphack_t const *) a)->md4, ((usermaphack_t const *) b)->md4, 16); return Bmemcmp(((usermaphack_t const *) a)->md4, ((usermaphack_t const *) b)->md4, 16);
} }

View file

@ -414,14 +414,14 @@ void eduke32_exit_return(int retval)
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
int32_t WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int32_t nCmdShow) int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
#elif defined __ANDROID__ #elif defined __ANDROID__
# ifdef __cplusplus # ifdef __cplusplus
extern "C" int eduke32_android_main(int argc, char const *argv[]); extern "C" int eduke32_android_main(int argc, char const *argv[]);
# endif # endif
int eduke32_android_main(int argc, char const *argv[]) int eduke32_android_main(int argc, char const *argv[])
#else #else
int32_t main(int32_t argc, char *argv[]) int main(int argc, char *argv[])
#endif #endif
{ {
#ifdef __ANDROID__ #ifdef __ANDROID__

View file

@ -63,7 +63,7 @@ static void print_centered(const int32_t width, const char *part1, const char *p
void wii_open(void) void wii_open(void)
{ {
vec2_t ConsoleExtent; struct { int x, y; } ConsoleExtent;
L2Enhance(); L2Enhance();
CON_EnableGecko(1, 1); CON_EnableGecko(1, 1);

View file

@ -296,7 +296,7 @@ static void divcommon(int32_t *ap, int32_t *bp)
// //
// WinMain() -- main Windows entry point // WinMain() -- main Windows entry point
// //
int32_t WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int32_t nCmdShow) int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{ {
int32_t r; int32_t r;
#ifdef USE_OPENGL #ifdef USE_OPENGL

View file

@ -19,12 +19,12 @@
*/ */
int NoSoundDrv_GetError(void); int32_t NoSoundDrv_GetError(void);
const char *NoSoundDrv_ErrorString( int ErrorNumber ); const char *NoSoundDrv_ErrorString( int32_t ErrorNumber );
int NoSoundDrv_PCM_Init(int *mixrate, int *numchannels, void * initdata); int32_t NoSoundDrv_PCM_Init(int32_t *mixrate, int32_t *numchannels, void * initdata);
void NoSoundDrv_PCM_Shutdown(void); void NoSoundDrv_PCM_Shutdown(void);
int NoSoundDrv_PCM_BeginPlayback(char *BufferStart, int BufferSize, int32_t NoSoundDrv_PCM_BeginPlayback(char *BufferStart, int32_t BufferSize,
int NumDivisions, void ( *CallBackFunc )( void ) ); int32_t NumDivisions, void ( *CallBackFunc )( void ) );
void NoSoundDrv_PCM_StopPlayback(void); void NoSoundDrv_PCM_StopPlayback(void);
void NoSoundDrv_PCM_Lock(void); void NoSoundDrv_PCM_Lock(void);
void NoSoundDrv_PCM_Unlock(void); void NoSoundDrv_PCM_Unlock(void);

View file

@ -60,7 +60,7 @@ static uint8_t *DummyBuffer = NULL;
static int32_t InterruptsDisabled = 0; static int32_t InterruptsDisabled = 0;
static SDL_mutex *EffectFence; static SDL_mutex *EffectFence;
static void fillData(int32_t chan, void *ptr, int32_t remaining, void *udata) static void fillData(int chan, void *ptr, int remaining, void *udata)
{ {
int32_t len; int32_t len;
char *sptr; char *sptr;
@ -172,7 +172,9 @@ int32_t SDLDrv_PCM_Init(int32_t *mixrate, int32_t *numchannels, void * initdata)
} }
if (Mix_QuerySpec(mixrate, &fmt, numchannels)) int intmixrate = *mixrate;
int intnumchannels = *numchannels;
if (Mix_QuerySpec(&intmixrate, &fmt, &intnumchannels))
{ {
if (fmt == AUDIO_U8 || fmt == AUDIO_S8) if (fmt == AUDIO_U8 || fmt == AUDIO_S8)
{ {
@ -180,6 +182,8 @@ int32_t SDLDrv_PCM_Init(int32_t *mixrate, int32_t *numchannels, void * initdata)
return SDLErr_Error; return SDLErr_Error;
} }
} }
*mixrate = intmixrate;
*numchannels = intnumchannels;
//Mix_SetPostMix(fillData, NULL); //Mix_SetPostMix(fillData, NULL);

View file

@ -172,7 +172,7 @@ static size_t read_vorbis(void *ptr, size_t size, size_t nmemb, void *datasource
} }
static int32_t seek_vorbis(void *datasource, ogg_int64_t offset, int32_t whence) static int seek_vorbis(void *datasource, ogg_int64_t offset, int whence)
{ {
vorbis_data *vorb = (vorbis_data *)datasource; vorbis_data *vorb = (vorbis_data *)datasource;
@ -191,7 +191,7 @@ static int32_t seek_vorbis(void *datasource, ogg_int64_t offset, int32_t whence)
return vorb->pos; return vorb->pos;
} }
static int32_t close_vorbis(void *datasource) static int close_vorbis(void *datasource)
{ {
UNREFERENCED_PARAMETER(datasource); UNREFERENCED_PARAMETER(datasource);
return 0; return 0;
@ -229,7 +229,7 @@ Controls playback of OggVorbis data
static playbackstatus MV_GetNextVorbisBlock(VoiceNode *voice) static playbackstatus MV_GetNextVorbisBlock(VoiceNode *voice)
{ {
int32_t bitstream; int bitstream;
voice->Playing = TRUE; voice->Playing = TRUE;