mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
* Move the conditional compilation of bg_lib.c from the Makefile to cpp in
order to force dependency generation on bg_lib.* * Make testing USE_ defines more consistent
This commit is contained in:
parent
60260f1c60
commit
7562caa310
13 changed files with 55 additions and 69 deletions
52
Makefile
52
Makefile
|
@ -185,21 +185,21 @@ ifeq ($(PLATFORM),linux)
|
||||||
-pipe -DUSE_ICON $(shell sdl-config --cflags)
|
-pipe -DUSE_ICON $(shell sdl-config --cflags)
|
||||||
|
|
||||||
ifeq ($(USE_OPENAL),1)
|
ifeq ($(USE_OPENAL),1)
|
||||||
BASE_CFLAGS += -DUSE_OPENAL=1
|
BASE_CFLAGS += -DUSE_OPENAL
|
||||||
ifeq ($(USE_OPENAL_DLOPEN),1)
|
ifeq ($(USE_OPENAL_DLOPEN),1)
|
||||||
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CURL),1)
|
ifeq ($(USE_CURL),1)
|
||||||
BASE_CFLAGS += -DUSE_CURL=1
|
BASE_CFLAGS += -DUSE_CURL
|
||||||
ifeq ($(USE_CURL_DLOPEN),1)
|
ifeq ($(USE_CURL_DLOPEN),1)
|
||||||
BASE_CFLAGS += -DUSE_CURL_DLOPEN=1
|
BASE_CFLAGS += -DUSE_CURL_DLOPEN
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CODEC_VORBIS),1)
|
ifeq ($(USE_CODEC_VORBIS),1)
|
||||||
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer
|
OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer
|
||||||
|
@ -338,25 +338,25 @@ ifeq ($(PLATFORM),darwin)
|
||||||
BASE_CFLAGS += -gfull
|
BASE_CFLAGS += -gfull
|
||||||
|
|
||||||
ifeq ($(USE_OPENAL),1)
|
ifeq ($(USE_OPENAL),1)
|
||||||
BASE_CFLAGS += -DUSE_OPENAL=1
|
BASE_CFLAGS += -DUSE_OPENAL
|
||||||
ifneq ($(USE_OPENAL_DLOPEN),1)
|
ifneq ($(USE_OPENAL_DLOPEN),1)
|
||||||
CLIENT_LDFLAGS += -framework OpenAL
|
CLIENT_LDFLAGS += -framework OpenAL
|
||||||
else
|
else
|
||||||
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CURL),1)
|
ifeq ($(USE_CURL),1)
|
||||||
BASE_CFLAGS += -DUSE_CURL=1
|
BASE_CFLAGS += -DUSE_CURL
|
||||||
ifneq ($(USE_CURL_DLOPEN),1)
|
ifneq ($(USE_CURL_DLOPEN),1)
|
||||||
CLIENT_LDFLAGS += -lcurl
|
CLIENT_LDFLAGS += -lcurl
|
||||||
else
|
else
|
||||||
BASE_CFLAGS += -DUSE_CURL_DLOPEN=1
|
BASE_CFLAGS += -DUSE_CURL_DLOPEN
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CODEC_VORBIS),1)
|
ifeq ($(USE_CODEC_VORBIS),1)
|
||||||
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS
|
||||||
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
|
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -405,18 +405,18 @@ endif
|
||||||
-DUSE_ICON -I$(SDLHDIR)/include
|
-DUSE_ICON -I$(SDLHDIR)/include
|
||||||
|
|
||||||
ifeq ($(USE_OPENAL),1)
|
ifeq ($(USE_OPENAL),1)
|
||||||
BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN=1
|
BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CURL),1)
|
ifeq ($(USE_CURL),1)
|
||||||
BASE_CFLAGS += -DUSE_CURL=1
|
BASE_CFLAGS += -DUSE_CURL
|
||||||
ifneq ($(USE_CURL_DLOPEN),1)
|
ifneq ($(USE_CURL_DLOPEN),1)
|
||||||
BASE_CFLAGS += -DCURL_STATICLIB
|
BASE_CFLAGS += -DCURL_STATICLIB
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CODEC_VORBIS),1)
|
ifeq ($(USE_CODEC_VORBIS),1)
|
||||||
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OPTIMIZE = -O3 -march=i586 -fno-omit-frame-pointer -ffast-math \
|
OPTIMIZE = -O3 -march=i586 -fno-omit-frame-pointer -ffast-math \
|
||||||
|
@ -479,14 +479,14 @@ ifeq ($(PLATFORM),freebsd)
|
||||||
-DUSE_ICON $(shell sdl-config --cflags)
|
-DUSE_ICON $(shell sdl-config --cflags)
|
||||||
|
|
||||||
ifeq ($(USE_OPENAL),1)
|
ifeq ($(USE_OPENAL),1)
|
||||||
BASE_CFLAGS += -DUSE_OPENAL=1
|
BASE_CFLAGS += -DUSE_OPENAL
|
||||||
ifeq ($(USE_OPENAL_DLOPEN),1)
|
ifeq ($(USE_OPENAL_DLOPEN),1)
|
||||||
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN=1
|
BASE_CFLAGS += -DUSE_OPENAL_DLOPEN
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_CODEC_VORBIS),1)
|
ifeq ($(USE_CODEC_VORBIS),1)
|
||||||
BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
|
BASE_CFLAGS += -DUSE_CODEC_VORBIS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),axp)
|
ifeq ($(ARCH),axp)
|
||||||
|
@ -709,7 +709,7 @@ ifdef DEFAULT_BASEDIR
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_LOCAL_HEADERS),1)
|
ifeq ($(USE_LOCAL_HEADERS),1)
|
||||||
BASE_CFLAGS += -DUSE_LOCAL_HEADERS=1
|
BASE_CFLAGS += -DUSE_LOCAL_HEADERS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(GENERATE_DEPENDENCIES),1)
|
ifeq ($(GENERATE_DEPENDENCIES),1)
|
||||||
|
@ -1354,6 +1354,7 @@ Q3CGOBJ_ = \
|
||||||
$(B)/baseq3/game/bg_misc.o \
|
$(B)/baseq3/game/bg_misc.o \
|
||||||
$(B)/baseq3/game/bg_pmove.o \
|
$(B)/baseq3/game/bg_pmove.o \
|
||||||
$(B)/baseq3/game/bg_slidemove.o \
|
$(B)/baseq3/game/bg_slidemove.o \
|
||||||
|
$(B)/baseq3/game/bg_lib.o \
|
||||||
$(B)/baseq3/cgame/cg_consolecmds.o \
|
$(B)/baseq3/cgame/cg_consolecmds.o \
|
||||||
$(B)/baseq3/cgame/cg_draw.o \
|
$(B)/baseq3/cgame/cg_draw.o \
|
||||||
$(B)/baseq3/cgame/cg_drawtools.o \
|
$(B)/baseq3/cgame/cg_drawtools.o \
|
||||||
|
@ -1376,7 +1377,7 @@ Q3CGOBJ_ = \
|
||||||
$(B)/baseq3/qcommon/q_shared.o
|
$(B)/baseq3/qcommon/q_shared.o
|
||||||
|
|
||||||
Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
|
Q3CGOBJ = $(Q3CGOBJ_) $(B)/baseq3/cgame/cg_syscalls.o
|
||||||
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm)
|
||||||
|
|
||||||
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT): $(Q3CGOBJ)
|
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT): $(Q3CGOBJ)
|
||||||
$(echo_cmd) "LD $@"
|
$(echo_cmd) "LD $@"
|
||||||
|
@ -1395,6 +1396,7 @@ MPCGOBJ_ = \
|
||||||
$(B)/missionpack/game/bg_misc.o \
|
$(B)/missionpack/game/bg_misc.o \
|
||||||
$(B)/missionpack/game/bg_pmove.o \
|
$(B)/missionpack/game/bg_pmove.o \
|
||||||
$(B)/missionpack/game/bg_slidemove.o \
|
$(B)/missionpack/game/bg_slidemove.o \
|
||||||
|
$(B)/missionpack/game/bg_lib.o \
|
||||||
$(B)/missionpack/cgame/cg_consolecmds.o \
|
$(B)/missionpack/cgame/cg_consolecmds.o \
|
||||||
$(B)/missionpack/cgame/cg_newdraw.o \
|
$(B)/missionpack/cgame/cg_newdraw.o \
|
||||||
$(B)/missionpack/cgame/cg_draw.o \
|
$(B)/missionpack/cgame/cg_draw.o \
|
||||||
|
@ -1419,7 +1421,7 @@ MPCGOBJ_ = \
|
||||||
$(B)/missionpack/qcommon/q_shared.o
|
$(B)/missionpack/qcommon/q_shared.o
|
||||||
|
|
||||||
MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o
|
MPCGOBJ = $(MPCGOBJ_) $(B)/missionpack/cgame/cg_syscalls.o
|
||||||
MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
|
MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm)
|
||||||
|
|
||||||
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT): $(MPCGOBJ)
|
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT): $(MPCGOBJ)
|
||||||
$(echo_cmd) "LD $@"
|
$(echo_cmd) "LD $@"
|
||||||
|
@ -1447,6 +1449,7 @@ Q3GOBJ_ = \
|
||||||
$(B)/baseq3/game/bg_misc.o \
|
$(B)/baseq3/game/bg_misc.o \
|
||||||
$(B)/baseq3/game/bg_pmove.o \
|
$(B)/baseq3/game/bg_pmove.o \
|
||||||
$(B)/baseq3/game/bg_slidemove.o \
|
$(B)/baseq3/game/bg_slidemove.o \
|
||||||
|
$(B)/baseq3/game/bg_lib.o \
|
||||||
$(B)/baseq3/game/g_active.o \
|
$(B)/baseq3/game/g_active.o \
|
||||||
$(B)/baseq3/game/g_arenas.o \
|
$(B)/baseq3/game/g_arenas.o \
|
||||||
$(B)/baseq3/game/g_bot.o \
|
$(B)/baseq3/game/g_bot.o \
|
||||||
|
@ -1471,7 +1474,7 @@ Q3GOBJ_ = \
|
||||||
$(B)/baseq3/qcommon/q_shared.o
|
$(B)/baseq3/qcommon/q_shared.o
|
||||||
|
|
||||||
Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
|
Q3GOBJ = $(Q3GOBJ_) $(B)/baseq3/game/g_syscalls.o
|
||||||
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm)
|
||||||
|
|
||||||
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT): $(Q3GOBJ)
|
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT): $(Q3GOBJ)
|
||||||
$(echo_cmd) "LD $@"
|
$(echo_cmd) "LD $@"
|
||||||
|
@ -1497,6 +1500,7 @@ MPGOBJ_ = \
|
||||||
$(B)/missionpack/game/bg_misc.o \
|
$(B)/missionpack/game/bg_misc.o \
|
||||||
$(B)/missionpack/game/bg_pmove.o \
|
$(B)/missionpack/game/bg_pmove.o \
|
||||||
$(B)/missionpack/game/bg_slidemove.o \
|
$(B)/missionpack/game/bg_slidemove.o \
|
||||||
|
$(B)/missionpack/game/bg_lib.o \
|
||||||
$(B)/missionpack/game/g_active.o \
|
$(B)/missionpack/game/g_active.o \
|
||||||
$(B)/missionpack/game/g_arenas.o \
|
$(B)/missionpack/game/g_arenas.o \
|
||||||
$(B)/missionpack/game/g_bot.o \
|
$(B)/missionpack/game/g_bot.o \
|
||||||
|
@ -1521,7 +1525,7 @@ MPGOBJ_ = \
|
||||||
$(B)/missionpack/qcommon/q_shared.o
|
$(B)/missionpack/qcommon/q_shared.o
|
||||||
|
|
||||||
MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o
|
MPGOBJ = $(MPGOBJ_) $(B)/missionpack/game/g_syscalls.o
|
||||||
MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
|
MPGVMOBJ = $(MPGOBJ_:%.o=%.asm)
|
||||||
|
|
||||||
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT): $(MPGOBJ)
|
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT): $(MPGOBJ)
|
||||||
$(echo_cmd) "LD $@"
|
$(echo_cmd) "LD $@"
|
||||||
|
@ -1540,6 +1544,7 @@ $(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm $(Q3ASM)
|
||||||
Q3UIOBJ_ = \
|
Q3UIOBJ_ = \
|
||||||
$(B)/baseq3/ui/ui_main.o \
|
$(B)/baseq3/ui/ui_main.o \
|
||||||
$(B)/baseq3/game/bg_misc.o \
|
$(B)/baseq3/game/bg_misc.o \
|
||||||
|
$(B)/baseq3/game/bg_lib.o \
|
||||||
$(B)/baseq3/ui/ui_addbots.o \
|
$(B)/baseq3/ui/ui_addbots.o \
|
||||||
$(B)/baseq3/ui/ui_atoms.o \
|
$(B)/baseq3/ui/ui_atoms.o \
|
||||||
$(B)/baseq3/ui/ui_cdkey.o \
|
$(B)/baseq3/ui/ui_cdkey.o \
|
||||||
|
@ -1583,7 +1588,7 @@ Q3UIOBJ_ = \
|
||||||
$(B)/baseq3/qcommon/q_shared.o
|
$(B)/baseq3/qcommon/q_shared.o
|
||||||
|
|
||||||
Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
|
Q3UIOBJ = $(Q3UIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
|
||||||
Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm)
|
||||||
|
|
||||||
$(B)/baseq3/ui$(ARCH).$(SHLIBEXT): $(Q3UIOBJ)
|
$(B)/baseq3/ui$(ARCH).$(SHLIBEXT): $(Q3UIOBJ)
|
||||||
$(echo_cmd) "LD $@"
|
$(echo_cmd) "LD $@"
|
||||||
|
@ -1605,12 +1610,13 @@ MPUIOBJ_ = \
|
||||||
$(B)/missionpack/ui/ui_shared.o \
|
$(B)/missionpack/ui/ui_shared.o \
|
||||||
\
|
\
|
||||||
$(B)/missionpack/game/bg_misc.o \
|
$(B)/missionpack/game/bg_misc.o \
|
||||||
|
$(B)/missionpack/game/bg_lib.o \
|
||||||
\
|
\
|
||||||
$(B)/missionpack/qcommon/q_math.o \
|
$(B)/missionpack/qcommon/q_math.o \
|
||||||
$(B)/missionpack/qcommon/q_shared.o
|
$(B)/missionpack/qcommon/q_shared.o
|
||||||
|
|
||||||
MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
|
MPUIOBJ = $(MPUIOBJ_) $(B)/missionpack/ui/ui_syscalls.o
|
||||||
MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
|
MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm)
|
||||||
|
|
||||||
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT): $(MPUIOBJ)
|
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT): $(MPUIOBJ)
|
||||||
$(echo_cmd) "LD $@"
|
$(echo_cmd) "LD $@"
|
||||||
|
|
|
@ -20,11 +20,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
===========================================================================
|
===========================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if USE_CURL
|
#ifdef USE_CURL
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
cvar_t *cl_cURLLib;
|
cvar_t *cl_cURLLib;
|
||||||
|
|
||||||
#if USE_CURL_DLOPEN
|
#ifdef USE_CURL_DLOPEN
|
||||||
#include "../sys/sys_loadlib.h"
|
#include "../sys/sys_loadlib.h"
|
||||||
|
|
||||||
char* (*qcurl_version)(void);
|
char* (*qcurl_version)(void);
|
||||||
|
@ -88,7 +88,7 @@ CL_cURL_Init
|
||||||
*/
|
*/
|
||||||
qboolean CL_cURL_Init()
|
qboolean CL_cURL_Init()
|
||||||
{
|
{
|
||||||
#if USE_CURL_DLOPEN
|
#ifdef USE_CURL_DLOPEN
|
||||||
if(cURLLib)
|
if(cURLLib)
|
||||||
return qtrue;
|
return qtrue;
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ CL_cURL_Shutdown
|
||||||
void CL_cURL_Shutdown( void )
|
void CL_cURL_Shutdown( void )
|
||||||
{
|
{
|
||||||
CL_cURL_Cleanup();
|
CL_cURL_Cleanup();
|
||||||
#if USE_CURL_DLOPEN
|
#ifdef USE_CURL_DLOPEN
|
||||||
if(cURLLib)
|
if(cURLLib)
|
||||||
{
|
{
|
||||||
Sys_UnloadLibrary(cURLLib);
|
Sys_UnloadLibrary(cURLLib);
|
||||||
|
|
|
@ -37,14 +37,14 @@ extern cvar_t *cl_cURLLib;
|
||||||
#define DEFAULT_CURL_LIB "libcurl.so.3"
|
#define DEFAULT_CURL_LIB "libcurl.so.3"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_LOCAL_HEADERS
|
#ifdef USE_LOCAL_HEADERS
|
||||||
#include "../libcurl/curl/curl.h"
|
#include "../libcurl/curl/curl.h"
|
||||||
#else
|
#else
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if USE_CURL_DLOPEN
|
#ifdef USE_CURL_DLOPEN
|
||||||
extern char* (*qcurl_version)(void);
|
extern char* (*qcurl_version)(void);
|
||||||
|
|
||||||
extern CURL* (*qcurl_easy_init)(void);
|
extern CURL* (*qcurl_easy_init)(void);
|
||||||
|
|
|
@ -689,7 +689,7 @@ CL_ShutdownAll
|
||||||
*/
|
*/
|
||||||
void CL_ShutdownAll(void) {
|
void CL_ShutdownAll(void) {
|
||||||
|
|
||||||
#if USE_CURL
|
#ifdef USE_CURL
|
||||||
CL_cURL_Shutdown();
|
CL_cURL_Shutdown();
|
||||||
#endif
|
#endif
|
||||||
// clear sounds
|
// clear sounds
|
||||||
|
@ -1451,7 +1451,7 @@ Called when all downloading has been completed
|
||||||
*/
|
*/
|
||||||
void CL_DownloadsComplete( void ) {
|
void CL_DownloadsComplete( void ) {
|
||||||
|
|
||||||
#if USE_CURL
|
#ifdef USE_CURL
|
||||||
// if we downloaded with cURL
|
// if we downloaded with cURL
|
||||||
if(clc.cURLUsed) {
|
if(clc.cURLUsed) {
|
||||||
clc.cURLUsed = qfalse;
|
clc.cURLUsed = qfalse;
|
||||||
|
@ -1579,7 +1579,7 @@ void CL_NextDownload(void) {
|
||||||
*s++ = 0;
|
*s++ = 0;
|
||||||
else
|
else
|
||||||
s = localName + strlen(localName); // point at the nul byte
|
s = localName + strlen(localName); // point at the nul byte
|
||||||
#if USE_CURL
|
#ifdef USE_CURL
|
||||||
if(!(cl_allowDownload->integer & DLF_NO_REDIRECT)) {
|
if(!(cl_allowDownload->integer & DLF_NO_REDIRECT)) {
|
||||||
if(clc.sv_allowDownload & DLF_NO_REDIRECT) {
|
if(clc.sv_allowDownload & DLF_NO_REDIRECT) {
|
||||||
Com_Printf("WARNING: server does not "
|
Com_Printf("WARNING: server does not "
|
||||||
|
@ -2205,7 +2205,7 @@ void CL_Frame ( int msec ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_CURL
|
#ifdef USE_CURL
|
||||||
if(clc.downloadCURLM) {
|
if(clc.downloadCURLM) {
|
||||||
CL_cURL_PerformDownload();
|
CL_cURL_PerformDownload();
|
||||||
// we can't process frames normally when in disconnected
|
// we can't process frames normally when in disconnected
|
||||||
|
@ -2698,7 +2698,7 @@ void CL_Init( void ) {
|
||||||
cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
|
cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
|
||||||
|
|
||||||
cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE);
|
cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE);
|
||||||
#if USE_CURL
|
#ifdef USE_CURL
|
||||||
cl_cURLLib = Cvar_Get("cl_cURLLib", DEFAULT_CURL_LIB, CVAR_ARCHIVE);
|
cl_cURLLib = Cvar_Get("cl_cURLLib", DEFAULT_CURL_LIB, CVAR_ARCHIVE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#include "../cgame/cg_public.h"
|
#include "../cgame/cg_public.h"
|
||||||
#include "../game/bg_public.h"
|
#include "../game/bg_public.h"
|
||||||
|
|
||||||
#if USE_CURL
|
#ifdef USE_CURL
|
||||||
#include "cl_curl.h"
|
#include "cl_curl.h"
|
||||||
#endif /* USE_CURL */
|
#endif /* USE_CURL */
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
// Dynamically loads OpenAL
|
// Dynamically loads OpenAL
|
||||||
|
|
||||||
#if USE_OPENAL
|
#ifdef USE_OPENAL
|
||||||
|
|
||||||
#include "qal.h"
|
#include "qal.h"
|
||||||
|
|
||||||
#if USE_OPENAL_DLOPEN
|
#ifdef USE_OPENAL_DLOPEN
|
||||||
|
|
||||||
#include "../sys/sys_loadlib.h"
|
#include "../sys/sys_loadlib.h"
|
||||||
|
|
||||||
|
|
|
@ -28,12 +28,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#include "../qcommon/q_shared.h"
|
#include "../qcommon/q_shared.h"
|
||||||
#include "../qcommon/qcommon.h"
|
#include "../qcommon/qcommon.h"
|
||||||
|
|
||||||
#if USE_OPENAL_DLOPEN
|
#ifdef USE_OPENAL_DLOPEN
|
||||||
#define AL_NO_PROTOTYPES
|
#define AL_NO_PROTOTYPES
|
||||||
#define ALC_NO_PROTOTYPES
|
#define ALC_NO_PROTOTYPES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_LOCAL_HEADERS
|
#ifdef USE_LOCAL_HEADERS
|
||||||
#include "../AL/al.h"
|
#include "../AL/al.h"
|
||||||
#include "../AL/alc.h"
|
#include "../AL/alc.h"
|
||||||
#else
|
#else
|
||||||
|
@ -47,7 +47,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_OPENAL_DLOPEN
|
#ifdef USE_OPENAL_DLOPEN
|
||||||
extern LPALENABLE qalEnable;
|
extern LPALENABLE qalEnable;
|
||||||
extern LPALDISABLE qalDisable;
|
extern LPALDISABLE qalDisable;
|
||||||
extern LPALISENABLED qalIsEnabled;
|
extern LPALISENABLED qalIsEnabled;
|
||||||
|
|
|
@ -102,7 +102,7 @@ void S_CodecInit()
|
||||||
{
|
{
|
||||||
codecs = NULL;
|
codecs = NULL;
|
||||||
S_CodecRegister(&wav_codec);
|
S_CodecRegister(&wav_codec);
|
||||||
#if USE_CODEC_VORBIS
|
#ifdef USE_CODEC_VORBIS
|
||||||
S_CodecRegister(&ogg_codec);
|
S_CodecRegister(&ogg_codec);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// OGG support is enabled by this define
|
// OGG support is enabled by this define
|
||||||
#if USE_CODEC_VORBIS
|
#ifdef USE_CODEC_VORBIS
|
||||||
|
|
||||||
// includes for the Q3 sound system
|
// includes for the Q3 sound system
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
|
@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#include "snd_codec.h"
|
#include "snd_codec.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
#if USE_OPENAL
|
#ifdef USE_OPENAL
|
||||||
|
|
||||||
#include "qal.h"
|
#include "qal.h"
|
||||||
|
|
||||||
|
@ -1864,7 +1864,7 @@ S_AL_Init
|
||||||
*/
|
*/
|
||||||
qboolean S_AL_Init( soundInterface_t *si )
|
qboolean S_AL_Init( soundInterface_t *si )
|
||||||
{
|
{
|
||||||
#if USE_OPENAL
|
#ifdef USE_OPENAL
|
||||||
|
|
||||||
qboolean enumsupport, founddev = qfalse;
|
qboolean enumsupport, founddev = qfalse;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
// bg_lib,c -- standard C library replacement routines used by code
|
// bg_lib,c -- standard C library replacement routines used by code
|
||||||
// compiled for the virtual machine
|
// compiled for the virtual machine
|
||||||
|
|
||||||
|
#ifdef Q3_VM
|
||||||
|
|
||||||
#include "../qcommon/q_shared.h"
|
#include "../qcommon/q_shared.h"
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
|
@ -43,10 +45,6 @@ static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93";
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#if !defined( Q3_VM )
|
|
||||||
typedef int cmp_t(const void *, const void *);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static char* med3(char *, char *, char *, cmp_t *);
|
static char* med3(char *, char *, char *, cmp_t *);
|
||||||
static void swapfunc(char *, char *, int, int);
|
static void swapfunc(char *, char *, int, int);
|
||||||
|
|
||||||
|
@ -186,10 +184,6 @@ loop: SWAPINIT(a, es);
|
||||||
|
|
||||||
//==================================================================================
|
//==================================================================================
|
||||||
|
|
||||||
|
|
||||||
// this file is excluded from release builds because of intrinsics
|
|
||||||
#if defined ( Q3_VM )
|
|
||||||
|
|
||||||
size_t strlen( const char *string ) {
|
size_t strlen( const char *string ) {
|
||||||
const char *s;
|
const char *s;
|
||||||
|
|
||||||
|
@ -262,9 +256,7 @@ char *strstr( const char *string, const char *strCharSet ) {
|
||||||
}
|
}
|
||||||
return (char *)0;
|
return (char *)0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined ( Q3_VM )
|
|
||||||
int tolower( int c ) {
|
int tolower( int c ) {
|
||||||
if ( c >= 'A' && c <= 'Z' ) {
|
if ( c >= 'A' && c <= 'Z' ) {
|
||||||
c += 'a' - 'A';
|
c += 'a' - 'A';
|
||||||
|
@ -280,9 +272,6 @@ int toupper( int c ) {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
//#ifndef _MSC_VER
|
|
||||||
|
|
||||||
void *memmove( void *dest, const void *src, size_t count ) {
|
void *memmove( void *dest, const void *src, size_t count ) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -750,11 +739,9 @@ double atan2( double y, double x ) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q3_VM
|
|
||||||
double tan( double x ) {
|
double tan( double x ) {
|
||||||
return sin(x) / cos(x);
|
return sin(x) / cos(x);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static int randSeed = 0;
|
static int randSeed = 0;
|
||||||
|
@ -904,7 +891,6 @@ double _atof( const char **stringPtr ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if defined ( Q3_VM )
|
|
||||||
int atoi( const char *string ) {
|
int atoi( const char *string ) {
|
||||||
int sign;
|
int sign;
|
||||||
int value;
|
int value;
|
||||||
|
@ -1248,11 +1234,7 @@ reswitch:
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
AddFloat( &buf_p, *(double *)arg, width, prec );
|
AddFloat( &buf_p, *(double *)arg, width, prec );
|
||||||
#ifdef Q3_VM
|
arg += 1; // everything is 32 bit
|
||||||
arg += 1; // everything is 32 bit in my compiler
|
|
||||||
#else
|
|
||||||
arg += 2;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
AddString( &buf_p, (char *)*arg, width, prec );
|
AddString( &buf_p, (char *)*arg, width, prec );
|
||||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
// compiled for the virtual machine
|
// compiled for the virtual machine
|
||||||
|
|
||||||
// This file is NOT included on native builds
|
// This file is NOT included on native builds
|
||||||
#ifndef BG_LIB_H
|
#if !defined( BG_LIB_H ) && defined( Q3_VM )
|
||||||
#define BG_LIB_H
|
#define BG_LIB_H
|
||||||
|
|
||||||
//Ignore __attribute__ on non-gcc platforms
|
//Ignore __attribute__ on non-gcc platforms
|
||||||
|
|
|
@ -92,11 +92,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#ifdef Q3_VM
|
|
||||||
|
|
||||||
#include "../game/bg_lib.h"
|
#include "../game/bg_lib.h"
|
||||||
|
|
||||||
#else
|
#ifndef Q3_VM
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
Loading…
Reference in a new issue