fix misc warnings.
add support for q3's shader remapping feature. don't mask sky depth on q3bsp. apparently it causes problems. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4609 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d502211d75
commit
fd70ec0c62
37 changed files with 202 additions and 159 deletions
|
@ -51,7 +51,7 @@ NATIVE_DEBUG_DIR?=$(DEBUG_DIR)
|
|||
|
||||
|
||||
#correct the gcc build when cross compiling
|
||||
ifeq ($(FTE_TARGET),win32)
|
||||
ifneq (,$(findstring win32,$(FTE_TARGET)))
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep mingw),)
|
||||
#CC didn't state that it was mingw... so try fixing that up
|
||||
#old/original mingw project, headers are not very up to date.
|
||||
|
@ -74,7 +74,7 @@ ifeq ($(FTE_TARGET),win32)
|
|||
endif
|
||||
|
||||
#correct the gcc build when cross compiling
|
||||
ifeq ($(FTE_TARGET),win64)
|
||||
ifneq (,$(findstring win64,$(FTE_TARGET)))
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep mingw),)
|
||||
#CC didn't state that it was mingw... so try fixing that up
|
||||
ifneq ($(shell which x86_64-w64-mingw32-gcc 2> /dev/null),)
|
||||
|
@ -152,38 +152,11 @@ ifeq ($(FTE_TARGET),droid)
|
|||
DO_LD=$(DO_ECHO) $(CC) -Wl,-soname,libftedroid.so -shared -Wl,--no-undefined -Wl,-z,noexecstack --sysroot=$(ANDROID_NDK_ROOT)/platforms/android-$(DROID_API_LEVEL)/$(DROID_PLAT_INC) -L$(NDK_PATH)/platforms/android-$(DROID_API_LEVEL)/$(DROID_PLAT_INC)/usr/lib -o $@ $(LTO_LD) $(WCFLAGS) $(CFLAGS) -llog -lc -lz -lm
|
||||
endif
|
||||
|
||||
#correct the gcc build when cross compiling
|
||||
ifeq ($(FTE_TARGET),win32_SDL)
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep mingw),)
|
||||
#CC didn't state that it was mingw... so try fixing that up
|
||||
ifneq ($(shell which i586-mingw32msvc-gcc 2> /dev/null),)
|
||||
#yup, the alternative exists (this matches the one debian has)
|
||||
CC=i586-mingw32msvc-gcc
|
||||
WINDRES=i586-mingw32msvc-windres
|
||||
STRIP=i586-mingw32msvc-strip
|
||||
# BITS=32
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(FTE_TARGET),win64_sdl)
|
||||
FTE_TARGET=win64_SDL
|
||||
endif
|
||||
|
||||
#correct the gcc build when cross compiling
|
||||
ifeq ($(FTE_TARGET),win64_SDL)
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep mingw),)
|
||||
#CC didn't state that it was mingw... so try fixing that up
|
||||
ifneq ($(shell which amd64-mingw32msvc-gcc 2> /dev/null),)
|
||||
#yup, the alternative exists (this matches the one debian has)
|
||||
CC=amd64-mingw32msvc-gcc -m64
|
||||
WINDRES=amd64-mingw32msvc-windres
|
||||
STRIP=amd64-mingw32msvc-strip
|
||||
# BITS=64
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#crosscompile macosx from linux, default target ppc 32bit
|
||||
ifeq ($(FTE_TARGET),macosx)
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep apple),)
|
||||
|
@ -300,7 +273,7 @@ PROGS_DIR=$(BASE_DIR)/qclib
|
|||
NACL_DIR=$(BASE_DIR)/nacl
|
||||
BOTLIB_DIR=$(BASE_DIR)/botlib
|
||||
|
||||
ALL_CFLAGS=$(HAVECONFIG) $(VISIBILITY_FLAGS) $(CFLAGS) $(BASE_CFLAGS) $(WCFLAGS)
|
||||
ALL_CFLAGS=$(HAVECONFIG) $(VISIBILITY_FLAGS) $(CFLAGS) $(BASE_CFLAGS) $(WCFLAGS) $(ARCH_CFLAGS)
|
||||
|
||||
#cheap compile-everything-in-one-unit (compile becomes preprocess only)
|
||||
ifneq ($(WPO),)
|
||||
|
@ -344,7 +317,7 @@ ifeq ($(FTE_TARGET),macosx)
|
|||
endif
|
||||
BASELDFLAGS ?= -lm -ldl -lpthread
|
||||
|
||||
ifeq ($(shell echo $(FTE_TARGET)|grep -v win),)
|
||||
ifneq (,$(findstring win,$(FTE_TARGET)))
|
||||
BASELDFLAGS=-lm
|
||||
MINGW_LIBS_DIR=$(LIBS_DIR)/mingw-libs
|
||||
|
||||
|
@ -797,18 +770,19 @@ ifeq ($(FTE_TARGET),nacl)
|
|||
endif
|
||||
|
||||
#FTE_TARGET=win32_SDL | FTE_TARGET=win64_SDL (MinGW32 + SDL | MinGW64 + SDL)
|
||||
ifeq ($(shell echo $(FTE_TARGET)|grep -E -i -v "win(32|64)_sdl$$"),)
|
||||
ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
|
||||
LIBS_DIR=./libs
|
||||
|
||||
ifeq ($(shell echo $(FTE_TARGET)|grep -i -v "win64_sdl"),)
|
||||
|
||||
ifneq (,$(findstring win64,$(FTE_TARGET)))
|
||||
BITS=64
|
||||
endif
|
||||
|
||||
EXEPOSTFIX=.exe
|
||||
|
||||
CC_MACHINE:=$(shell $(CC) -dumpmachine)
|
||||
HAXX:= $(shell test -f libs/SDL2-2.0.1/$(CC_MACHINE)/bin/sdl2-config || (wget http://www.libsdl.org/release/SDL2-devel-2.0.1-mingw.tar.gz && cd $(BASE_DIR)/libs && tar -xvzf ../SDL2-devel-2.0.1-mingw.tar.gz && rm ../SDL2-devel-2.0.1-mingw.tar.gz))
|
||||
SDLCONFIG=$(BASE_DIR)/libs/SDL2-2.0.1/$(CC_MACHINE)/bin/sdl2-config --prefix=$(BASE_DIR)/libs/SDL2-2.0.1/$(CC_MACHINE)
|
||||
ARCH_PREDEP=$(BASE_DIR)/libs/SDL2-2.0.1/$(CC_MACHINE)/bin/sdl2-config
|
||||
SDLCONFIG=$(ARCH_PREDEP) --prefix=$(BASE_DIR)/libs/SDL2-2.0.1/$(CC_MACHINE)
|
||||
ARCH_CFLAGS=`$(SDLCONFIG) --cflags`
|
||||
|
||||
#the defaults for sdl come first
|
||||
GLCL_OBJS=$(GL_OBJS) $(D3DGL_OBJS) $(GLQUAKE_OBJS) $(BOTLIB_OBJS) $(SPEEX_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(LTO_END) resources.o $(LTO_START)
|
||||
|
@ -820,7 +794,7 @@ ifeq ($(shell echo $(FTE_TARGET)|grep -E -i -v "win(32|64)_sdl$$"),)
|
|||
GL_LDFLAGS=$(IMAGELDFLAGS) $(OGGVORBISLDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32 $(GLLDFLAGS) `$(SDLCONFIG) --libs`
|
||||
endif
|
||||
|
||||
GL_CFLAGS=-DFTE_SDL -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) -I$(LIBS_DIR) $(GLCFLAGS) -DLIBVORBISFILE_STATIC `$(SDLCONFIG) --cflags` $(DX7SDK) $(SPEEXCFLAGS)
|
||||
GL_CFLAGS=-DFTE_SDL -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) -I$(LIBS_DIR) $(GLCFLAGS) -DLIBVORBISFILE_STATIC $(DX7SDK) $(SPEEXCFLAGS)
|
||||
ifeq ($(shell echo $(FTE_TARGET)|grep -E -i -v "win32.*sdl"),)
|
||||
GL_CFLAGS+= -D_MINGW_VFPRINTF
|
||||
endif
|
||||
|
@ -839,7 +813,7 @@ ifeq ($(shell echo $(FTE_TARGET)|grep -E -i -v "win(32|64)_sdl$$"),)
|
|||
MB_DIR=m_mgw_sdl$(BITS)
|
||||
M_EXE_NAME=../fteqw_sdl$(BITS)$(EXEPOSTFIX)
|
||||
MCL_OBJS=$(D3DGL_OBJS) $(GLQUAKE_OBJS) $(SOFTWARE_OBJS) $(D3DQUAKE_OBJS) $(BOTLIB_OBJS) $(SPEEX_OBJS) gl_vidsdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o snd_directx.o $(LTO_END) resources.o $(LTO_START)
|
||||
M_CFLAGS=$(D3DCFLAGS) -DFTE_SDL -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) $(GLCFLAGS) -DLIBVORBISFILE_STATIC `$(SDL_CONFIG) --cflags` -D_MERGED_SDL $(DX7SDK) $(SPEEXCFLAGS)
|
||||
M_CFLAGS=$(D3DCFLAGS) -DFTE_SDL -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) $(GLCFLAGS) -DLIBVORBISFILE_STATIC -D_MERGED_SDL $(DX7SDK) $(SPEEXCFLAGS)
|
||||
|
||||
ifeq ($(shell echo $(FTE_TARGET)|grep -E -i -v "win32.*sdl"),)
|
||||
M_CFLAGS+= -D_MINGW_VFPRINTF
|
||||
|
@ -858,7 +832,7 @@ ifeq ($(shell echo $(FTE_TARGET)|grep -E -i -v "win(32|64)_sdl$$"),)
|
|||
D3D_EXE_NAME=../fted3d_sdl_qw$(BITS)$(EXEPOSTFIX)
|
||||
D3DCL_EXE_NAME=../fted3d_sdl_clqw$(BITS)$(EXEPOSTFIX)
|
||||
D3D_LDFLAGS=$(IMAGELDFLAGS) $(OGGVORBISLDFLAGS) -lws2_32 -lmingw32 $(SDL_LDFLAGS) -mwindows -ldxguid -lwinmm -lole32
|
||||
D3D_CFLAGS=$(D3DCFLAGS) -DFTE_SDL -DNO_XFLIP -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) -DLIBVORBISFILE_STATIC `$(SDL_CONFIG) --cflags` $(DX7SDK) $(SPEEXCFLAGS)
|
||||
D3D_CFLAGS=$(D3DCFLAGS) -DFTE_SDL -DNO_XFLIP -I$(LIBS_DIR) -I$(MINGW_LIBS_DIR)/ -I$(MINGW_LIBS_DIR) -DLIBVORBISFILE_STATIC $(DX7SDK) $(SPEEXCFLAGS)
|
||||
ifeq ($(shell echo $(FTE_TARGET)|grep -E -i -v "win32.*sdl"),)
|
||||
D3D_CFLAGS+= -D_MINGW_VFPRINTF
|
||||
endif
|
||||
|
@ -944,7 +918,7 @@ ifeq ($(FTE_TARGET),vc)
|
|||
endif
|
||||
|
||||
#FTE_TARGET=win32 | FTE_TARGET=win64 (MinGW32 | MinGW64)
|
||||
ifeq ($(shell echo $(FTE_TARGET)|grep -E -v "win(32|64)$$"),)
|
||||
ifeq (win,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
|
||||
# The extra object file called resources.o is specific for MinGW to link the icon in
|
||||
|
||||
#cygwin's gcc requires an extra command to use mingw instead of cygwin (default paths, etc).
|
||||
|
@ -1275,11 +1249,11 @@ endif
|
|||
|
||||
# This is for linking the FTE icon to the MinGW target
|
||||
$(OUT_DIR)/resources.o : winquake.rc
|
||||
$(WINDRES) -I$(CLIENT_DIR) -O coff $< $@
|
||||
@$(WINDRES) -I$(CLIENT_DIR) -O coff $< $@
|
||||
|
||||
#npAPI stuff requires some extra resources
|
||||
$(OUT_DIR)/npplug.o : ftequake/npplug.rc
|
||||
$(WINDRES) -I$(CLIENT_DIR) -O coff $< $@
|
||||
@$(WINDRES) -I$(CLIENT_DIR) -O coff $< $@
|
||||
|
||||
|
||||
#$(OUT_DIR)/%.d: %.c
|
||||
|
@ -1341,14 +1315,14 @@ DO_LD ?= $(CC) -o $@ $(LTO_LD) $(WCFLAGS) $(CFLAGS)
|
|||
$(OUT_DIR)/$(EXE_NAME): $(PRECOMPHEADERS) $(foreach fn, $(CUSTOMOBJS) $(foreach ol, $(OBJS), $($(ol))),$(if $(findstring ltox,$(fn)),,$(OUT_DIR)/$(fn)))
|
||||
$(DO_LD) $(foreach fn, $(CUSTOMOBJS) $(foreach ol, $(OBJS) $(LTO_END), $($(ol))),$(if $(findstring ltox,$(fn)),$(subst ltox,-x ,$(fn)),$(NATIVE_OUT_DIR)/$(fn)) ) $(LDFLAGS)
|
||||
|
||||
_out-rel:
|
||||
_out-rel: $(ARCH_PREDEP)
|
||||
@$(MAKE) $(OUT_DIR)/$(EXE_NAME) EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(WCFLAGS) $(RELEASE_CFLAGS)" LDFLAGS="$(BASELDFLAGS) $(LDFLAGS) $(RELEASE_LDFLAGS)" OBJS="$(OBJS)"
|
||||
$(STRIP) $(STRIPFLAGS) $(OUT_DIR)/$(EXE_NAME)
|
||||
|
||||
_out-dbg:
|
||||
_out-dbg: $(ARCH_PREDEP)
|
||||
@$(MAKE) $(OUT_DIR)/$(EXE_NAME) EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(WCFLAGS) $(DEBUG_CFLAGS)" LDFLAGS="$(BASELDFLAGS) $(LDFLAGS) $(DEBUG_LDFLAGS)" OBJS="$(OBJS)"
|
||||
|
||||
_out-profile:
|
||||
_out-profile: $(ARCH_PREDEP)
|
||||
@$(MAKE) $(OUT_DIR)/$(EXE_NAME) EXE_NAME="$(EXE_NAME)" OUT_DIR="$(OUT_DIR)" WCFLAGS="$(WCFLAGS) $(PROFILE_CFLAGS)" LDFLAGS="$(BASELDFLAGS) $(LDFLAGS) $(PROFILE_LDFLAGS)" OBJS="$(OBJS)"
|
||||
|
||||
_cl-rel: reldir
|
||||
|
@ -1671,6 +1645,12 @@ droid-help:
|
|||
@-echo
|
||||
@-echo "Note that 'make droid-rel' will automatically generate a keystore. If you forget the password, just do a 'make dist-clean'."
|
||||
|
||||
$(BASE_DIR)/libs/SDL2-2.0.1/i686-w64-mingw32/bin/sdl2-config:
|
||||
wget http://www.libsdl.org/release/SDL2-devel-2.0.1-mingw.tar.gz -O $(BASE_DIR)/sdl2.tar.gz
|
||||
cd $(BASE_DIR)/libs && tar -xvzf $(BASE_DIR)/sdl2.tar.gz
|
||||
rm $(BASE_DIR)/sdl2.tar.gz
|
||||
$(BASE_DIR)/libs/SDL2-2.0.1/x86_64-w64-mingw32/bin/sdl2-config: $(BASE_DIR)/libs/SDL2-2.0.1/i686-w64-mingw32/bin/sdl2-config
|
||||
|
||||
makelibs:
|
||||
ifndef ARCH
|
||||
$(MAKE) makelibs ARCH=$(shell $(CC) -dumpmachine)
|
||||
|
|
|
@ -445,7 +445,6 @@ int CG_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projecti
|
|||
|
||||
int VM_LerpTag(void *out, model_t *model, int f1, int f2, float l2, char *tagname);
|
||||
|
||||
|
||||
#define VALIDATEPOINTER(o,l) if ((int)o + l >= mask || VM_POINTER(o) < offset) Host_EndGame("Call to cgame trap %u passes invalid pointer\n", (unsigned int)fn); //out of bounds.
|
||||
|
||||
static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, const qintptr_t *arg)
|
||||
|
@ -1036,12 +1035,7 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
|
|||
break;
|
||||
|
||||
case CG_R_REMAP_SHADER:
|
||||
{
|
||||
// char *dst = VM_POINTER(arg[0]);
|
||||
// char *src = VM_POINTER(arg[1]);
|
||||
// float timeoffset = VM_FLOAT(arg[2]);
|
||||
Con_DPrintf("CG_R_REMAP_SHADER: not implemented\n");
|
||||
}
|
||||
R_RemapShader(VM_POINTER(arg[0]), VM_POINTER(arg[1]), VM_FLOAT(arg[2]));
|
||||
break;
|
||||
|
||||
case CG_R_REGISTERFONT:
|
||||
|
|
|
@ -4272,7 +4272,6 @@ double Host_Frame (double time)
|
|||
|
||||
if (SCR_UpdateScreen && !vid.isminimized)
|
||||
{
|
||||
extern mleaf_t *r_viewleaf;
|
||||
extern cvar_t scr_chatmodecvar;
|
||||
|
||||
if (scr_chatmodecvar.ival && !cl.intermission)
|
||||
|
|
|
@ -3303,7 +3303,6 @@ void CL_ParseModellist (qboolean lots)
|
|||
int nummodels;
|
||||
char *str;
|
||||
int n;
|
||||
int vwplayerindex = -1;
|
||||
|
||||
// precache models and note certain default indexes
|
||||
if (lots)
|
||||
|
|
|
@ -135,7 +135,7 @@ qintptr_t VARGS Plug_Draw_LoadImageData(void *offset, quintptr_t mask, const qin
|
|||
{
|
||||
qintptr_t ret = 0;
|
||||
char *name = VM_POINTER(arg[0]);
|
||||
char *mimetype = VM_POINTER(arg[1]);
|
||||
// char *mimetype = VM_POINTER(arg[1]);
|
||||
void *codeddata = VM_POINTER(arg[2]);
|
||||
unsigned int datalength = VM_LONG(arg[3]);
|
||||
texid_t t;
|
||||
|
|
|
@ -802,7 +802,7 @@ void CL_PredictMovePNum (int seat)
|
|||
int fromframe, toframe;
|
||||
outframe_t *backdate;
|
||||
player_state_t *fromstate, *tostate, framebuf[2]; //need two framebufs so we can interpolate between two states.
|
||||
usercmd_t *cmdfrom, *cmdto;
|
||||
usercmd_t *cmdto;
|
||||
double fromtime, totime;
|
||||
int oldphysent;
|
||||
double simtime;
|
||||
|
@ -811,9 +811,6 @@ void CL_PredictMovePNum (int seat)
|
|||
qboolean nopred;
|
||||
|
||||
//these are to make svc_viewentity work better
|
||||
float *vel;
|
||||
float *org;
|
||||
float stepheight = 0;
|
||||
float netfps = cl_netfps.value;
|
||||
|
||||
if (!netfps)
|
||||
|
@ -1028,9 +1025,6 @@ void CL_PredictMovePNum (int seat)
|
|||
le = &cl.lerpents[pv->viewentity];
|
||||
}
|
||||
|
||||
vel = fromstate->velocity;
|
||||
org = fromstate->origin;
|
||||
|
||||
// predict forward until cl.time <= to->senttime
|
||||
oldphysent = pmove.numphysent;
|
||||
CL_SetSolidPlayers();
|
||||
|
@ -1039,7 +1033,7 @@ void CL_PredictMovePNum (int seat)
|
|||
//just in case we don't run any prediction
|
||||
VectorCopy(tostate->gravitydir, pmove.gravitydir);
|
||||
|
||||
cmdfrom = cmdto = &cl.outframes[cl.ackedmovesequence & UPDATE_MASK].cmd[seat];
|
||||
cmdto = &cl.outframes[cl.ackedmovesequence & UPDATE_MASK].cmd[seat];
|
||||
|
||||
if (!nopred)
|
||||
{
|
||||
|
@ -1066,7 +1060,6 @@ void CL_PredictMovePNum (int seat)
|
|||
fromtime = totime;
|
||||
fromstate = tostate;
|
||||
fromframe = toframe; //qw debug
|
||||
cmdfrom = cmdto;
|
||||
|
||||
cmdto = &of->cmd[seat];
|
||||
totime = of->senttime;
|
||||
|
@ -1090,7 +1083,6 @@ void CL_PredictMovePNum (int seat)
|
|||
msec = ((simtime - totime) * 1000);
|
||||
if (msec >= 1)
|
||||
{
|
||||
cmdfrom = cmdto;
|
||||
fromstate = tostate;
|
||||
fromtime = totime;
|
||||
fromframe = toframe;
|
||||
|
|
|
@ -183,7 +183,7 @@ qbyte *ReadTargaFile(qbyte *buf, int length, int *width, int *height, qboolean *
|
|||
|
||||
tgaheader_t tgaheader;
|
||||
|
||||
if (length < 18 || buf[16] != 8 && buf[16] != 16 && buf[16] != 24 && buf[16] != 32)
|
||||
if (length < 18 || (buf[16] != 8 && buf[16] != 16 && buf[16] != 24 && buf[16] != 32))
|
||||
return NULL; //BUMMER!
|
||||
|
||||
tgaheader.id_len = buf[0];
|
||||
|
|
|
@ -2948,7 +2948,6 @@ static void *QDECL capture_avi_begin (char *streamname, int videorate, int width
|
|||
if (ctx->codec_fourcc)
|
||||
{
|
||||
AVICOMPRESSOPTIONS opts;
|
||||
AVICOMPRESSOPTIONS* aopts[1] = { &opts };
|
||||
memset(&opts, 0, sizeof(opts));
|
||||
opts.fccType = stream_header.fccType;
|
||||
opts.fccHandler = ctx->codec_fourcc;
|
||||
|
@ -3348,7 +3347,6 @@ void Media_StopRecordFilm_f (void)
|
|||
}
|
||||
void Media_RecordFilm_f (void)
|
||||
{
|
||||
char *fourcc = capturecodec.string;
|
||||
int sndkhz, sndchannels, sndbits;
|
||||
int i;
|
||||
|
||||
|
@ -3650,9 +3648,9 @@ struct ISpVoice
|
|||
void TTS_SayUnicodeString(wchar_t *stringtosay)
|
||||
{
|
||||
static CLSID CLSID_SpVoice = {0x96749377, 0x3391, 0x11D2,
|
||||
0x9E,0xE3,0x00,0xC0,0x4F,0x79,0x73,0x96};
|
||||
{0x9E,0xE3,0x00,0xC0,0x4F,0x79,0x73,0x96}};
|
||||
static GUID IID_ISpVoice = {0x6C44DF74,0x72B9,0x4992,
|
||||
0xA1,0xEC,0xEF,0x99,0x6E,0x04,0x22,0xD4};
|
||||
{0xA1,0xEC,0xEF,0x99,0x6E,0x04,0x22,0xD4}};
|
||||
static ISpVoice *sp = NULL;
|
||||
|
||||
if (!sp)
|
||||
|
@ -4096,8 +4094,8 @@ void STT_Event(void)
|
|||
}
|
||||
void STT_Init_f(void)
|
||||
{
|
||||
static CLSID CLSID_SpSharedRecoContext = {0x47206204, 0x5ECA, 0x11D2, 0x96, 0x0F, 0x00, 0xC0, 0x4F, 0x8E, 0xE6, 0x28};
|
||||
static CLSID IID_SpRecoContext = {0xF740A62F, 0x7C15, 0x489E, 0x82, 0x34, 0x94, 0x0A, 0x33, 0xD9, 0x27, 0x2D};
|
||||
static CLSID CLSID_SpSharedRecoContext = {0x47206204, 0x5ECA, 0x11D2, {0x96, 0x0F, 0x00, 0xC0, 0x4F, 0x8E, 0xE6, 0x28}};
|
||||
static CLSID IID_SpRecoContext = {0xF740A62F, 0x7C15, 0x489E, {0x82, 0x34, 0x94, 0x0A, 0x33, 0xD9, 0x27, 0x2D}};
|
||||
|
||||
if (stt_gram)
|
||||
{
|
||||
|
|
|
@ -68,9 +68,6 @@ qboolean M_Options_InvertMouse (menucheck_t *option, struct menu_s *menu, chk_se
|
|||
void M_Menu_Options_f (void)
|
||||
{
|
||||
extern cvar_t crosshair;
|
||||
#ifdef _WIN32
|
||||
extern qboolean vid_isfullscreen;
|
||||
#endif
|
||||
int y;
|
||||
|
||||
menubulk_t bulk[] = {
|
||||
|
@ -885,7 +882,7 @@ void M_Menu_Textures_f (void)
|
|||
NULL
|
||||
};
|
||||
|
||||
extern cvar_t gl_load24bit, gl_specular, gl_detail, gl_compress, gl_picmip, gl_picmip2d, gl_max_size, r_drawflat, r_glsl_offsetmapping;
|
||||
extern cvar_t gl_load24bit, gl_specular, gl_compress, gl_picmip, gl_picmip2d, gl_max_size, r_drawflat, r_glsl_offsetmapping;
|
||||
extern cvar_t gl_texture_anisotropic_filtering, gl_texturemode, gl_texturemode2d, gl_mipcap;
|
||||
int y;
|
||||
menubulk_t bulk[] =
|
||||
|
|
|
@ -1513,7 +1513,7 @@ void MasterInfo_WriteServers(void)
|
|||
break;
|
||||
}
|
||||
if (mast->address)
|
||||
VFS_PUTS(mf, va("%s\t%s\t%s\n", mast->address, typename, protoname, mast->name));
|
||||
VFS_PUTS(mf, va("%s\t%s%s\t%s\n", mast->address, typename, protoname, mast->name));
|
||||
else
|
||||
VFS_PUTS(mf, va("%s\t%s\t%s\n", NET_AdrToString(adr, sizeof(adr), &mast->adr), typename, mast->name));
|
||||
}
|
||||
|
|
|
@ -2151,7 +2151,7 @@ static void QCBUILTIN PF_cs_setsensativityscaler (pubprogfuncs_t *prinst, struct
|
|||
static void QCBUILTIN PF_cs_boxparticles(pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int effectnum = CL_TranslateParticleFromServer(G_FLOAT(OFS_PARM0));
|
||||
csqcedict_t *ent = (csqcedict_t*)G_EDICT(prinst, OFS_PARM1);
|
||||
// csqcedict_t *ent = (csqcedict_t*)G_EDICT(prinst, OFS_PARM1);
|
||||
float *org_from = G_VECTOR(OFS_PARM2);
|
||||
float *org_to = G_VECTOR(OFS_PARM3);
|
||||
float *vel_from = G_VECTOR(OFS_PARM4);
|
||||
|
@ -5257,7 +5257,6 @@ qboolean CSQC_Init (qboolean anycsqc, qboolean csdatenabled, unsigned int checks
|
|||
int i;
|
||||
string_t *str;
|
||||
csqcedict_t *worldent;
|
||||
qboolean loaded = false;
|
||||
if (csprogs_promiscuous != anycsqc || csprogs_checksum != checksum)
|
||||
CSQC_Shutdown();
|
||||
csprogs_promiscuous = anycsqc;
|
||||
|
|
|
@ -257,7 +257,7 @@ void CL_LoadFont_f(void)
|
|||
for (j = 0; j < fontslot[i].sizes; j++)
|
||||
{
|
||||
if (j)
|
||||
Con_Printf(", ", fontslot[i].size[j]);
|
||||
Con_Printf(", ");
|
||||
Con_Printf("%i", fontslot[i].size[j]);
|
||||
}
|
||||
Con_Printf(")\n");
|
||||
|
@ -830,7 +830,7 @@ void QCBUILTIN PF_SubConInput (pubprogfuncs_t *prinst, struct globalvars_s *pr_g
|
|||
int ie = G_FLOAT(OFS_PARM1);
|
||||
float pa = G_FLOAT(OFS_PARM2);
|
||||
float pb = G_FLOAT(OFS_PARM3);
|
||||
float pc = G_FLOAT(OFS_PARM4);
|
||||
// float pc = G_FLOAT(OFS_PARM4);
|
||||
console_t *con = Con_FindConsole(conname);
|
||||
G_FLOAT(OFS_RETURN) = 0;
|
||||
if (!con)
|
||||
|
|
|
@ -535,6 +535,7 @@ void Renderer_Init(void)
|
|||
|
||||
#endif
|
||||
Cmd_AddCommand("r_dumpshaders", Shader_WriteOutGenerics_f);
|
||||
Cmd_AddCommand("r_remapshader", Shader_RemapShader_f);
|
||||
|
||||
#if defined(GLQUAKE) || defined(D3DQUAKE)
|
||||
GLD3DRenderer_Init();
|
||||
|
|
|
@ -224,8 +224,6 @@ extern sfx_t *known_sfx;
|
|||
extern int loaded_sfx;
|
||||
extern int num_sfx;
|
||||
|
||||
static qboolean openal_vars_initialized = false;
|
||||
|
||||
|
||||
static void OnChangeALMaxDistance (cvar_t *var, char *value);
|
||||
static void OnChangeALSpeedOfSound (cvar_t *var, char *value);
|
||||
|
|
|
@ -974,7 +974,6 @@ static BOOL (CALLBACK DSound_EnumCallback)(GUID FAR *guid, LPCSTR str1, LPCSTR
|
|||
char guidbuf[128];
|
||||
wchar_t mssuck[128];
|
||||
void (QDECL *callback) (const char *drivername, const char *devicecode, const char *readablename) = parm;
|
||||
soundcardinfo_t *sc = parm;
|
||||
if (guid == NULL) //we don't care about the (dupe) default device
|
||||
return TRUE;
|
||||
|
||||
|
|
|
@ -1578,7 +1578,7 @@ static soundcardinfo_t *SNDDMA_Init(char *driver, char *device)
|
|||
for (i = 0; outputdrivers[i]; i++)
|
||||
{
|
||||
sd = outputdrivers[i];
|
||||
if (sd && !driver || !Q_strcasecmp(sd->name, driver))
|
||||
if (sd && (!driver || !Q_strcasecmp(sd->name, driver)))
|
||||
{
|
||||
//skip drivers which are not present.
|
||||
if (!sd->InitCard)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "quakedef.h"
|
||||
|
||||
#ifdef AVAIL_OGGVORBIS
|
||||
#define OV_EXCLUDE_STATIC_CALLBACKS
|
||||
|
||||
#ifdef __MORPHOS__
|
||||
#include <exec/exec.h>
|
||||
|
|
|
@ -1790,7 +1790,7 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, in
|
|||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
static float PlaneNearest(vec3_t normal, vec3_t mins, vec3_t maxs)
|
||||
{
|
||||
float result;
|
||||
|
@ -1806,6 +1806,7 @@ static float PlaneNearest(vec3_t normal, vec3_t mins, vec3_t maxs)
|
|||
#endif
|
||||
return result;
|
||||
}
|
||||
*/
|
||||
|
||||
static qboolean Mod_Trace_Trisoup(vecV_t *posedata, index_t *indexes, int numindexes, vec3_t start, vec3_t end, vec3_t mins, vec3_t maxs, trace_t *trace)
|
||||
{
|
||||
|
@ -1819,7 +1820,7 @@ static qboolean Mod_Trace_Trisoup(vecV_t *posedata, index_t *indexes, int numind
|
|||
|
||||
float planedist;
|
||||
float diststart, distend;
|
||||
float expand;
|
||||
// float expand;
|
||||
|
||||
float frac;
|
||||
// float temp;
|
||||
|
@ -1836,7 +1837,7 @@ static qboolean Mod_Trace_Trisoup(vecV_t *posedata, index_t *indexes, int numind
|
|||
VectorSubtract(p3, p2, edge2);
|
||||
CrossProduct(edge1, edge2, normal);
|
||||
|
||||
expand = PlaneNearest(normal, mins, maxs);
|
||||
// expand = PlaneNearest(normal, mins, maxs);
|
||||
planedist = DotProduct(p1, normal);
|
||||
diststart = DotProduct(start, normal);
|
||||
if (diststart <= planedist)
|
||||
|
|
|
@ -2731,7 +2731,10 @@ static odecommandqueue_t *physics_queuecommand(world_t *world)
|
|||
|
||||
//add on the end of the queue, so that order is preserved.
|
||||
if (world->ode.cmdqueuehead)
|
||||
world->ode.cmdqueuetail->next = world->ode.cmdqueuetail = cmd;
|
||||
{
|
||||
odecommandqueue_t *ot = world->ode.cmdqueuetail;
|
||||
ot->next = world->ode.cmdqueuetail = cmd;
|
||||
}
|
||||
else
|
||||
world->ode.cmdqueuetail = world->ode.cmdqueuehead = cmd;
|
||||
return cmd;
|
||||
|
|
|
@ -907,14 +907,14 @@ fail:
|
|||
loc->search->handle->ReadFile(loc->search->handle, loc, targname);
|
||||
|
||||
//properlyish unixify
|
||||
while(s = strchr(targname, '\\'))
|
||||
while((s = strchr(targname, '\\')))
|
||||
*s = '/';
|
||||
if (*targname == '/')
|
||||
Q_strncpyz(mergedname, targname+1, sizeof(mergedname));
|
||||
else
|
||||
{
|
||||
Q_strncpyz(mergedname, filename, sizeof(mergedname));
|
||||
while(s = strchr(mergedname, '\\'))
|
||||
while((s = strchr(mergedname, '\\')))
|
||||
*s = '/';
|
||||
b = COM_SkipPath(mergedname);
|
||||
*b = 0;
|
||||
|
|
|
@ -57,7 +57,7 @@ static int (ZEXPORT *qinflateEnd) (z_streamp strm) ZSTATIC(inflateEnd);
|
|||
static int (ZEXPORT *qinflate) (z_streamp strm, int flush) ZSTATIC(inflate);
|
||||
static int (ZEXPORT *qinflateInit2_) (z_streamp strm, int windowBits,
|
||||
const char *version, int stream_size) ZSTATIC(inflateInit2_);
|
||||
static uLong (ZEXPORT *qcrc32) (uLong crc, const Bytef *buf, uInt len) ZSTATIC(crc32);
|
||||
//static uLong (ZEXPORT *qcrc32) (uLong crc, const Bytef *buf, uInt len) ZSTATIC(crc32);
|
||||
|
||||
#define qinflateInit2(strm, windowBits) \
|
||||
qinflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
|
||||
|
@ -70,7 +70,7 @@ qboolean LibZ_Init(void)
|
|||
{(void*)&qinflateEnd, "inflateEnd"},
|
||||
{(void*)&qinflate, "inflate"},
|
||||
{(void*)&qinflateInit2_, "inflateInit2_"},
|
||||
{(void*)&qcrc32, "crc32"},
|
||||
// {(void*)&qcrc32, "crc32"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
if (!ZLIB_LOADED())
|
||||
|
|
|
@ -2118,6 +2118,7 @@ int FTENET_GetLocalAddress(int port, qboolean ipx, qboolean ipv4, qboolean ipv6,
|
|||
{
|
||||
struct sockaddr_in from;
|
||||
from.sin_family = AF_INET;
|
||||
from.sin_port = port;
|
||||
memcpy(&from.sin_addr, h->h_addr_list[b], sizeof(&from.sin_addr));
|
||||
SockadrToNetadr((struct sockaddr_qstorage*)&from, addresses);
|
||||
|
||||
|
@ -2135,6 +2136,7 @@ int FTENET_GetLocalAddress(int port, qboolean ipx, qboolean ipv4, qboolean ipv6,
|
|||
{
|
||||
struct sockaddr_in6 from;
|
||||
from.sin6_family = AF_INET6;
|
||||
from.sin6_port = port;
|
||||
memcpy(&from.sin6_addr, h->h_addr_list[b], sizeof(((struct sockaddr_in6*)&from)->sin6_addr));
|
||||
SockadrToNetadr((struct sockaddr_qstorage*)&from, addresses);
|
||||
*adrflags++ = 0;
|
||||
|
@ -2974,7 +2976,7 @@ closesvstream:
|
|||
"Connection: Upgrade\r\n"
|
||||
"Access-Control-Allow-Origin: *\r\n" //allow cross-origin requests. this means you can use any domain to play on any public server.
|
||||
"Sec-WebSocket-Accept: %s\r\n"
|
||||
// "%s"
|
||||
"%s"
|
||||
"\r\n", acceptkey, protoname);
|
||||
//send the websocket handshake response.
|
||||
send(st->socketnum, resp, strlen(resp), 0);
|
||||
|
|
|
@ -178,7 +178,6 @@ int PM_SlideMove (void)
|
|||
{
|
||||
vec3_t move;
|
||||
vec3_t from;
|
||||
float firstfrac = trace.fraction;
|
||||
|
||||
VectorCopy(trace.endpos, from); //just in case
|
||||
VectorSubtract(end, trace.endpos, move);
|
||||
|
|
|
@ -1679,7 +1679,6 @@ static void GenerateTCMods(const shaderpass_t *pass, int passnum)
|
|||
//dest is packed too
|
||||
static void colourgen(const shaderpass_t *pass, int cnt, vec4_t *src, vec4_t *dst, const mesh_t *mesh)
|
||||
{
|
||||
int n = cnt;
|
||||
switch (pass->rgbgen)
|
||||
{
|
||||
case RGB_GEN_ENTITY:
|
||||
|
@ -3369,7 +3368,6 @@ void GLBE_SelectEntity(entity_t *ent)
|
|||
}
|
||||
|
||||
shaderstate.lastuniform = 0;
|
||||
shaderstate.curtime = shaderstate.updatetime - shaderstate.curentity->shaderTime;
|
||||
}
|
||||
#if 0
|
||||
static void BE_SelectFog(vec3_t colour, float alpha, float density)
|
||||
|
@ -4017,16 +4015,15 @@ static qboolean BE_GenTempMeshVBO(vbo_t **vbo, mesh_t *m)
|
|||
void GLBE_DrawMesh_List(shader_t *shader, int nummeshes, mesh_t **meshlist, vbo_t *vbo, texnums_t *texnums, unsigned int beflags)
|
||||
{
|
||||
shaderstate.curbatch = &shaderstate.dummybatch;
|
||||
shaderstate.curshader = shader->remapto;
|
||||
if (!vbo)
|
||||
{
|
||||
mesh_t *m;
|
||||
shaderstate.curshader = shader;
|
||||
shaderstate.flags = beflags;
|
||||
TRACE(("GLBE_DrawMesh_List: shader %s\n", shader->name));
|
||||
if (shaderstate.curentity != &r_worldentity)
|
||||
{
|
||||
GLBE_SelectEntity(&r_worldentity);
|
||||
}
|
||||
shaderstate.curtime = shaderstate.updatetime - (shaderstate.curentity->shaderTime + shader->remaptime);
|
||||
shaderstate.curtexnums = texnums;
|
||||
|
||||
while (nummeshes--)
|
||||
|
@ -4045,12 +4042,10 @@ void GLBE_DrawMesh_List(shader_t *shader, int nummeshes, mesh_t **meshlist, vbo_
|
|||
{
|
||||
shaderstate.sourcevbo = vbo;
|
||||
shaderstate.colourarraytype = GL_FLOAT;
|
||||
shaderstate.curshader = shader;
|
||||
shaderstate.flags = beflags;
|
||||
if (shaderstate.curentity != &r_worldentity)
|
||||
{
|
||||
GLBE_SelectEntity(&r_worldentity);
|
||||
}
|
||||
shaderstate.curtime = shaderstate.updatetime - (shaderstate.curentity->shaderTime + shader->remaptime);
|
||||
shaderstate.curtexnums = texnums;
|
||||
|
||||
shaderstate.meshcount = nummeshes;
|
||||
|
@ -4079,16 +4074,15 @@ void GLBE_SubmitBatch(batch_t *batch)
|
|||
return;
|
||||
}
|
||||
|
||||
shaderstate.curshader = batch->shader;
|
||||
shaderstate.curshader = batch->shader->remapto;
|
||||
shaderstate.flags = batch->flags;
|
||||
if (shaderstate.curentity != batch->ent)
|
||||
{
|
||||
GLBE_SelectEntity(batch->ent);
|
||||
}
|
||||
shaderstate.curtime = shaderstate.updatetime - (shaderstate.curentity->shaderTime + batch->shader->remaptime);
|
||||
if (batch->skin)
|
||||
shaderstate.curtexnums = batch->skin;
|
||||
else
|
||||
shaderstate.curtexnums = &shaderstate.curshader->defaulttextures;
|
||||
shaderstate.curtexnums = &batch->shader->defaulttextures;
|
||||
|
||||
if (0)
|
||||
{
|
||||
|
@ -4201,7 +4195,7 @@ static void GLBE_SubmitMeshesSortList(batch_t *sortlist)
|
|||
continue;
|
||||
if (batch->shader->flags & SHADER_SKY)
|
||||
{
|
||||
if (shaderstate.mode == BEM_STANDARD || shaderstate.mode == BEM_DEPTHDARK)
|
||||
if (shaderstate.mode == BEM_STANDARD || shaderstate.mode == BEM_DEPTHDARK || shaderstate.mode == BEM_WIREFRAME)
|
||||
{
|
||||
if (!batch->shader->prog)
|
||||
{
|
||||
|
|
|
@ -1072,7 +1072,6 @@ qboolean GL_UploadCompressed (qbyte *file, int *out_width, int *out_height, unsi
|
|||
|
||||
void GL_RoundDimensions(int *scaled_width, int *scaled_height, unsigned int flags)
|
||||
{
|
||||
qboolean mipmap = flags & IF_NOMIPMAP;
|
||||
if (r_config.texture_non_power_of_two) //NPOT is a simple extension that relaxes errors.
|
||||
{
|
||||
TRACE(("dbg: GL_RoundDimensions: GL_ARB_texture_non_power_of_two\n"));
|
||||
|
|
|
@ -1421,7 +1421,6 @@ r_refdef must be set before the first call
|
|||
*/
|
||||
void GLR_RenderView (void)
|
||||
{
|
||||
int oldfbo = 0;
|
||||
int dofbo = r_refdef.rt_destcolour || r_refdef.rt_depth;
|
||||
double time1 = 0, time2;
|
||||
|
||||
|
@ -1480,8 +1479,7 @@ void GLR_RenderView (void)
|
|||
flags |= FBO_TEX_DEPTH;
|
||||
else
|
||||
flags |= FBO_RB_DEPTH;
|
||||
oldfbo = GLBE_FBO_Update(&fbo_gameview, true, flags, col, depth, vid.fbpwidth, vid.fbpheight);
|
||||
//oldfbo will probably be the 2d fbo
|
||||
GLBE_FBO_Update(&fbo_gameview, true, flags, col, depth, vid.fbpwidth, vid.fbpheight);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3325,6 +3325,7 @@ void Shader_Reset(shader_t *s)
|
|||
Shader_Free(s);
|
||||
memset(s, 0, sizeof(*s));
|
||||
|
||||
s->remapto = s;
|
||||
s->id = id;
|
||||
s->width = w;
|
||||
s->height = h;
|
||||
|
@ -5124,7 +5125,7 @@ void R_UnloadShader(shader_t *shader)
|
|||
if (shader->uses-- == 1)
|
||||
Shader_Free(shader);
|
||||
}
|
||||
static shader_t *R_LoadShader (char *name, unsigned int usageflags, shader_gen_t *defaultgen, const char *genargs)
|
||||
static shader_t *R_LoadShader (const char *name, unsigned int usageflags, shader_gen_t *defaultgen, const char *genargs)
|
||||
{
|
||||
int i, f = -1;
|
||||
char cleanname[MAX_QPATH];
|
||||
|
@ -5408,6 +5409,64 @@ cin_t *R_ShaderFindCinematic(char *name)
|
|||
#endif
|
||||
}
|
||||
|
||||
void R_RemapShader(const char *sourcename, const char *destname, float timeoffset)
|
||||
{
|
||||
shader_t *o;
|
||||
shader_t *n;
|
||||
|
||||
//make sure all types of the shader are remapped properly.
|
||||
//if there's a .shader file with it then it should 'just work'.
|
||||
|
||||
o = R_LoadShader (sourcename, SUF_NONE, NULL, NULL);
|
||||
n = R_LoadShader (destname, SUF_NONE, NULL, NULL);
|
||||
if (o)
|
||||
{
|
||||
if (!n)
|
||||
n = o;
|
||||
o->remapto = n;
|
||||
o->remaptime = timeoffset; //this just feels wrong.
|
||||
}
|
||||
|
||||
o = R_LoadShader (sourcename, SUF_2D, NULL, NULL);
|
||||
n = R_LoadShader (destname, SUF_2D, NULL, NULL);
|
||||
if (o)
|
||||
{
|
||||
if (!n)
|
||||
n = o;
|
||||
o->remapto = n;
|
||||
o->remaptime = timeoffset;
|
||||
}
|
||||
|
||||
o = R_LoadShader (sourcename, SUF_LIGHTMAP, NULL, NULL);
|
||||
n = R_LoadShader (destname, SUF_LIGHTMAP, NULL, NULL);
|
||||
if (o)
|
||||
{
|
||||
if (!n)
|
||||
n = o;
|
||||
o->remapto = n;
|
||||
o->remaptime = timeoffset;
|
||||
}
|
||||
}
|
||||
|
||||
void Shader_RemapShader_f(void)
|
||||
{
|
||||
char *sourcename = Cmd_Argv(1);
|
||||
char *destname = Cmd_Argv(2);
|
||||
float timeoffset = atof(Cmd_Argv(3));
|
||||
|
||||
if (!Cmd_FromGamecode() && !atoi(Info_ValueForKey(cl.serverinfo, "*cheats")))
|
||||
{
|
||||
Con_Printf("%s may only be used from gamecode, or when cheats are enabled\n", Cmd_Argv(0));
|
||||
return;
|
||||
}
|
||||
if (!*sourcename)
|
||||
{
|
||||
Con_Printf("%s originalshader remappedshader starttime\n", Cmd_Argv(0));
|
||||
return;
|
||||
}
|
||||
R_RemapShader(sourcename, destname, timeoffset);
|
||||
}
|
||||
|
||||
shader_t *R_RegisterPic (char *name)
|
||||
{
|
||||
shader_t *shader;
|
||||
|
|
|
@ -2311,7 +2311,6 @@ qboolean Sh_GenShadowMap (dlight_t *l, qbyte *lvis, int smsize)
|
|||
pxrect_t oprect;
|
||||
shadowmesh_t *smesh;
|
||||
int isspot = (l->fov != 0);
|
||||
extern cvar_t r_shadow_shadowmapping_precision;
|
||||
int sidevisible;
|
||||
int oldflip = r_refdef.flipcull;
|
||||
int oldexternalview = r_refdef.externalview;
|
||||
|
|
|
@ -85,27 +85,32 @@ void R_DrawSkyChain (batch_t *batch)
|
|||
{
|
||||
R_CalcSkyChainBounds(batch);
|
||||
GL_DrawSkyBox (skyboxtex, batch);
|
||||
|
||||
GL_SkyForceDepth(batch);
|
||||
return;
|
||||
}
|
||||
if (skyshader->numpasses)
|
||||
{
|
||||
#if defined(GLQUAKE) && !defined(ANDROID)
|
||||
if (*r_fastsky.string && qrenderer == QR_OPENGL && TEXVALID(batch->shader->defaulttextures.base) && TEXVALID(batch->shader->defaulttextures.fullbright))
|
||||
{
|
||||
R_CalcSkyChainBounds(batch);
|
||||
if (*r_fastsky.string && qrenderer == QR_OPENGL && TEXVALID(batch->shader->defaulttextures.base) && TEXVALID(batch->shader->defaulttextures.fullbright))
|
||||
{
|
||||
R_CalcSkyChainBounds(batch);
|
||||
|
||||
R_IBrokeTheArrays();
|
||||
GL_DrawSkyGrid(batch->texture);
|
||||
R_IBrokeTheArrays();
|
||||
|
||||
GL_SkyForceDepth(batch);
|
||||
}
|
||||
else
|
||||
R_IBrokeTheArrays();
|
||||
GL_DrawSkyGrid(batch->texture);
|
||||
R_IBrokeTheArrays();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
GL_DrawSkySphere(batch, skyshader);
|
||||
GL_SkyForceDepth(batch);
|
||||
GL_DrawSkySphere(batch, skyshader);
|
||||
}
|
||||
|
||||
//neither skydomes nor skyboxes will have been drawn with the correct depth values for the sky.
|
||||
//this can result in rooms behind the sky surfaces being visible.
|
||||
//so make sure they're correct where they're expected to be.
|
||||
//don't do it on q3 bsp, because q3map2 can't do skyrooms without being weird about it. or something. anyway, we get different (buggy) behaviour from q3 if we don't skip this.
|
||||
//See: The Edge Of Forever (motef, by sock) for an example of where this needs to be skipped.
|
||||
//See dm3 for an example of where the depth needs to be correct (OMG THERE'S PLAYERS IN MY SKYBOX! WALLHAXX!).
|
||||
//you can't please them all.
|
||||
if (r_worldentity.model->fromgame != fg_quake3)
|
||||
GL_SkyForceDepth(batch);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -484,6 +484,8 @@ struct shader_s
|
|||
//end of shared fields.
|
||||
|
||||
shader_t *bemoverrides[bemoverride_max];
|
||||
shader_t *remapto; //render using this shader instead. for q3 nonsense.
|
||||
float remaptime;
|
||||
|
||||
byte_vec4_t fog_color;
|
||||
float fog_dist;
|
||||
|
@ -554,6 +556,7 @@ shader_t *R_RegisterShader_Flare (char *name);
|
|||
shader_t *R_RegisterSkin (char *shadername, char *modname);
|
||||
shader_t *R_RegisterCustom (char *name, unsigned int usageflags, shader_gen_t *defaultgen, const void *args);
|
||||
void R_BuildDefaultTexnums(texnums_t *tn, shader_t *shader);
|
||||
void R_RemapShader(const char *sourcename, const char *destname, float timeoffset);
|
||||
|
||||
cin_t *R_ShaderGetCinematic(shader_t *s);
|
||||
cin_t *R_ShaderFindCinematic(char *name);
|
||||
|
@ -572,6 +575,7 @@ void Shader_Shutdown (void);
|
|||
qboolean Shader_Init (void);
|
||||
void Shader_NeedReload(qboolean rescanfs);
|
||||
void Shader_WriteOutGenerics_f(void);
|
||||
void Shader_RemapShader_f(void);
|
||||
|
||||
mfog_t *CM_FogForOrigin(vec3_t org);
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ vfsfile_t *IWebGenerateFile(char *name)
|
|||
char lastrecordedmvd[MAX_QPATH];
|
||||
|
||||
IWeb_FileGen_t *IWeb_GenerationBuffer;
|
||||
int IWeb_GenerationBufferTotal;
|
||||
size_t IWeb_GenerationBufferTotal;
|
||||
|
||||
void IWeb_MoreGeneratedResize(int newsize)
|
||||
void IWeb_MoreGeneratedResize(size_t newsize)
|
||||
{
|
||||
IWeb_FileGen_t *ob;
|
||||
|
||||
|
@ -39,9 +39,32 @@ void IWeb_MoreGeneratedResize(int newsize)
|
|||
}
|
||||
void IWeb_Generate(const char *buf)
|
||||
{
|
||||
long count = strlen(buf);
|
||||
size_t count = strlen(buf);
|
||||
if (!IWeb_GenerationBuffer || IWeb_GenerationBuffer->len + count >= IWeb_GenerationBufferTotal)
|
||||
IWeb_MoreGeneratedResize(IWeb_GenerationBufferTotal + count+(16*1024));
|
||||
{
|
||||
IWeb_FileGen_t *ob;
|
||||
size_t newsize = IWeb_GenerationBufferTotal + count+(16*1024);
|
||||
|
||||
if (newsize < IWeb_GenerationBufferTotal)
|
||||
{
|
||||
Sys_Error("Integer overflow\n");
|
||||
return; //should probably crash or something.
|
||||
}
|
||||
|
||||
ob = IWeb_GenerationBuffer;
|
||||
IWeb_GenerationBuffer = BZ_Malloc(sizeof(IWeb_GenerationBuffer) + newsize);
|
||||
memset(IWeb_GenerationBuffer, 0, sizeof(*IWeb_GenerationBuffer));
|
||||
|
||||
IWeb_GenerationBuffer->data = (char *)(IWeb_GenerationBuffer+1);
|
||||
if (ob)
|
||||
{
|
||||
memcpy(IWeb_GenerationBuffer->data, ob->data, ob->len);
|
||||
IWeb_GenerationBuffer->len = ob->len;
|
||||
IWebFree(ob);
|
||||
}
|
||||
|
||||
IWeb_GenerationBufferTotal = newsize;
|
||||
}
|
||||
|
||||
memcpy(&IWeb_GenerationBuffer->data[IWeb_GenerationBuffer->len], buf, count);
|
||||
IWeb_GenerationBuffer->len+=count;
|
||||
|
|
|
@ -900,6 +900,9 @@ static char *decodeUTF(int type, unsigned char *inputf, unsigned int inbytes, in
|
|||
{
|
||||
switch(type)
|
||||
{
|
||||
default:
|
||||
inc = 0;
|
||||
break;
|
||||
case UTF16LE:
|
||||
case UTF16BE:
|
||||
inc = inputf[type==UTF16BE];
|
||||
|
@ -915,7 +918,7 @@ static char *decodeUTF(int type, unsigned char *inputf, unsigned int inbytes, in
|
|||
if (l >= 0xdc00u && l < 0xe000u)
|
||||
{
|
||||
inputf+=2;
|
||||
inc = ((inc & 0x3ffu)<<10) | (l & 0x3ffu) + 0x10000;
|
||||
inc = (((inc & 0x3ffu)<<10) | (l & 0x3ffu)) + 0x10000;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1433,6 +1433,8 @@ static QCC_def_t *QCC_GetTemp(QCC_type_t *type)
|
|||
var_c->ofs = t->ofs;
|
||||
var_c->temp = t;
|
||||
t->lastfunc = pr_scope;
|
||||
|
||||
t->laststatement = numstatements;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1441,8 +1443,6 @@ static QCC_def_t *QCC_GetTemp(QCC_type_t *type)
|
|||
numtemps+=type->size;
|
||||
}
|
||||
|
||||
t->laststatement = numstatements;
|
||||
|
||||
var_c->s_file = s_file;
|
||||
var_c->s_line = pr_source_line;
|
||||
|
||||
|
@ -1511,11 +1511,11 @@ static void QCC_LockActiveTemps(void)
|
|||
|
||||
}
|
||||
|
||||
static void QCC_LockTemp(QCC_def_t *d)
|
||||
{
|
||||
if (d->temp && d->temp->used)
|
||||
d->temp->scope = pr_scope;
|
||||
}
|
||||
//static void QCC_LockTemp(QCC_def_t *d)
|
||||
//{
|
||||
// if (d->temp && d->temp->used)
|
||||
// d->temp->scope = pr_scope;
|
||||
//}
|
||||
static void QCC_ForceLockTempForOffset(int ofs)
|
||||
{
|
||||
temp_t *t;
|
||||
|
@ -6876,9 +6876,8 @@ QCC_ref_t *QCC_PR_RefExpression (QCC_ref_t *retbuf, int priority, int exprflags)
|
|||
if (ops != opcodes_store)
|
||||
{
|
||||
lhsd = QCC_RefToDef(lhsr, false);
|
||||
for (i = 0; ops[i]; i++)
|
||||
for (i = 0; (op=ops[i]); i++)
|
||||
{
|
||||
op = ops[i];
|
||||
// if (QCC_OPCodeValid(op))
|
||||
{
|
||||
if ((*op->type_b)->type == rhsd->type->type && (*op->type_a)->type == lhsd->type->type)
|
||||
|
@ -6920,7 +6919,7 @@ QCC_ref_t *QCC_PR_RefExpression (QCC_ref_t *retbuf, int priority, int exprflags)
|
|||
rhsd = QCC_MakeVectorConst(0,0,0);
|
||||
else if (lhsr->cast->type == ev_struct || lhsr->cast->type == ev_union)
|
||||
{
|
||||
QCC_PR_ParseError(0, "Type mismatch on assignment. %s %s %s is not supported\n", lhsd->type->name, opname, rhsd->type->name);
|
||||
QCC_PR_ParseError(0, "Type mismatch on assignment. %s %s %s is not supported\n", lhsr->cast->name, opname, rhsd->type->name);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2386,7 +2386,6 @@ void QCC_PR_ConditionCompilation(void)
|
|||
char *s;
|
||||
int quote=false;
|
||||
pbool preprocessorhack = false;
|
||||
int comment = 0;
|
||||
CompilerConstant_t *cnst;
|
||||
|
||||
QCC_PR_SimpleGetToken ();
|
||||
|
@ -2565,12 +2564,12 @@ so if present, the preceeding \\\n and following \\\n must become an actual \n i
|
|||
}
|
||||
|
||||
/* *buffer, *bufferlen and *buffermax should be NULL/0 at the start */
|
||||
static void QCC_PR_ExpandStrCat(char **buffer, int *bufferlen, int *buffermax, char *newdata, int newlen)
|
||||
static void QCC_PR_ExpandStrCat(char **buffer, size_t *bufferlen, size_t *buffermax, char *newdata, size_t newlen)
|
||||
{
|
||||
int newmax = *bufferlen + newlen;
|
||||
if (newmax < *bufferlen)
|
||||
size_t newmax = *bufferlen + newlen;
|
||||
if (newmax < *bufferlen)//check for overflow
|
||||
{
|
||||
QCC_PR_ParseWarning(ERR_INTERNAL, "out of memory");
|
||||
QCC_PR_ParseWarning(ERR_INTERNAL, "exceeds 4gb");
|
||||
return;
|
||||
}
|
||||
if (newmax > *buffermax)
|
||||
|
@ -2583,7 +2582,7 @@ static void QCC_PR_ExpandStrCat(char **buffer, int *bufferlen, int *buffermax,
|
|||
newmax = *bufferlen * 2;
|
||||
if (newmax < *bufferlen) /*overflowed?*/
|
||||
{
|
||||
QCC_PR_ParseWarning(ERR_INTERNAL, "out of memory");
|
||||
QCC_PR_ParseWarning(ERR_INTERNAL, "exceeds 4gb");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2656,8 +2655,8 @@ int QCC_PR_CheckCompConst(void)
|
|||
char *start;
|
||||
char *starttok;
|
||||
char *buffer;
|
||||
int buffermax;
|
||||
int bufferlen;
|
||||
size_t buffermax;
|
||||
size_t bufferlen;
|
||||
char *paramoffset[MAXCONSTANTPARAMS+1];
|
||||
int param=0;
|
||||
int plevel=0;
|
||||
|
@ -4442,7 +4441,7 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
|
|||
found = true;
|
||||
break;
|
||||
}
|
||||
if (basicindex < pp[i].ofs+1) //if we found one with the index
|
||||
if ((unsigned int)basicindex < pp[i].ofs+1) //if we found one with the index
|
||||
basicindex = pp[i].ofs+1; //make sure we don't union it.
|
||||
}
|
||||
}
|
||||
|
@ -4465,7 +4464,7 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
|
|||
if (!d)
|
||||
{
|
||||
d = QCC_PR_GetDef(QCC_PR_FieldType(*basictypes[newparm->type]), membername, NULL, 2, 0, GDF_CONST);
|
||||
for (i = 0; i < newparm->size; i++)
|
||||
for (i = 0; (unsigned int)i < newparm->size; i++)
|
||||
((int *)qcc_pr_globals)[i+d->ofs] = pr.size_fields + i;
|
||||
pr.size_fields += i;
|
||||
|
||||
|
@ -4486,7 +4485,7 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
|
|||
int i;
|
||||
redeclaration = newt->num_parms != numparms;
|
||||
|
||||
for (i = 0; i < numparms && i < newt->num_parms; i++)
|
||||
for (i = 0; i < numparms && (unsigned int)i < newt->num_parms; i++)
|
||||
{
|
||||
if (newt->params[i].arraysize != parms[i].arraysize || typecmp(newt->params[i].type, parms[i].type) || strcmp(newt->params[i].paramname, parms[i].paramname))
|
||||
{
|
||||
|
|
|
@ -640,7 +640,6 @@ void QCC_UnmarshalLocals(void)
|
|||
unsigned int maxo;
|
||||
int i;
|
||||
extern int tempsused;
|
||||
QCC_def_t *largestfunc = NULL;
|
||||
|
||||
ofs = numpr_globals;
|
||||
maxo = ofs+locals_marshalled;
|
||||
|
|
|
@ -1692,7 +1692,7 @@ void SV_Heartbeat_f (void)
|
|||
|
||||
#define FOREACHCLIENT(i,cl) \
|
||||
for (i = sv.mvdrecording?-1:0; i < sv.allocated_client_slots; i++) \
|
||||
if (cl = (i==-1?&demo.recorder:&svs.clients[i])) \
|
||||
if ((cl = (i==-1?&demo.recorder:&svs.clients[i]))) \
|
||||
if ((i == -1) || cl->state > cs_zombie)
|
||||
|
||||
void SV_SendServerInfoChange(char *key, const char *value)
|
||||
|
|
|
@ -524,7 +524,7 @@ queryresult_t *SQL_GetQueryResult (sqlserver_t *server, int queryidx, int row)
|
|||
|
||||
qreq = SQL_GetQueryRequest(server, queryidx);
|
||||
for (qres = qreq->results; qres; qres = qres->next)
|
||||
if (qres->request && qres->request->num == queryidx && (row >= qres->firstrow || row == -1 && !qres->firstrow) && row < qres->firstrow + qres->rows)
|
||||
if (qres->request && qres->request->num == queryidx && (row >= qres->firstrow || (row == -1 && !qres->firstrow)) && row < qres->firstrow + qres->rows)
|
||||
return qres;
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue