diff --git a/contrib/games/wolf3d/SDL_mixer/mixer.c b/contrib/games/wolf3d/SDL_mixer/mixer.c index cc03c37c68..89937bb57f 100644 --- a/contrib/games/wolf3d/SDL_mixer/mixer.c +++ b/contrib/games/wolf3d/SDL_mixer/mixer.c @@ -42,13 +42,8 @@ #define __MIX_INTERNAL_EFFECT__ #include "effects_internal.h" -#ifdef _KOLIBRI - void uSDL_Delay(unsigned int time); - unsigned uSDL_GetTicks(); -#else - #define uSDL_Delay SDL_Delay - #define uSDL_GetTicks SDL_GetTicks -#endif +#define uSDL_Delay SDL_Delay +#define uSDL_GetTicks SDL_GetTicks /* Magic numbers for various audio file formats */ #define RIFF 0x46464952 /* "RIFF" */ diff --git a/contrib/games/wolf3d/SDL_mixer/music.c b/contrib/games/wolf3d/SDL_mixer/music.c index bbc7700d16..e172dc44f4 100644 --- a/contrib/games/wolf3d/SDL_mixer/music.c +++ b/contrib/games/wolf3d/SDL_mixer/music.c @@ -70,14 +70,10 @@ #if defined(MP3_MUSIC) || defined(MP3_MAD_MUSIC) static SDL_AudioSpec used_mixer; #endif +unsigned uSDL_GetTicks(); -#ifdef _KOLIBRI - extern void uSDL_Delay(unsigned int time); - extern unsigned uSDL_GetTicks(); -#else - #define uSDL_Delay SDL_Delay - #define uSDL_GetTicks SDL_GetTicks -#endif +#define uSDL_Delay SDL_Delay +#define uSDL_GetTicks SDL_GetTicks int volatile music_active = 1; static int volatile music_stopped = 0; diff --git a/contrib/games/wolf3d/Tupfile.lua b/contrib/games/wolf3d/Tupfile.lua index cee849460c..53f12176b7 100644 --- a/contrib/games/wolf3d/Tupfile.lua +++ b/contrib/games/wolf3d/Tupfile.lua @@ -23,7 +23,7 @@ compile_gcc{ -- SDL and SDL_mixer -- compile_gcc{ "SDL/SDL_wave.c", "SDL/SDL_audiocvt.c", "SDL/SDL_mixer.c", "SDL_mixer/mixer.c", "SDL_mixer/music.c", - "SDL_mixer/load_aiff.c", "SDL_mixer/load_voc.c", "SDL/uSDL.c", + "SDL_mixer/load_aiff.c", "SDL_mixer/load_voc.c", "SDL_mixer/effects_internal.c", "SDL_mixer/effect_position.c", } diff --git a/contrib/games/wolf3d/wl_def.h b/contrib/games/wolf3d/wl_def.h index 421dcfacba..b468029781 100755 --- a/contrib/games/wolf3d/wl_def.h +++ b/contrib/games/wolf3d/wl_def.h @@ -24,15 +24,8 @@ # define O_BINARY 0 #endif -#ifdef _KOLIBRI -extern "C"{ - extern void uSDL_Delay(unsigned int time); - extern unsigned uSDL_GetTicks(); -} -#else - #define uSDL_Delay SDL_Delay - #define uSDL_GetTicks SDL_GetTicks -#endif +#define uSDL_Delay SDL_Delay +#define uSDL_GetTicks SDL_GetTicks #pragma pack(1) diff --git a/contrib/games/wolf3d/wl_main.cpp b/contrib/games/wolf3d/wl_main.cpp index d07154e242..be108f23f1 100755 --- a/contrib/games/wolf3d/wl_main.cpp +++ b/contrib/games/wolf3d/wl_main.cpp @@ -27,9 +27,7 @@ extern byte signon[]; extern void kolibri_set_win_center(); extern char* dirname(char* path); extern void setcwd(char* path); -extern "C"{ - extern void uSDL_StartTicks(void); -} + extern boolean SD_Started; /* ============================================================================= @@ -1216,11 +1214,7 @@ static void InitGame() #if defined _WIN32 putenv("SDL_VIDEODRIVER=directx"); #endif - -#ifdef _KOLIBRI - uSDL_StartTicks(); -#endif - + if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) { printf("Unable to init SDL: %s\n", SDL_GetError());