mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make dummy compile again, if SDL is explicitly set to 0
(cherry picked from commit ba55947ee6ab36efc04598953a78a11173103bcf) # Conflicts: # src/doomtype.h # src/dummy/i_system.c
This commit is contained in:
parent
e7b493723f
commit
59ea961f58
8 changed files with 28 additions and 16 deletions
|
|
@ -31,8 +31,8 @@
|
||||||
# MINGW=1, MINGW64=1 - Windows (MinGW toolchain)
|
# MINGW=1, MINGW64=1 - Windows (MinGW toolchain)
|
||||||
# UNIX=1 - Generic Unix like system
|
# UNIX=1 - Generic Unix like system
|
||||||
# FREEBSD=1
|
# FREEBSD=1
|
||||||
# SDL=1 - Use SDL backend. SDL is the only backend though
|
# SDL=1 - Use SDL backend. SDL is the only implemented backend though.
|
||||||
# and thus, always enabled.
|
# If disabled, a dummy backend will be used.
|
||||||
#
|
#
|
||||||
# A list of supported GCC versions can be found in
|
# A list of supported GCC versions can be found in
|
||||||
# Makefile.d/detect.mk -- search 'gcc_versions'.
|
# Makefile.d/detect.mk -- search 'gcc_versions'.
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ all_systems:=\
|
||||||
UNIX\
|
UNIX\
|
||||||
LINUX\
|
LINUX\
|
||||||
FREEBSD\
|
FREEBSD\
|
||||||
SDL\
|
|
||||||
|
|
||||||
# check for user specified system
|
# check for user specified system
|
||||||
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
|
ifeq (,$(filter $(all_systems),$(.VARIABLES)))
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ opts+=-I/usr/X11R6/include
|
||||||
libs+=-L/usr/X11R6/lib
|
libs+=-L/usr/X11R6/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SDL=1
|
SDL?=1
|
||||||
|
|
||||||
# In common usage.
|
# In common usage.
|
||||||
ifdef LINUX
|
ifdef LINUX
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,8 @@ ifdef UNIX
|
||||||
include Makefile.d/nix.mk
|
include Makefile.d/nix.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef SDL
|
ifeq ($(SDL), 1)
|
||||||
include Makefile.d/sdl.mk
|
include Makefile.d/sdl.mk
|
||||||
|
else
|
||||||
|
include Makefile.d/dummy.mk
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
|
||||||
|
|
||||||
nasm_format:=win32
|
nasm_format:=win32
|
||||||
|
|
||||||
SDL=1
|
SDL?=1
|
||||||
|
|
||||||
ifndef NOHW
|
ifndef NOHW
|
||||||
opts+=-DUSE_WGL_SWAP
|
opts+=-DUSE_WGL_SWAP
|
||||||
|
|
@ -83,6 +83,7 @@ else
|
||||||
lib:=../libs/SDL2_mixer/$(mingw)
|
lib:=../libs/SDL2_mixer/$(mingw)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef SDL2
|
||||||
mixer_opts:=-I$(lib)/include/SDL2
|
mixer_opts:=-I$(lib)/include/SDL2
|
||||||
mixer_libs:=-L$(lib)/lib
|
mixer_libs:=-L$(lib)/lib
|
||||||
|
|
||||||
|
|
@ -92,6 +93,7 @@ SDL_opts:=-I$(lib)/include/SDL2\
|
||||||
SDL_libs:=-L$(lib)/lib $(mixer_libs)\
|
SDL_libs:=-L$(lib)/lib $(mixer_libs)\
|
||||||
-lmingw32 -lSDL2main -lSDL2 -mwindows
|
-lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||||
$(eval $(call _set,SDL))
|
$(eval $(call _set,SDL))
|
||||||
|
endif
|
||||||
|
|
||||||
lib:=../libs/zlib
|
lib:=../libs/zlib
|
||||||
ZLIB_opts:=-I$(lib)
|
ZLIB_opts:=-I$(lib)
|
||||||
|
|
|
||||||
5
src/dummy/Sourcefile
Normal file
5
src/dummy/Sourcefile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
i_net.c
|
||||||
|
i_system.c
|
||||||
|
i_main.c
|
||||||
|
i_video.c
|
||||||
|
i_sound.c
|
||||||
|
|
@ -139,29 +139,24 @@ boolean I_LoadSong(char *data, size_t len)
|
||||||
|
|
||||||
void I_UnloadSong(void)
|
void I_UnloadSong(void)
|
||||||
{
|
{
|
||||||
(void)handle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean I_PlaySong(boolean looping)
|
boolean I_PlaySong(boolean looping)
|
||||||
{
|
{
|
||||||
(void)handle;
|
|
||||||
(void)looping;
|
(void)looping;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_StopSong(void)
|
void I_StopSong(void)
|
||||||
{
|
{
|
||||||
(void)handle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_PauseSong(void)
|
void I_PauseSong(void)
|
||||||
{
|
{
|
||||||
(void)handle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_ResumeSong(void)
|
void I_ResumeSong(void)
|
||||||
{
|
{
|
||||||
(void)handle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_SetMusicVolume(UINT8 volume)
|
void I_SetMusicVolume(UINT8 volume)
|
||||||
|
|
@ -188,18 +183,20 @@ void I_StopFadingSong(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void));
|
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void))
|
||||||
{
|
{
|
||||||
(void)target_volume;
|
(void)target_volume;
|
||||||
(void)source_volume;
|
(void)source_volume;
|
||||||
(void)ms;
|
(void)ms;
|
||||||
|
(void)callback;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void));
|
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void))
|
||||||
{
|
{
|
||||||
(void)target_volume;
|
(void)target_volume;
|
||||||
(void)ms;
|
(void)ms;
|
||||||
|
(void)callback;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
#include "../doomdef.h"
|
#include "../doomdef.h"
|
||||||
|
#include "../doomtype.h"
|
||||||
#include "../i_system.h"
|
#include "../i_system.h"
|
||||||
|
|
||||||
|
FILE *logstream = NULL;
|
||||||
|
|
||||||
UINT8 graphics_started = 0;
|
UINT8 graphics_started = 0;
|
||||||
|
|
||||||
UINT8 keyboard_started = 0;
|
UINT8 keyboard_started = 0;
|
||||||
|
|
@ -94,8 +97,6 @@ void I_StartupMouse(void){}
|
||||||
|
|
||||||
void I_StartupMouse2(void){}
|
void I_StartupMouse2(void){}
|
||||||
|
|
||||||
void I_StartupKeyboard(void){}
|
|
||||||
|
|
||||||
INT32 I_GetKey(void)
|
INT32 I_GetKey(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -174,12 +175,18 @@ INT32 I_ClipboardCopy(const char *data, size_t size)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *I_ClipboardPaste(void)
|
const char *I_ClipboardPaste(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_RegisterSysCommands(void) {}
|
void I_RegisterSysCommands(void) {}
|
||||||
|
|
||||||
|
void I_GetCursorPosition(INT32 *x, INT32 *y)
|
||||||
|
{
|
||||||
|
(void)x;
|
||||||
|
(void)y;
|
||||||
|
}
|
||||||
|
|
||||||
#include "../sdl/dosstr.c"
|
#include "../sdl/dosstr.c"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue