2004-09-07 18:16:59 +00:00
// this file is shared by the execution and compiler
/*i'm part way through making this work
I ' ve given up now that I can ' t work out a way to load pointers .
Setting them should be fine .
*/
# ifndef __PR_COMP_H__
# define __PR_COMP_H__
2020-06-27 19:32:49 +00:00
# include "progtype.h"
2004-09-07 18:16:59 +00:00
2013-08-27 13:18:09 +00:00
/*
# ifdef USE_MSVCRT_DEBUG
void * BZ_MallocNamed ( int size , char * file , int line ) ;
void * BZ_ReallocNamed ( void * data , int newsize , char * file , int line ) ;
void BZ_Free ( void * data ) ;
# define BZ_Malloc(size) BZ_MallocNamed(size, __FILE__, __LINE__)
# define BZ_Realloc(ptr, size) BZ_ReallocNamed(ptr, size, __FILE__, __LINE__)
# define malloc BZ_Malloc
# define realloc BZ_Realloc
# define free BZ_Free
# endif
*/
2004-09-07 18:16:59 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
typedef int dstring_t ;
# define QCC_string_t dstring_t
2004-09-07 18:16:59 +00:00
2016-08-25 00:12:14 +00:00
# if defined(_MSC_VER) && _MSC_VER < 1300
# define prclocks_t unsigned __int64
# define ull2dbl(x) ((double)(__int64)x)
# else
# define prclocks_t unsigned long long
# define ull2dbl(x) ((double)x)
# endif
2004-09-07 18:16:59 +00:00
//typedef enum {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field, ev_function, ev_pointer, ev_integer, ev_struct, ev_union} etype_t;
// 0 1 2 3 4 5 6 7 8 9 10
# define OFS_NULL 0
# define OFS_RETURN 1
# define OFS_PARM0 4 // leave 3 ofs for each parm to hold vectors
# define OFS_PARM1 7
# define OFS_PARM2 10
# define OFS_PARM3 13
# define OFS_PARM4 16
# define OFS_PARM5 19
# define OFS_PARM6 22
# define OFS_PARM7 25
# define RESERVED_OFS 28
2011-07-08 18:59:48 +00:00
enum qcop_e {
2004-09-07 18:16:59 +00:00
OP_DONE , //0
OP_MUL_F ,
OP_MUL_V ,
OP_MUL_FV ,
OP_MUL_VF ,
OP_DIV_F ,
OP_ADD_F ,
OP_ADD_V ,
OP_SUB_F ,
OP_SUB_V ,
OP_EQ_F , //10
OP_EQ_V ,
OP_EQ_S ,
OP_EQ_E ,
OP_EQ_FNC ,
OP_NE_F ,
OP_NE_V ,
OP_NE_S ,
OP_NE_E ,
OP_NE_FNC ,
2011-07-08 18:59:48 +00:00
OP_LE_F , //20
OP_GE_F ,
OP_LT_F ,
OP_GT_F ,
2004-09-07 18:16:59 +00:00
OP_LOAD_F ,
OP_LOAD_V ,
OP_LOAD_S ,
OP_LOAD_ENT ,
OP_LOAD_FLD ,
OP_LOAD_FNC ,
OP_ADDRESS , //30
OP_STORE_F ,
OP_STORE_V ,
OP_STORE_S ,
OP_STORE_ENT ,
OP_STORE_FLD ,
OP_STORE_FNC ,
OP_STOREP_F ,
OP_STOREP_V ,
OP_STOREP_S ,
OP_STOREP_ENT , //40
OP_STOREP_FLD ,
OP_STOREP_FNC ,
OP_RETURN ,
OP_NOT_F ,
OP_NOT_V ,
OP_NOT_S ,
OP_NOT_ENT ,
OP_NOT_FNC ,
2011-07-08 18:59:48 +00:00
OP_IF_I ,
OP_IFNOT_I , //50
2004-09-07 18:16:59 +00:00
OP_CALL0 , //careful... hexen2 and q1 have different calling conventions
OP_CALL1 , //remap hexen2 calls to OP_CALL2H
OP_CALL2 ,
OP_CALL3 ,
OP_CALL4 ,
OP_CALL5 ,
OP_CALL6 ,
OP_CALL7 ,
OP_CALL8 ,
OP_STATE , //60
OP_GOTO ,
2011-07-08 18:59:48 +00:00
OP_AND_F ,
OP_OR_F ,
2004-09-07 18:16:59 +00:00
2011-07-08 18:59:48 +00:00
OP_BITAND_F ,
OP_BITOR_F ,
2004-09-07 18:16:59 +00:00
//these following ones are Hexen 2 constants.
2013-08-21 06:55:54 +00:00
OP_MULSTORE_F , //66 redundant, for h2 compat
OP_MULSTORE_VF , //67 redundant, for h2 compat
OP_MULSTOREP_F , //68
OP_MULSTOREP_VF , //69
2004-09-07 18:16:59 +00:00
2013-08-21 06:55:54 +00:00
OP_DIVSTORE_F , //70 redundant, for h2 compat
OP_DIVSTOREP_F , //71
2004-09-07 18:16:59 +00:00
2013-08-21 06:55:54 +00:00
OP_ADDSTORE_F , //72 redundant, for h2 compat
OP_ADDSTORE_V , //73 redundant, for h2 compat
OP_ADDSTOREP_F , //74
OP_ADDSTOREP_V , //75
2004-09-07 18:16:59 +00:00
2013-08-21 06:55:54 +00:00
OP_SUBSTORE_F , //76 redundant, for h2 compat
OP_SUBSTORE_V , //77 redundant, for h2 compat
OP_SUBSTOREP_F , //78
OP_SUBSTOREP_V , //79
2004-09-07 18:16:59 +00:00
2020-05-30 12:12:46 +00:00
OP_FETCH_GBL_F , //80 has built-in bounds check
OP_FETCH_GBL_V , //81 has built-in bounds check
OP_FETCH_GBL_S , //82 has built-in bounds check
OP_FETCH_GBL_E , //83 has built-in bounds check
OP_FETCH_GBL_FNC , //84 has built-in bounds check
2004-09-07 18:16:59 +00:00
2013-08-21 06:55:54 +00:00
OP_CSTATE , //85
OP_CWSTATE , //86
2004-09-07 18:16:59 +00:00
2020-05-30 12:12:46 +00:00
OP_THINKTIME , //87 shortcut for OPA.nextthink=time+OPB
2004-09-07 18:16:59 +00:00
2013-09-26 14:36:52 +00:00
OP_BITSETSTORE_F , //88 redundant, for h2 compat
OP_BITSETSTOREP_F , //89
OP_BITCLRSTORE_F , //90
OP_BITCLRSTOREP_F , //91
2004-09-07 18:16:59 +00:00
2020-05-30 12:12:46 +00:00
OP_RAND0 , //92 OPC = random()
OP_RAND1 , //93 OPC = random()*OPA
OP_RAND2 , //94 OPC = random()*(OPB-OPA)+OPA
OP_RANDV0 , //95 //3d/box versions of the above.
2013-08-21 06:55:54 +00:00
OP_RANDV1 , //96
OP_RANDV2 , //97
2004-09-07 18:16:59 +00:00
2020-05-30 12:12:46 +00:00
OP_SWITCH_F , //98 switchref=OPA; PC += OPB --- the jump allows the jump table (such as it is) to be inserted after the block.
2013-08-21 06:55:54 +00:00
OP_SWITCH_V , //99
2004-09-07 18:16:59 +00:00
OP_SWITCH_S , //100
2013-08-21 06:55:54 +00:00
OP_SWITCH_E , //101
OP_SWITCH_FNC , //102
2004-09-07 18:16:59 +00:00
2020-05-30 12:12:46 +00:00
OP_CASE , //103 if (OPA===switchref) PC += OPB
OP_CASERANGE , //104 if (OPA<=switchref&&switchref<=OPB) PC += OPC
2004-09-07 18:16:59 +00:00
//the rest are added
//mostly they are various different ways of adding two vars with conversions.
2020-05-30 12:12:46 +00:00
//hexen2 calling convention (-TH2 requires us to remap OP_CALLX to these on load, -TFTE just uses these directly.)
OP_CALL1H , //OFS_PARM0=OPB
OP_CALL2H , //OFS_PARM0,1=OPB,OPC
OP_CALL3H , //no extra args
2004-09-07 18:16:59 +00:00
OP_CALL4H ,
OP_CALL5H ,
OP_CALL6H , //110
OP_CALL7H ,
OP_CALL8H ,
OP_STORE_I ,
2020-05-30 12:12:46 +00:00
OP_STORE_IF , //OPB.f = (float)OPA.i (makes more sense when written as a->b)
OP_STORE_FI , //OPB.i = (int)OPA.f
2004-09-07 18:16:59 +00:00
OP_ADD_I ,
2020-05-30 12:12:46 +00:00
OP_ADD_FI , //OPC.f = OPA.f + OPB.i
OP_ADD_IF , //OPC.f = OPA.i + OPB.f -- redundant...
2004-09-07 18:16:59 +00:00
2020-05-30 12:12:46 +00:00
OP_SUB_I , //OPC.i = OPA.i - OPB.i
OP_SUB_FI , //120 //OPC.f = OPA.f - OPB.i
OP_SUB_IF , //OPC.f = OPA.i - OPB.f
2020-07-13 17:48:16 +00:00
OP_CONV_ITOF , //OPC.f=(float)OPA.i -- useful mostly so decompilers don't do weird stuff.
2020-05-30 12:12:46 +00:00
OP_CONV_FTOI , //OPC.i=(int)OPA.f
2020-07-13 17:48:16 +00:00
OP_LOADP_ITOF , //OPC.f=(float)(*OPA).i -- fixme: rename to LOADP_ITOF
OP_LOADP_FTOI , //OPC.i=(int)(*OPA).f
2004-09-07 18:16:59 +00:00
OP_LOAD_I ,
OP_STOREP_I ,
2011-07-08 18:59:48 +00:00
OP_STOREP_IF ,
2004-09-07 18:16:59 +00:00
OP_STOREP_FI ,
2011-07-08 18:59:48 +00:00
OP_BITAND_I , //130
2004-09-07 18:16:59 +00:00
OP_BITOR_I ,
OP_MUL_I ,
OP_DIV_I ,
OP_EQ_I ,
OP_NE_I ,
2020-05-30 12:12:46 +00:00
OP_IFNOT_S , //compares string empty, rather than just null.
2009-08-29 14:56:42 +00:00
OP_IF_S ,
2004-09-07 18:16:59 +00:00
2011-07-08 18:59:48 +00:00
OP_NOT_I ,
2004-09-07 18:16:59 +00:00
OP_DIV_VF ,
2015-02-02 08:01:53 +00:00
OP_BITXOR_I , //140
2004-09-07 18:16:59 +00:00
OP_RSHIFT_I ,
OP_LSHIFT_I ,
2020-05-30 12:12:46 +00:00
OP_GLOBALADDRESS , //C.p = &A + B.i*4
OP_ADD_PIW , //C.p = A.p + B.i*4
2004-09-07 18:16:59 +00:00
OP_LOADA_F ,
OP_LOADA_V ,
OP_LOADA_S ,
2011-07-08 18:59:48 +00:00
OP_LOADA_ENT ,
OP_LOADA_FLD ,
OP_LOADA_FNC , //150
2004-09-07 18:16:59 +00:00
OP_LOADA_I ,
2009-08-29 14:56:42 +00:00
OP_STORE_P , //152... erm.. wait...
2004-09-07 18:16:59 +00:00
OP_LOAD_P ,
OP_LOADP_F ,
OP_LOADP_V ,
OP_LOADP_S ,
OP_LOADP_ENT ,
2011-07-08 18:59:48 +00:00
OP_LOADP_FLD ,
2004-09-07 18:16:59 +00:00
OP_LOADP_FNC ,
2011-07-08 18:59:48 +00:00
OP_LOADP_I , //160
2004-09-07 18:16:59 +00:00
OP_LE_I ,
OP_GE_I ,
OP_LT_I ,
OP_GT_I ,
OP_LE_IF ,
OP_GE_IF ,
OP_LT_IF ,
2011-07-08 18:59:48 +00:00
OP_GT_IF ,
2004-09-07 18:16:59 +00:00
OP_LE_FI ,
2011-07-08 18:59:48 +00:00
OP_GE_FI , //170
2004-09-07 18:16:59 +00:00
OP_LT_FI ,
OP_GT_FI ,
OP_EQ_IF ,
OP_EQ_FI ,
//-------------------------------------
//string manipulation.
2012-01-24 04:24:14 +00:00
OP_ADD_SF , //(char*)c = (char*)a + (float)b add_fi->i
OP_SUB_S , //(float)c = (char*)a - (char*)b sub_ii->f
2004-09-07 18:16:59 +00:00
OP_STOREP_C , //(float)c = *(char*)b = (float)a
2011-07-08 18:59:48 +00:00
OP_LOADP_C , //(float)c = *(char*)
2004-09-07 18:16:59 +00:00
//-------------------------------------
OP_MUL_IF ,
2011-07-08 18:59:48 +00:00
OP_MUL_FI , //180
2004-09-07 18:16:59 +00:00
OP_MUL_VI ,
OP_MUL_IV ,
OP_DIV_IF ,
OP_DIV_FI ,
OP_BITAND_IF ,
OP_BITOR_IF ,
OP_BITAND_FI ,
2011-07-08 18:59:48 +00:00
OP_BITOR_FI ,
2004-09-07 18:16:59 +00:00
OP_AND_I ,
2011-07-08 18:59:48 +00:00
OP_OR_I , //190
2004-09-07 18:16:59 +00:00
OP_AND_IF ,
OP_OR_IF ,
OP_AND_FI ,
OP_OR_FI ,
OP_NE_IF ,
OP_NE_FI ,
2004-11-04 04:19:10 +00:00
2020-07-13 17:48:16 +00:00
//fte doesn't really model two separate pointer types. these are thus special-case things for array access only.
2004-09-07 18:16:59 +00:00
OP_GSTOREP_I ,
2011-07-08 18:59:48 +00:00
OP_GSTOREP_F ,
2004-09-07 18:16:59 +00:00
OP_GSTOREP_ENT ,
2013-08-21 06:55:54 +00:00
OP_GSTOREP_FLD , //200
2004-09-07 18:16:59 +00:00
OP_GSTOREP_S ,
2013-08-21 06:55:54 +00:00
OP_GSTOREP_FNC ,
2004-09-07 18:16:59 +00:00
OP_GSTOREP_V ,
2020-07-13 17:48:16 +00:00
OP_GADDRESS , //poorly defined opcode, which makes it too unreliable to actually use.
2004-09-07 18:16:59 +00:00
OP_GLOAD_I ,
OP_GLOAD_F ,
OP_GLOAD_FLD ,
2011-07-08 18:59:48 +00:00
OP_GLOAD_ENT ,
2004-09-07 18:16:59 +00:00
OP_GLOAD_S ,
2011-07-08 18:59:48 +00:00
OP_GLOAD_FNC , //210
2004-09-07 18:16:59 +00:00
2004-11-04 04:19:10 +00:00
//back to ones that we do use.
2013-08-21 06:55:54 +00:00
OP_BOUNDCHECK ,
2012-02-13 09:24:01 +00:00
OP_UNUSED , //used to be OP_STOREP_P, which is now emulated with OP_STOREP_I, fteqcc nor fte generated it
2005-02-28 07:16:19 +00:00
OP_PUSH , //push 4octets onto the local-stack (which is ALWAYS poped on function return). Returns a pointer.
OP_POP , //pop those ones that were pushed (don't over do it). Needs assembler.
2004-11-04 04:19:10 +00:00
2008-10-16 23:04:36 +00:00
OP_SWITCH_I , //hmm.
OP_GLOAD_V ,
2020-05-30 12:12:46 +00:00
//r3349+
OP_IF_F , //compares as an actual float, instead of treating -0 as positive.
2009-08-29 14:56:42 +00:00
OP_IFNOT_F ,
2020-05-30 12:12:46 +00:00
//r5697+
OP_STOREF_V , //3 elements...
OP_STOREF_F , //1 fpu element...
OP_STOREF_S , //1 string reference
OP_STOREF_I , //1 non-string reference/int
2020-08-15 04:31:27 +00:00
//r5744+
OP_STOREP_B , //((char*)b)[(int)c] = (int)a
OP_LOADP_B , //(int)c = *(char*)
2020-09-29 07:09:01 +00:00
//r5768+
//opcodes for 32bit uints
OP_LE_U , //aka GT
OP_LT_U , //aka GE
OP_DIV_U , //don't need mul+add+sub
OP_RSHIFT_U , //lshift is the same for signed+unsigned
//opcodes for 64bit ints
OP_ADD_I64 ,
OP_SUB_I64 ,
OP_MUL_I64 ,
OP_DIV_I64 ,
OP_BITAND_I64 ,
OP_BITOR_I64 ,
OP_BITXOR_I64 ,
OP_LSHIFT_I64I ,
OP_RSHIFT_I64I ,
OP_LE_I64 , //aka GT
OP_LT_I64 , //aka GE
OP_EQ_I64 ,
OP_NE_I64 ,
//extra opcodes for 64bit uints
OP_LE_U64 , //aka GT
OP_LT_U64 , //aka GE
OP_DIV_U64 ,
OP_RSHIFT_U64I ,
//general 64bitness
OP_STORE_I64 ,
OP_STOREP_I64 ,
OP_STOREF_I64 ,
OP_LOAD_I64 ,
OP_LOADA_I64 ,
OP_LOADP_I64 ,
//various conversions for our 64bit types (yay type promotion)
OP_CONV_UI64 , //zero extend
OP_CONV_II64 , //sign extend
OP_CONV_I64I , //truncate
OP_CONV_FD , //extension
OP_CONV_DF , //truncation
OP_CONV_I64F , //logically a promotion (always signed)
OP_CONV_FI64 , //demotion (always signed)
OP_CONV_I64D , //'promotion' (always signed)
OP_CONV_DI64 , //demotion (always signed)
//opcodes for doubles.
OP_ADD_D ,
OP_SUB_D ,
OP_MUL_D ,
OP_DIV_D ,
OP_LE_D ,
OP_LT_D ,
OP_EQ_D ,
OP_NE_D ,
2008-11-09 22:29:28 +00:00
OP_NUMREALOPS ,
/*
These ops are emulated out , always , and are only present in the compiler .
*/
2013-09-26 14:36:52 +00:00
OP_BITSETSTORE_I , //220
OP_BITSETSTOREP_I ,
OP_BITCLRSTORE_I ,
2008-11-09 22:29:28 +00:00
OP_MULSTORE_I ,
OP_DIVSTORE_I ,
OP_ADDSTORE_I ,
OP_SUBSTORE_I ,
OP_MULSTOREP_I ,
OP_DIVSTOREP_I ,
OP_ADDSTOREP_I ,
2013-09-26 14:36:52 +00:00
OP_SUBSTOREP_I , //230
2008-11-09 22:29:28 +00:00
2013-09-26 14:36:52 +00:00
OP_MULSTORE_IF ,
2008-11-09 22:29:28 +00:00
OP_MULSTOREP_IF ,
OP_DIVSTORE_IF ,
OP_DIVSTOREP_IF ,
OP_ADDSTORE_IF ,
OP_ADDSTOREP_IF ,
OP_SUBSTORE_IF ,
OP_SUBSTOREP_IF ,
OP_MULSTORE_FI ,
2013-09-26 14:36:52 +00:00
OP_MULSTOREP_FI , //240
OP_DIVSTORE_FI ,
2008-11-09 22:29:28 +00:00
OP_DIVSTOREP_FI ,
OP_ADDSTORE_FI ,
OP_ADDSTOREP_FI ,
OP_SUBSTORE_FI ,
OP_SUBSTOREP_FI ,
2012-01-17 07:57:46 +00:00
OP_MULSTORE_VI ,
OP_MULSTOREP_VI ,
2012-01-28 10:30:44 +00:00
OP_LOADA_STRUCT ,
2015-04-14 12:24:05 +00:00
OP_LOADP_P ,
2012-02-13 09:24:01 +00:00
OP_STOREP_P ,
2012-01-28 10:30:44 +00:00
2015-02-02 08:01:53 +00:00
OP_BITNOT_F ,
OP_BITNOT_I ,
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2013-06-02 06:03:54 +00:00
OP_EQ_P ,
OP_NE_P ,
OP_LE_P ,
OP_GE_P ,
OP_LT_P ,
OP_GT_P ,
2013-09-26 14:36:52 +00:00
OP_ANDSTORE_F ,
OP_BITCLR_F ,
OP_BITCLR_I ,
2020-09-11 01:18:32 +00:00
OP_BITCLR_V ,
2013-09-26 14:36:52 +00:00
2015-04-27 06:19:33 +00:00
OP_ADD_SI ,
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
OP_ADD_IS ,
2014-04-14 09:16:41 +00:00
OP_ADD_PF ,
OP_ADD_FP ,
OP_ADD_PI ,
OP_ADD_IP ,
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
OP_SUB_SI ,
2014-04-14 09:16:41 +00:00
OP_SUB_PF ,
OP_SUB_PI ,
OP_SUB_PP ,
2015-01-21 18:18:37 +00:00
OP_MOD_F ,
OP_MOD_I ,
2020-09-08 04:44:07 +00:00
OP_MOD_FI ,
OP_MOD_IF ,
2015-01-21 18:18:37 +00:00
OP_MOD_V ,
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
OP_BITXOR_F ,
2015-02-02 08:01:53 +00:00
OP_RSHIFT_F ,
OP_LSHIFT_F ,
2017-08-14 16:38:44 +00:00
OP_RSHIFT_IF ,
OP_LSHIFT_IF ,
OP_RSHIFT_FI ,
OP_LSHIFT_FI ,
2015-02-02 08:01:53 +00:00
2015-04-14 12:24:05 +00:00
OP_AND_ANY ,
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
OP_OR_ANY ,
2015-04-14 12:24:05 +00:00
2016-07-12 00:40:13 +00:00
OP_ADD_EI ,
OP_ADD_EF ,
OP_SUB_EI ,
OP_SUB_EF ,
2017-02-21 23:26:13 +00:00
OP_BITAND_V ,
OP_BITOR_V ,
OP_BITNOT_V ,
OP_BITXOR_V ,
2017-08-14 16:38:44 +00:00
OP_POW_F ,
2020-09-08 04:44:07 +00:00
OP_POW_I ,
OP_POW_FI ,
OP_POW_IF ,
2017-10-12 12:02:25 +00:00
OP_CROSS_V ,
2017-08-14 16:38:44 +00:00
OP_EQ_FLD ,
OP_NE_FLD ,
2020-09-11 01:18:32 +00:00
OP_SPACESHIP_F , //lame
OP_SPACESHIP_S , //basically strcmp.
2020-09-29 07:09:01 +00:00
//uint32 opcodes. they match the int32 ones so emulation is basically swapping them over.
OP_ADD_U ,
OP_SUB_U ,
OP_MUL_U ,
OP_MOD_U , //complex
OP_BITAND_U ,
OP_BITOR_U ,
OP_BITXOR_U ,
OP_BITNOT_U , //BITXOR ~0
OP_BITCLR_U ,
OP_LSHIFT_U , //same as signed (unlike rshift)
OP_GE_U , //LT_U
OP_GT_U , //LE_U
// OP_AND_U,
// OP_OR_U,
OP_EQ_U ,
OP_NE_U ,
//uint64 opcodes. they match the int32 ones so emulation is basically swapping them over.
OP_BITNOT_I64 , //BITXOR ~0
OP_BITCLR_I64 ,
OP_GE_I64 , //LT_I64
OP_GT_I64 , //LE_I64
OP_ADD_U64 ,
OP_SUB_U64 ,
OP_MUL_U64 ,
OP_MOD_U64 , //complex
OP_BITAND_U64 ,
OP_BITOR_U64 ,
OP_BITXOR_U64 ,
OP_BITNOT_U64 , //BITXOR ~0
OP_BITCLR_U64 ,
OP_LSHIFT_U64I ,
OP_GE_U64 , //LT_U64
OP_GT_U64 , //LE_U64
OP_EQ_U64 ,
OP_NE_U64 ,
//generally implemented by forcing to int64.
OP_BITAND_D ,
OP_BITOR_D ,
OP_BITXOR_D ,
OP_BITNOT_D ,
OP_BITCLR_D ,
OP_LSHIFT_DI ,
OP_RSHIFT_DI ,
2023-04-01 12:59:07 +00:00
OP_WSTATE , //for the 'w' part of CWSTATE. will probably never be used, but hey, hexen2...
2017-07-12 08:15:27 +00:00
//special/fake opcodes used by the decompiler.
OPD_GOTO_FORSTART ,
OPD_GOTO_WHILE1 ,
2020-09-29 07:09:01 +00:00
OP_NUMOPS ,
2021-04-14 05:21:04 +00:00
# define OP_BIT_BREAKPOINT 0x8000
2004-09-07 18:16:59 +00:00
} ;
2011-03-04 13:59:06 +00:00
# define MAX_PARMS 8
// qtest structs (used for reordering and not execution)
typedef struct qtest_statement_s
{
unsigned int line ; // line number in source code file
unsigned short op ;
unsigned short a , b , c ;
} qtest_statement_t ;
typedef struct qtest_def_s
{
unsigned int type ; // no DEFGLOBAL found in qtest progs
unsigned int s_name ; // different order!
unsigned int ofs ;
} qtest_def_t ;
typedef struct qtest_function_s
{
int first_statement ;
int unused1 ;
int locals ; // assumed! (always 0 in real qtest progs)
int profile ; // assumed! (always 0 in real qtest progs)
2017-10-12 12:02:25 +00:00
2011-03-04 13:59:06 +00:00
int s_name ;
int s_file ;
2017-10-12 12:02:25 +00:00
2011-03-04 13:59:06 +00:00
int numparms ;
int parm_start ; // different order
int parm_size [ MAX_PARMS ] ; // ints instead of bytes...
} qtest_function_t ;
2004-09-07 18:16:59 +00:00
typedef struct statement16_s
{
unsigned short op ;
unsigned short a , b , c ;
} dstatement16_t ;
typedef struct statement32_s
{
unsigned int op ;
unsigned int a , b , c ;
} dstatement32_t ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define QCC_dstatement16_t dstatement16_t
# define QCC_dstatement32_t dstatement32_t
2004-09-07 18:16:59 +00:00
2015-04-14 12:24:05 +00:00
typedef struct
{
struct QCC_def_s * sym ;
unsigned int ofs ;
struct QCC_type_s * cast ; //the entire sref is considered null if there is no cast, although it *MAY* have an ofs specified if its part of a jump instruction
} QCC_sref_t ;
2014-04-12 03:31:59 +00:00
typedef struct qcc_statement_s
{
2018-09-29 03:40:50 +00:00
unsigned short op ;
# define STF_LOGICOP (1u<<0) //do not bother following when looking for uninitialised variables.
unsigned short flags ;
2015-04-14 12:24:05 +00:00
QCC_sref_t a , b , c ;
unsigned int linenum ;
2014-04-12 03:31:59 +00:00
} QCC_statement_t ;
2004-09-07 18:16:59 +00:00
//these should be the same except the string type
typedef struct ddef16_s
{
unsigned short type ; // if DEF_SAVEGLOBAL bit is set
// the variable needs to be saved in savegames
unsigned short ofs ;
string_t s_name ;
} ddef16_t ;
typedef struct ddef32_s
{
unsigned int type ; // if DEF_SAVEGLOBAL bit is set
// the variable needs to be saved in savegames
unsigned int ofs ;
string_t s_name ;
} ddef32_t ;
typedef void * ddefXX_t ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéíóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2004-09-07 18:16:59 +00:00
typedef struct QCC_ddef16_s
{
unsigned short type ; // if DEF_SAVEGLOBAL bit is set
// the variable needs to be saved in savegames
unsigned short ofs ;
QCC_string_t s_name ;
} QCC_ddef16_t ;
typedef struct QCC_ddef32_s
{
unsigned int type ; // if DEF_SAVEGLOBAL bit is set
// the variable needs to be saved in savegames
unsigned int ofs ;
QCC_string_t s_name ;
} QCC_ddef32_t ;
# define QCC_ddef_t QCC_ddef32_t
# define DEF_SAVEGLOBAL (1<<15)
# define DEF_SHARED (1<<14)
typedef struct
{
int first_statement ; // negative numbers are builtins
int parm_start ;
int locals ; // total ints of parms + locals
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
int profile ; // runtime
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
string_t s_name ;
string_t s_file ; // source file defined in
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
int numparms ;
2020-06-27 19:32:49 +00:00
pbyte parm_size [ MAX_PARMS ] ;
2004-09-07 18:16:59 +00:00
} dfunction_t ;
2014-08-03 14:47:47 +00:00
typedef struct
{
int first_statement ; // negative numbers are builtins
int parm_start ;
int locals ; // total ints of parms + locals
2017-10-12 12:02:25 +00:00
2014-08-03 14:47:47 +00:00
int profile ; //number of qc instructions executed.
2016-08-25 00:12:14 +00:00
prclocks_t profiletime ; //total time inside (cpu cycles)
prclocks_t profilechildtime ; //time inside children (excluding builtins, cpu cycles)
2017-10-12 12:02:25 +00:00
2014-08-03 14:47:47 +00:00
string_t s_name ;
string_t s_file ; // source file defined in
2017-10-12 12:02:25 +00:00
2014-08-03 14:47:47 +00:00
int numparms ;
2020-06-27 19:32:49 +00:00
pbyte parm_size [ MAX_PARMS ] ;
2014-08-03 14:47:47 +00:00
} mfunction_t ;
2011-03-04 13:59:06 +00:00
# define PROG_QTESTVERSION 3
2004-09-07 18:16:59 +00:00
# define PROG_VERSION 6
2005-02-28 07:16:19 +00:00
# define PROG_KKQWSVVERSION 7
# define PROG_EXTENDEDVERSION 7
2017-01-29 13:10:53 +00:00
# define PROG_SECONDARYVERSION16 ((('1'<<0)|('F'<<8)|('T'<<16)|('E'<<24))^(('P'<<0)|('R'<<8)|('O'<<16)|('G'<<24))) //something unlikly and still meaningful (to me)
# define PROG_SECONDARYVERSION32 ((('1'<<0)|('F'<<8)|('T'<<16)|('E'<<24))^(('3'<<0)|('2'<<8)|('B'<<16)|(' '<<24))) //something unlikly and still meaningful (to me)
2020-07-01 05:32:21 +00:00
# define PROG_SECONDARYUHEXEN2 ((('U'<<0)|('H'<<8)|('2'<<16)|('7'<<24))) //something unlikly and still meaningful (to me)
# define PROG_SECONDARYKKQWSV ((('K'<<0)|('K'<<8)|('Q'<<16)|('W'<<24))) //something unlikly and still meaningful (to me)
2004-09-07 18:16:59 +00:00
typedef struct
{
int version ;
int crc ; // check of header file
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
unsigned int ofs_statements ; //comp 1
unsigned int numstatements ; // statement 0 is an error
unsigned int ofs_globaldefs ; //comp 2
unsigned int numglobaldefs ;
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
unsigned int ofs_fielddefs ; //comp 4
unsigned int numfielddefs ;
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
unsigned int ofs_functions ; //comp 8
unsigned int numfunctions ; // function 0 is an empty
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
unsigned int ofs_strings ; //comp 16
unsigned int numstrings ; // first string is a null string
unsigned int ofs_globals ; //comp 32
unsigned int numglobals ;
2017-10-12 12:02:25 +00:00
2004-09-07 18:16:59 +00:00
unsigned int entityfields ;
//debug / version 7 extensions
unsigned int ofsfiles ; //non list format. no comp
unsigned int ofslinenums ; //numstatements big //comp 64
unsigned int ofsbodylessfuncs ; //no comp
unsigned int numbodylessfuncs ;
unsigned int ofs_types ; //comp 128
unsigned int numtypes ;
unsigned int blockscompressed ;
int secondaryversion ; //Constant - to say that any version 7 progs are actually ours, not someone else's alterations.
} dprograms_t ;
2010-07-11 10:53:13 +00:00
# define standard_dprograms_t_size ((size_t)&((dprograms_t*)NULL)->ofsfiles)
2004-09-07 18:16:59 +00:00
typedef struct {
char filename [ 128 ] ;
int size ;
int compsize ;
int compmethod ;
int ofs ;
} includeddatafile_t ;
typedef struct typeinfo_s
{
etype_t type ;
int next ;
int aux_type ;
int num_parms ;
int ofs ; //inside a structure.
int size ;
2010-07-11 10:53:13 +00:00
string_t name ;
2004-09-07 18:16:59 +00:00
} typeinfo_t ;
2016-09-08 19:04:35 +00:00
# endif