r3820 - in trunk/data: . qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jul 13 14:22:27 EDT 2008


Author: blub0
Date: 2008-07-13 14:22:27 -0400 (Sun, 13 Jul 2008)
New Revision: 3820

Added:
   trunk/data/qcsrc/client/pre.qh
Modified:
   trunk/data/Makefile
   trunk/data/qcsrc/client/Main.qc
   trunk/data/qcsrc/client/mapvoting.qc
   trunk/data/qcsrc/client/progs.src
Log:
Changed mapvoting to use %i. instead of %i) as SavageX requested :P
Added pre.qh which enables the FTE target if -DUSE_FTE is added
which automagically adds an engine check, which should be updated
once the FTE instructions make it into DP.
Updated the Makefile for that too.


Modified: trunk/data/Makefile
===================================================================
--- trunk/data/Makefile	2008-07-13 17:42:30 UTC (rev 3819)
+++ trunk/data/Makefile	2008-07-13 18:22:27 UTC (rev 3820)
@@ -3,14 +3,9 @@
 PK3NAME ?= `date +../data%Y%m%d.pk3`
 ZIP ?= 7za a -tzip -mx=9
 
-# -Fparm: define PARM0, RETURN, etc. for use in asm{}
-# This will make it possible to make a non-FTE asm{} block
-# checking if the client's engine supports -TFTE.
-# At some point CSQC should use -TFTE too, and then, for at least
-# some time, it would be useful to have a well-formatted error message
-# followed by localcmd("disconnect") if the client doesn't support -TFTE
-# instead of letting him guess what the huge QCVM error message means...
-QCFLAGS_CSQC ?= -Fparm
+# NOTE: use -DUSE_FTE instead of -TFTE here!
+# It will automagically add an engine check with -TID and then change back to -TFTE
+QCFLAGS_CSQC ?= 
 
 # to be enabled when possible
 # QCFLAGS_SVQC ?= -TFTE

Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc	2008-07-13 17:42:30 UTC (rev 3819)
+++ trunk/data/qcsrc/client/Main.qc	2008-07-13 18:22:27 UTC (rev 3820)
@@ -27,18 +27,16 @@
 
 void CSQC_Init(void)
 {
-#if 0
-	asm {
-		STORE_F "DP_SV_WRITEPICTURE" PARM0;
-		CALL1 checkextension;
-		STORE_F RETURN __engine_check;
-		IF __engine_check 6;
-		STORE_F "^3Your engine build is outdated\n^3This Server uses a newer QC VM. Please update!\n" PARM0;
-		CALL1 print;
-		STORE_F "\ndisconnect\n" PARM0;
-		CALL1 localcmd;
-		DONE;
+#ifdef USE_FTE
+#pragma target ID
+	__engine_check = checkextension("DP_SV_WRITEPICTURE");
+	if(!__engine_check)
+	{
+		print("^3Your engine build is outdated\n^3This Server uses a newer QC VM. Please update!\n");
+		localcmd("\ndisconnect\n");
+		return;
 	}
+#pragma target FTE
 #else
 	__engine_check = true;
 #endif

Modified: trunk/data/qcsrc/client/mapvoting.qc
===================================================================
--- trunk/data/qcsrc/client/mapvoting.qc	2008-07-13 17:42:30 UTC (rev 3819)
+++ trunk/data/qcsrc/client/mapvoting.qc	2008-07-13 18:22:27 UTC (rev 3820)
@@ -24,9 +24,9 @@
 	pos_y += img_size_y*0.5;
 
 	if(id == mv_ownvote)
-		drawstring(pos - '40 0', strcat(ftos(id+1), ")"), img_size, '1 1 0', 1, DRAWFLAG_NORMAL);
+		drawstring(pos - '40 0', strcat(ftos(id+1), "."), img_size, '1 1 0', 1, DRAWFLAG_NORMAL);
 	else
-		drawstring(pos - '40 0', strcat(ftos(id+1), ")"), img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
+		drawstring(pos - '40 0', strcat(ftos(id+1), "."), img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
 
 	// half again for the mapname
 	img_size = img_size * 0.5; // *= broken???
@@ -57,9 +57,9 @@
 	pos_y += img_size_y*0.5;
 
 	if(id == mv_ownvote)
-		drawstring(pos - '40 0', strcat(ftos(id+1), ")"), img_size, '1 1 0', 1, DRAWFLAG_NORMAL);
+		drawstring(pos - '40 0', strcat(ftos(id+1), "."), img_size, '1 1 0', 1, DRAWFLAG_NORMAL);
 	else
-		drawstring(pos - '40 0', strcat(ftos(id+1), ")"), img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
+		drawstring(pos - '40 0', strcat(ftos(id+1), "."), img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
 	
 	img_size = img_size * 0.5; // *= broken???
 	pos_y += img_size_y*0.5;
@@ -81,9 +81,9 @@
 	pos_y += img_size_y*0.5;
 
 	if(id == mv_ownvote)
-		drawstring(pos - '40 0', strcat(ftos(id+1), ")"), img_size, '1 1 0', 1, DRAWFLAG_NORMAL);
+		drawstring(pos - '40 0', strcat(ftos(id+1), "."), img_size, '1 1 0', 1, DRAWFLAG_NORMAL);
 	else
-		drawstring(pos - '40 0', strcat(ftos(id+1), ")"), img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
+		drawstring(pos - '40 0', strcat(ftos(id+1), "."), img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
 	
 	img_size = img_size * 0.5; // *= broken???
 	pos_y += img_size_y*0.5;

Added: trunk/data/qcsrc/client/pre.qh
===================================================================
--- trunk/data/qcsrc/client/pre.qh	                        (rev 0)
+++ trunk/data/qcsrc/client/pre.qh	2008-07-13 18:22:27 UTC (rev 3820)
@@ -0,0 +1,3 @@
+#ifdef USE_FTE
+#pragma target FTE
+#endif

Modified: trunk/data/qcsrc/client/progs.src
===================================================================
--- trunk/data/qcsrc/client/progs.src	2008-07-13 17:42:30 UTC (rev 3819)
+++ trunk/data/qcsrc/client/progs.src	2008-07-13 18:22:27 UTC (rev 3820)
@@ -1,4 +1,5 @@
 ../../csprogs.dat
+pre.qh
 
 Defs.qc
 csqc_constants.qc




More information about the nexuiz-commits mailing list