SCM := $(shell if [ -d .svn ]; then echo svn; elif [ -d ../.git ]; then echo git; fi)
PERL ?= perl
-
-ifdef XONOTIC_USE_FTEQCC
-FTEQCC ?= gmqcc
-FTEQCCFLAGS_WATERMARK ?=
-FTEQCCFLAGS ?= -std=fteqcc -fshort-logic -O1 -flno $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
-FTEQCCFLAGS_PROGS ?=
-FTEQCCFLAGS_MENU ?=
+QCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"' -DCVAR_POPCON=1
+QCC ?= fteqcc
+
+VERSION_MESSAGE = $(shell $(QCC) --version --help)
+ifneq (,$(findstring gmqcc,$(VERSION_MESSAGE)))
+# this is gmqcc
+QCCFLAGS_WATERMARK =
+QCCFLAGS ?= -Werror -Wall -Wno-field-redeclared -Wno-double-declaration -Wno-assign-function-types -Wno-unused-variable -std=fteqcc -fshort-logic -O1 -flno $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
else
-FTEQCC ?= fteqcc
-FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"' -DCVAR_POPCON
-FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-return_only -fno-fastarrays $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
-FTEQCCFLAGS_PROGS ?=
-FTEQCCFLAGS_MENU ?=
+# this. is. fteqccccccccccccccccccc!
+QCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-return_only -fno-fastarrays $(QCCFLAGS_EXTRA) $(QCCFLAGS_WATERMARK)
endif
-# NOTE: use -DUSE_FTE instead of -TFTE here!
-# It will automagically add an engine check with -TID and then change back to -TFTE
-FTEQCCFLAGS_CSPROGS ?=
-
# xonotic build system overrides this by command line argument to turn off the update-cvarcount step
XON_BUILDSYSTEM =
FILES_CSPROGS = $(shell find client common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
../csprogs.dat: $(FILES_CSPROGS)
@echo make[1]: Entering directory \`$(PWD)/client\'
- cd client && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_CSPROGS)
+ cd client && $(QCC) $(QCCFLAGS)
FILES_PROGS = $(shell find server common warpzonelib csqcmodellib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
../progs.dat: $(FILES_PROGS)
@echo make[1]: Entering directory \`$(PWD)/server\'
- cd server && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_PROGS)
+ cd server && $(QCC) $(QCCFLAGS)
FILES_MENU = $(shell find menu common warpzonelib -type f -not -name fteqcc.log -not -name qc.asm) $(wildcard server/w_*.qc)
../menu.dat: $(FILES_MENU)
@echo make[1]: Entering directory \`$(PWD)/menu\'
- cd menu && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_MENU)
+ cd menu && $(QCC) $(QCCFLAGS)
.PHONY: testcase
testcase:
- cd testcase && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_CSPROGS) -DTESTCASE="$$TESTCASE"
+ cd testcase && $(QCC) $(QCCFLAGS) -DTESTCASE="$$TESTCASE"
float cvar_settemp_restore()
{
- float i;
- entity e;
+ float i = 0;
+ entity e = world;
while((e = find(e, classname, "saved_cvar_value")))
{
if(cvar_type(e.netname))
if(argv(0) == "directmenu" || argv(0) == "directpanelhudmenu")
{
- string filter;
+ string filter = string_null;
if(argv(0) == "directpanelhudmenu")
filter = strzone("HUD");
float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
{
- float nexposeeKey;
+ float nexposeeKey = 0;
if(me.animationState == 2)
if(SUPER(Nexposee).keyDown(me, scan, ascii, shift))
return 1;
void XonoticCampaignList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
{
string s;
- float p;
vector theColor;
float theAlpha;
float j, n;
if(isSelected)
draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
- s = ftos(p);
if(draw_PictureSize(strcat("/maps/", campaign_mapname[i])) == '0 0 0')
draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
else
return 1;
}
else if(scan == K_ENTER)
+ {
me.cvarValueBox.parent.setFocus(me.cvarValueBox.parent, me.cvarValueBox);
+ return 1;
+ }
else if(SUPER(XonoticCvarList).keyDown(me, scan, ascii, shift))
return 1;
else if(!me.controlledTextbox)
void InstantAction_LoadMap(entity btn, entity dummy)
{
- float pmin, pmax, pstep;
+ float pmin = 2, pmax = 16, pstep = 1;
cvar_set("timelimit_override", "10");
cvar_set("g_lms_lives_override", "9");
else if(included)
draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
- s = ftos(p);
if(draw_PictureSize(strcat("/maps/", MapInfo_Map_bspname)) == '0 0 0')
draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
else
{
main.serverInfoDialog.loadServerInfo(main.serverInfoDialog, me.selectedItem);
DialogOpenButton_Click_withCoords(me, main.serverInfoDialog, org, sz);
+ return 1;
}
+ return 0;
}
else if(scan == K_INS || scan == K_MOUSE3 || scan == K_KP_INS)
{
{
ToggleFavorite(me.selectedServer);
me.ipAddressBoxFocused = -1;
+ return 1;
}
+ return 0;
}
else if(SUPER(XonoticServerList).keyDown(me, scan, ascii, shift))
return 1;