Wolf3D: uSDL is no longer needed.

git-svn-id: svn://kolibrios.org@9213 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat 2021-10-04 17:21:33 +00:00
parent 66c02372de
commit e4070e69e0
5 changed files with 10 additions and 32 deletions

View File

@ -42,13 +42,8 @@
#define __MIX_INTERNAL_EFFECT__ #define __MIX_INTERNAL_EFFECT__
#include "effects_internal.h" #include "effects_internal.h"
#ifdef _KOLIBRI #define uSDL_Delay SDL_Delay
void uSDL_Delay(unsigned int time); #define uSDL_GetTicks SDL_GetTicks
unsigned uSDL_GetTicks();
#else
#define uSDL_Delay SDL_Delay
#define uSDL_GetTicks SDL_GetTicks
#endif
/* Magic numbers for various audio file formats */ /* Magic numbers for various audio file formats */
#define RIFF 0x46464952 /* "RIFF" */ #define RIFF 0x46464952 /* "RIFF" */

View File

@ -70,14 +70,10 @@
#if defined(MP3_MUSIC) || defined(MP3_MAD_MUSIC) #if defined(MP3_MUSIC) || defined(MP3_MAD_MUSIC)
static SDL_AudioSpec used_mixer; static SDL_AudioSpec used_mixer;
#endif #endif
unsigned uSDL_GetTicks();
#ifdef _KOLIBRI #define uSDL_Delay SDL_Delay
extern void uSDL_Delay(unsigned int time); #define uSDL_GetTicks SDL_GetTicks
extern unsigned uSDL_GetTicks();
#else
#define uSDL_Delay SDL_Delay
#define uSDL_GetTicks SDL_GetTicks
#endif
int volatile music_active = 1; int volatile music_active = 1;
static int volatile music_stopped = 0; static int volatile music_stopped = 0;

View File

@ -23,7 +23,7 @@ compile_gcc{
-- SDL and SDL_mixer -- -- SDL and SDL_mixer --
compile_gcc{ compile_gcc{
"SDL/SDL_wave.c", "SDL/SDL_audiocvt.c", "SDL/SDL_mixer.c", "SDL_mixer/mixer.c", "SDL_mixer/music.c", "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", "SDL_mixer/effects_internal.c", "SDL_mixer/effect_position.c",
} }

View File

@ -24,15 +24,8 @@
# define O_BINARY 0 # define O_BINARY 0
#endif #endif
#ifdef _KOLIBRI #define uSDL_Delay SDL_Delay
extern "C"{ #define uSDL_GetTicks SDL_GetTicks
extern void uSDL_Delay(unsigned int time);
extern unsigned uSDL_GetTicks();
}
#else
#define uSDL_Delay SDL_Delay
#define uSDL_GetTicks SDL_GetTicks
#endif
#pragma pack(1) #pragma pack(1)

View File

@ -27,9 +27,7 @@ extern byte signon[];
extern void kolibri_set_win_center(); extern void kolibri_set_win_center();
extern char* dirname(char* path); extern char* dirname(char* path);
extern void setcwd(char* path); extern void setcwd(char* path);
extern "C"{
extern void uSDL_StartTicks(void);
}
extern boolean SD_Started; extern boolean SD_Started;
/* /*
============================================================================= =============================================================================
@ -1216,11 +1214,7 @@ static void InitGame()
#if defined _WIN32 #if defined _WIN32
putenv("SDL_VIDEODRIVER=directx"); putenv("SDL_VIDEODRIVER=directx");
#endif #endif
#ifdef _KOLIBRI
uSDL_StartTicks();
#endif
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0)
{ {
printf("Unable to init SDL: %s\n", SDL_GetError()); printf("Unable to init SDL: %s\n", SDL_GetError());