2013-04-02 05:18:17 +00:00
# if !defined(MINIMAL) && !defined(OMIT_QCC)
2004-08-23 01:38:21 +00:00
# include "qcc.h"
2005-04-02 18:00:45 +00:00
# include "time.h"
2004-08-23 01:38:21 +00:00
# define MEMBERFIELDNAME "__m%s"
2018-05-28 21:09:15 +00:00
# define STRCMP(s1,s2) (((*s1)!=(*s2)) || strcmp(s1,s2)) //saves about 2-6 out of 120 - expansion of idea from fastqcc
2004-08-23 01:38:21 +00:00
2014-05-16 01:34:58 +00:00
void QCC_PR_PreProcessor_Define ( pbool append ) ;
2019-01-20 01:00:18 +00:00
pbool QCC_PR_UndefineName ( const char * name ) ;
const char * QCC_PR_CheckCompConstString ( const char * def ) ;
CompilerConstant_t * QCC_PR_CheckCompConstDefined ( const char * def ) ;
2014-05-16 01:34:58 +00:00
int QCC_PR_CheckCompConst ( void ) ;
2019-01-20 01:00:18 +00:00
pbool QCC_Include ( const char * filename ) ;
2015-04-14 12:24:05 +00:00
void QCC_FreeDef ( QCC_def_t * def ) ;
2021-05-27 11:34:22 +00:00
void QCC_PR_LexComment ( char * * comment ) ;
2004-08-23 01:38:21 +00:00
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
extern pbool destfile_explicit ;
extern char destfile [ 1024 ] ;
2020-08-03 10:34:44 +00:00
//static const QCC_sref_t nullsref = {0};
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
2016-02-10 23:23:43 +00:00
# define MAXINCLUDEDIRS 8
char qccincludedir [ MAXINCLUDEDIRS ] [ 256 ] ; //the -src path, for #includes
2017-08-14 16:38:44 +00:00
struct qccincludeonced_s
{
struct qccincludeonced_s * next ;
char name [ 1 ] ;
} * qccincludeonced ; //the -src path, for #includes
2016-02-10 23:23:43 +00:00
2004-08-23 01:38:21 +00:00
char * compilingfile ;
int pr_source_line ;
char * pr_file_p ;
char * pr_line_start ; // start of current source line
int pr_bracelevel ;
2021-05-27 11:34:22 +00:00
char * pr_token_precomment ;
2004-08-23 01:38:21 +00:00
char pr_token [ 8192 ] ;
token_type_t pr_token_type ;
2012-11-27 03:23:19 +00:00
int pr_token_line ;
int pr_token_line_last ;
2004-08-23 01:38:21 +00:00
QCC_type_t * pr_immediate_type ;
2020-09-29 07:09:01 +00:00
QCC_eval_t pr_immediate ;
2004-08-23 01:38:21 +00:00
char pr_immediate_string [ 8192 ] ;
2016-07-12 00:40:13 +00:00
size_t pr_immediate_strlen ;
2004-08-23 01:38:21 +00:00
int pr_error_count ;
2005-12-16 17:15:43 +00:00
int pr_warning_count ;
2004-08-23 01:38:21 +00:00
2008-11-09 22:29:28 +00:00
extern pbool expandedemptymacro ;
2004-08-23 01:38:21 +00:00
2014-09-08 23:35:32 +00:00
//really these should not be in here
extern unsigned int locals_end , locals_start ;
extern QCC_type_t * pr_classtype ;
2016-10-22 07:06:51 +00:00
QCC_function_t * QCC_PR_ParseImmediateStatements ( QCC_def_t * def , QCC_type_t * type , pbool dowrap ) ;
2020-09-11 01:18:32 +00:00
QCC_type_t * QCC_PR_FieldType ( QCC_type_t * pointsto ) ;
2004-08-23 01:38:21 +00:00
2013-06-13 22:45:15 +00:00
static void Q_strlcpy ( char * dest , const char * src , int sizeofdest )
{
if ( sizeofdest )
{
int slen = strlen ( src ) ;
slen = min ( ( sizeofdest - 1 ) , slen ) ;
memcpy ( dest , src , slen ) ;
dest [ slen ] = 0 ;
}
}
2004-08-23 01:38:21 +00:00
char * pr_punctuation [ ] =
// longer symbols must be before a shorter partial match
2020-09-11 01:18:32 +00:00
{ " && " , " || " , " <=> " , " <= " , " >= " , " == " , " != " , " /= " , " *= " , " += " , " -= " , " (+) " , " (-) " , " |= " , " &~= " , " &= " , " ++ " , " -- " , " -> " , " ^= " , " :: " , " ; " , " , " , " ! " , " *^ " , " * " , " / " , " ( " , " ) " , " - " , " + " , " = " , " [ " , " ] " , " { " , " } " , " ... " , " .. " , " . " , " >< " , " <<= " , " << " , " < " , " >>= " , " >> " , " > " , " ? " , " # " , " @ " , " & " , " | " , " % " , " ^^ " , " ^ " , " ~ " , " : " , NULL } ;
2004-11-18 17:55:04 +00:00
char * pr_punctuationremap [ ] = //a nice bit of evilness.
2008-11-09 22:29:28 +00:00
//(+) -> |=
2004-11-18 17:55:04 +00:00
//-> -> .
2008-11-09 22:29:28 +00:00
//(-) -> &~=
2020-09-11 01:18:32 +00:00
{ " && " , " || " , " <=> " , " <= " , " >= " , " == " , " != " , " /= " , " *= " , " += " , " -= " , " |= " , " &~= " , " |= " , " &~= " , " &= " , " ++ " , " -- " , " . " , " ^= " , " :: " , " ; " , " , " , " ! " , " *^ " , " * " , " / " , " ( " , " ) " , " - " , " + " , " = " , " [ " , " ] " , " { " , " } " , " ... " , " .. " , " . " , " >< " , " <<= " , " << " , " < " , " >>= " , " >> " , " > " , " ? " , " # " , " @ " , " & " , " | " , " % " , " ^^ " , " ^ " , " ~ " , " : " , NULL } ;
2004-08-23 01:38:21 +00:00
// simple types. function types are dynamically allocated
2014-04-03 02:39:51 +00:00
QCC_type_t * type_void ; //void
QCC_type_t * type_string ; //string
QCC_type_t * type_float ; //float
2020-09-29 07:09:01 +00:00
QCC_type_t * type_double ; //double
2014-04-03 02:39:51 +00:00
QCC_type_t * type_vector ; //vector
QCC_type_t * type_entity ; //entity
QCC_type_t * type_field ; //.void
QCC_type_t * type_function ; //void()
QCC_type_t * type_floatfunction ; //float()
QCC_type_t * type_pointer ; //??? * - careful with this one
2020-09-29 07:09:01 +00:00
QCC_type_t * type_integer ; //int32
QCC_type_t * type_uint ; //uint32
QCC_type_t * type_int64 ; //int64
QCC_type_t * type_uint64 ; //uint64
2014-04-03 02:39:51 +00:00
QCC_type_t * type_variant ; //__variant
2023-01-09 05:13:12 +00:00
QCC_type_t * type_invalid ; //technically void, but shouldn't really ever be used.
2014-04-03 02:39:51 +00:00
QCC_type_t * type_floatpointer ; //float *
QCC_type_t * type_intpointer ; //int *
2020-09-29 07:09:01 +00:00
QCC_type_t * type_bint ; //int (0 or 1)
QCC_type_t * type_bfloat ; //float (0.0 or 1.0, and never -0.0)
2004-08-23 01:38:21 +00:00
QCC_type_t * type_floatfield ; // = {ev_field/*, &def_field*/, NULL, &type_float};
QCC_def_t def_ret , def_parms [ MAX_PARMS ] ;
//QCC_def_t *def_for_type[9] = {&def_void, &def_string, &def_float, &def_vector, &def_entity, &def_field, &def_function, &def_pointer, &def_integer};
2013-12-29 22:48:28 +00:00
void QCC_PR_LexWhitespace ( pbool inhibitpreprocessor ) ;
2004-08-23 01:38:21 +00:00
2018-07-14 18:50:20 +00:00
QCC_type_t * QCC_PR_ParseEnum ( pbool flags ) ;
2004-08-23 01:38:21 +00:00
//for compiler constants and file includes.
qcc_includechunk_t * currentchunk ;
------------------------------------------------------------------------
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
void QCC_PR_CloseProcessor ( void )
{
2016-02-10 23:23:43 +00:00
int i ;
for ( i = 0 ; i < MAXINCLUDEDIRS ; i + + )
* qccincludedir [ i ] = 0 ;
------------------------------------------------------------------------
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
currentchunk = NULL ;
2017-08-14 16:38:44 +00:00
qccincludeonced = NULL ;
------------------------------------------------------------------------
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
}
2016-02-15 06:01:17 +00:00
void QCC_PR_AddIncludePath ( const char * newinc )
2016-02-10 23:23:43 +00:00
{
int i ;
2016-09-08 19:04:35 +00:00
if ( ! * newinc )
{
2017-08-14 16:38:44 +00:00
newinc = " . " ;
// QCC_PR_ParseWarning(WARN_STRINGTOOLONG, "Invalid include path.");
// return;
2016-09-08 19:04:35 +00:00
}
2017-08-14 16:38:44 +00:00
2016-02-10 23:23:43 +00:00
for ( i = 0 ; i < MAXINCLUDEDIRS ; i + + )
{
if ( ! * qccincludedir [ i ] )
{
2018-10-13 06:20:49 +00:00
pbool trunc ;
2016-09-08 19:04:35 +00:00
const char * e = newinc + strlen ( newinc ) - 1 ;
2018-10-13 06:20:49 +00:00
trunc = ! QC_strlcpy ( qccincludedir [ i ] , newinc , sizeof ( qccincludedir ) ) ;
2016-09-08 19:04:35 +00:00
if ( * e ! = ' / ' & & * e ! = ' \\ ' )
2018-10-13 06:20:49 +00:00
trunc | = ! QC_strlcat ( qccincludedir [ i ] , " / " , sizeof ( qccincludedir ) ) ;
if ( trunc )
{
QCC_PR_ParseWarning ( WARN_STRINGTOOLONG , " Include path too long. " ) ;
* qccincludedir [ i ] = 0 ;
}
2016-02-10 23:23:43 +00:00
break ;
}
if ( ! strcmp ( qccincludedir [ i ] , newinc ) )
break ;
}
if ( i = = MAXINCLUDEDIRS )
{
2016-09-08 19:04:35 +00:00
QCC_PR_ParseWarning ( WARN_STRINGTOOLONG , " Too many include dirs. Ignoring and hoping the stars align. " ) ;
2016-02-10 23:23:43 +00:00
}
}
2016-09-08 19:04:35 +00:00
static void QCC_PR_IncludeChunkEx ( char * data , pbool duplicate , char * filename , CompilerConstant_t * cnst )
2004-08-23 01:38:21 +00:00
{
qcc_includechunk_t * chunk = qccHunkAlloc ( sizeof ( qcc_includechunk_t ) ) ;
chunk - > prev = currentchunk ;
currentchunk = chunk ;
chunk - > currentdatapoint = pr_file_p ;
2017-08-14 16:38:44 +00:00
chunk - > currentfilename = s_filen ;
2004-08-23 01:38:21 +00:00
chunk - > currentlinenumber = pr_source_line ;
2008-01-27 01:14:44 +00:00
chunk - > cnst = cnst ;
if ( cnst )
{
2017-08-14 16:38:44 +00:00
#if 0
s_filen = cnst - > fromfile ;
pr_source_line = cnst - > fromline ;
# else
int b = strlen ( s_filen ) + 1 + 8 + strlen ( cnst - > name ) ;
char * p ;
if ( b > 128 )
b = 128 ;
s_filen = p = qccHunkAlloc ( b ) ;
QC_snprintfz ( p , b , " %s:%i:%s " , chunk - > currentfilename , chunk - > currentlinenumber , cnst - > name ) ;
pr_source_line = 1 ;
# endif
2008-01-27 01:14:44 +00:00
cnst - > inside + + ;
}
2018-08-04 15:12:51 +00:00
else
pr_source_line = 1 ;
2004-08-23 01:38:21 +00:00
if ( duplicate )
{
pr_file_p = qccHunkAlloc ( strlen ( data ) + 1 ) ;
strcpy ( pr_file_p , data ) ;
}
else
pr_file_p = data ;
2017-08-14 16:38:44 +00:00
chunk - > datastart = pr_file_p ;
2004-08-23 01:38:21 +00:00
}
2008-01-27 01:14:44 +00:00
void QCC_PR_IncludeChunk ( char * data , pbool duplicate , char * filename )
{
QCC_PR_IncludeChunkEx ( data , duplicate , filename , NULL ) ;
}
2004-08-23 01:38:21 +00:00
pbool QCC_PR_UnInclude ( void )
{
if ( ! currentchunk )
return false ;
2008-01-27 01:14:44 +00:00
if ( currentchunk - > cnst )
currentchunk - > cnst - > inside - - ;
2004-08-23 01:38:21 +00:00
pr_file_p = currentchunk - > currentdatapoint ;
pr_source_line = currentchunk - > currentlinenumber ;
2017-08-14 16:38:44 +00:00
s_filen = currentchunk - > currentfilename ;
2004-08-23 01:38:21 +00:00
currentchunk = currentchunk - > prev ;
return true ;
}
2021-02-08 10:59:53 +00:00
//expresses a relative path relative to an existing FILEname. any directories in base must be / terminated properly.
void QCC_JoinPaths ( char * fullname , size_t fullnamesize , const char * newfile , const char * base )
2005-08-27 05:45:45 +00:00
{
2021-02-08 10:59:53 +00:00
char * end ;
2017-08-14 16:38:44 +00:00
2021-02-08 10:59:53 +00:00
if ( * newfile = = ' / ' | | * newfile = = ' \\ ' )
{ //its an absolute path...
QC_strlcpy ( fullname , newfile , fullnamesize ) ;
return ;
2006-03-23 19:22:12 +00:00
}
2021-02-08 10:59:53 +00:00
QC_strlcpy ( fullname , base , fullnamesize ) ;
2012-11-27 03:23:19 +00:00
end = fullname + strlen ( fullname ) ;
2011-05-20 04:10:46 +00:00
while ( end > fullname )
2005-08-27 05:45:45 +00:00
{
2011-05-20 04:10:46 +00:00
end - - ;
if ( * end = = ' / ' | | * end = = ' \\ ' )
2006-03-23 19:22:12 +00:00
{
2021-02-08 10:59:53 +00:00
end + + ;
break ;
2006-03-23 19:22:12 +00:00
}
2005-08-27 05:45:45 +00:00
}
2021-02-08 10:59:53 +00:00
QC_strlcpy ( end , newfile , fullnamesize - ( end - fullname ) ) ;
2011-05-20 04:10:46 +00:00
2021-02-08 10:59:53 +00:00
//FIXME: do we want to convert /segment/../ into just / ?
//fteqw might insist on it for its filesystem sandboxing.
//but it breaks symlink weirdness (itself a possible security hole).
//should probably be a separate function.
2016-02-10 23:23:43 +00:00
}
extern char qccmsourcedir [ ] ;
//also meant to include it.
2022-08-08 22:45:19 +00:00
void QCC_FindBestInclude ( char * newfile , char * currentfile , pbool includetype )
2016-02-10 23:23:43 +00:00
{
2017-08-14 16:38:44 +00:00
struct qccincludeonced_s * onced ;
2016-02-10 23:23:43 +00:00
int includepath = 0 ;
char fullname [ 1024 ] ;
if ( ! * newfile )
return ;
while ( 1 )
{
if ( includepath )
{
if ( includepath > MAXINCLUDEDIRS | | ! * qccincludedir [ includepath - 1 ] )
QCC_Error ( ERR_COULDNTOPENFILE , " Couldn't open file %s " , newfile ) ;
currentfile = qccincludedir [ includepath - 1 ] ;
}
2021-02-08 10:59:53 +00:00
QCC_JoinPaths ( fullname , sizeof ( fullname ) , newfile , currentfile ) ;
2016-02-10 23:23:43 +00:00
{
extern progfuncs_t * qccprogfuncs ;
if ( qccprogfuncs - > funcs . parms - > FileSize ( fullname ) = = - 1 )
{
includepath + + ;
continue ;
}
}
break ;
}
2005-08-27 05:45:45 +00:00
2017-08-14 16:38:44 +00:00
for ( onced = qccincludeonced ; onced ; onced = onced - > next )
{
if ( ! strcmp ( onced - > name , fullname ) )
return ;
}
2022-08-08 22:45:19 +00:00
if ( includetype & & verbose > = VERBOSE_PROGRESS )
2013-06-13 22:45:15 +00:00
{
2022-08-08 22:45:19 +00:00
if ( includetype = = 2 )
2016-09-08 19:04:35 +00:00
{
if ( autoprototype )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " prototyping %s \n " , fullname ) ;
2016-09-08 19:04:35 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " compiling %s \n " , fullname ) ;
2016-09-08 19:04:35 +00:00
}
2013-06-13 22:45:15 +00:00
else
2016-09-08 19:04:35 +00:00
{
if ( autoprototype )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " prototyping include %s \n " , fullname ) ;
2016-09-08 19:04:35 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " including %s \n " , fullname ) ;
2016-09-08 19:04:35 +00:00
}
2013-06-13 22:45:15 +00:00
}
2005-08-27 05:45:45 +00:00
QCC_Include ( fullname ) ;
}
2010-05-01 22:47:47 +00:00
pbool defaultnoref ;
2016-01-18 05:22:07 +00:00
pbool defaultnosave ;
2009-03-29 23:47:29 +00:00
pbool defaultstatic ;
2004-08-23 01:38:21 +00:00
int ForcedCRC ;
2021-04-14 05:21:04 +00:00
float qcc_framerate ;
2004-08-23 01:38:21 +00:00
int QCC_PR_LexInteger ( void ) ;
void QCC_AddFile ( char * filename ) ;
void QCC_PR_LexString ( void ) ;
pbool QCC_PR_SimpleGetToken ( void ) ;
2016-09-08 19:04:35 +00:00
pbool QCC_PR_SimpleGetString ( void ) ;
2005-02-28 07:16:19 +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
# define PPI_VALUE 0
# define PPI_NOT 1
# define PPI_DEFINED 2
# define PPI_COMPARISON 3
# define PPI_LOGICAL 4
# define PPI_TOPLEVEL 5
2018-10-11 10:31:23 +00:00
static int ParsePrecompilerIf ( int level )
2008-10-16 23:04:36 +00:00
{
CompilerConstant_t * c ;
2011-05-15 13:23:13 +00:00
int eval = 0 ;
2013-03-12 22:47:42 +00:00
// pbool notted = false;
------------------------------------------------------------------------
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
//single term end-of-chain
if ( level = = PPI_VALUE )
2011-11-08 06:00:35 +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
/*skip whitespace*/
while ( * pr_file_p & & qcc_iswhite ( * pr_file_p ) & & * pr_file_p ! = ' \n ' )
2011-11-08 06:00:35 +00:00
{
pr_file_p + + ;
}
2008-10-16 23:04:36 +00:00
if ( * pr_file_p = = ' ( ' )
------------------------------------------------------------------------
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
{ //try brackets
2011-11-08 06:00:35 +00:00
pr_file_p + + ;
------------------------------------------------------------------------
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
eval = ParsePrecompilerIf ( PPI_TOPLEVEL ) ;
2008-10-16 23:04:36 +00:00
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
pr_file_p + + ;
if ( * pr_file_p ! = ' ) ' )
QCC_PR_ParseError ( ERR_EXPECTED , " unclosed bracket condition \n " ) ;
2011-11-08 06:00:35 +00:00
pr_file_p + + ;
2008-10-16 23:04:36 +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
else if ( * pr_file_p = = ' ! ' )
{ //try brackets
2008-10-16 23:04:36 +00:00
pr_file_p + + ;
------------------------------------------------------------------------
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
eval = ! ParsePrecompilerIf ( PPI_NOT ) ;
}
2008-10-16 23:04:36 +00:00
else
------------------------------------------------------------------------
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
{ //simple token...
if ( ! strncmp ( pr_file_p , " defined " , 7 ) )
{
pr_file_p + = 7 ;
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
pr_file_p + + ;
if ( * pr_file_p ! = ' ( ' )
{
eval = false ;
QCC_PR_ParseError ( ERR_EXPECTED , " no opening bracket after defined \n " ) ;
}
else
{
pr_file_p + + ;
2008-10-16 23:04:36 +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
QCC_PR_SimpleGetToken ( ) ;
eval = ! ! QCC_PR_CheckCompConstDefined ( pr_token ) ;
2008-10-16 23:04:36 +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
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
pr_file_p + + ;
if ( * pr_file_p ! = ' ) ' )
QCC_PR_ParseError ( ERR_EXPECTED , " unclosed defined condition \n " ) ;
pr_file_p + + ;
}
}
else
{
if ( ! QCC_PR_SimpleGetToken ( ) )
QCC_PR_ParseError ( ERR_EXPECTED , " unexpected end-of-line \n " ) ;
c = QCC_PR_CheckCompConstDefined ( pr_token ) ;
if ( ! c )
eval = atoi ( pr_token ) ;
else
eval = atoi ( c - > value ) ;
}
2008-10-16 23:04:36 +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
return eval ;
2008-10-16 23:04:36 +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
eval = ParsePrecompilerIf ( level - 1 ) ;
while ( * pr_file_p & & qcc_iswhite ( * pr_file_p ) & & * pr_file_p ! = ' \n ' )
2008-10-16 23:04:36 +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
pr_file_p + + ;
}
2008-10-16 23:04:36 +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
switch ( level )
{
case PPI_LOGICAL :
if ( ! strncmp ( pr_file_p , " || " , 2 ) )
{
pr_file_p + = 2 ;
eval = ParsePrecompilerIf ( level ) | | eval ;
}
else if ( ! strncmp ( pr_file_p , " && " , 2 ) )
{
pr_file_p + = 2 ;
eval = ParsePrecompilerIf ( level ) & & eval ;
}
break ;
case PPI_COMPARISON :
if ( ! strncmp ( pr_file_p , " <= " , 2 ) )
{
pr_file_p + = 2 ;
eval = eval < = ParsePrecompilerIf ( level ) ;
}
else if ( ! strncmp ( pr_file_p , " >= " , 2 ) )
{
pr_file_p + = 2 ;
eval = eval > = ParsePrecompilerIf ( level ) ;
}
else if ( ! strncmp ( pr_file_p , " < " , 1 ) )
{
pr_file_p + = 1 ;
eval = eval < ParsePrecompilerIf ( level ) ;
}
else if ( ! strncmp ( pr_file_p , " > " , 1 ) )
{
pr_file_p + = 1 ;
eval = eval > ParsePrecompilerIf ( level ) ;
}
else if ( ! strncmp ( pr_file_p , " != " , 2 ) )
{
pr_file_p + = 2 ;
eval = eval ! = ParsePrecompilerIf ( level ) ;
}
else if ( ! strncmp ( pr_file_p , " == " , 2 ) )
{
pr_file_p + = 2 ;
eval = eval = = ParsePrecompilerIf ( level ) ;
}
break ;
}
2008-10-16 23:04:36 +00:00
return eval ;
}
------------------------------------------------------------------------
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
2016-07-12 00:40:13 +00:00
struct deflist_s
{
char * buffer ;
size_t length ;
size_t buffersize ;
} ;
static void QCC_PR_GetDefinesListEnumerate ( void * vctx , void * data )
{
struct deflist_s * ctx = vctx ;
CompilerConstant_t * def = data ;
char term [ 8192 ] ;
size_t termsize ;
2018-10-13 06:20:49 +00:00
pbool success = true ;
2016-07-12 00:40:13 +00:00
QC_snprintfz ( term , sizeof ( term ) , " \n %s " , def - > name ) ;
if ( def - > numparams > = 0 )
{
2017-10-12 12:02:25 +00:00
int i ;
2018-10-13 06:20:49 +00:00
success & = QC_strlcat ( term , " ( " , sizeof ( term ) ) ;
2016-07-12 00:40:13 +00:00
for ( i = 0 ; i < def - > numparams ; i + + )
{
if ( i )
2018-10-13 06:20:49 +00:00
success & = QC_strlcat ( term , " , " , sizeof ( term ) ) ;
success & = QC_strlcat ( term , def - > params [ i ] , sizeof ( term ) ) ;
2016-07-12 00:40:13 +00:00
}
2018-10-13 06:20:49 +00:00
success & = QC_strlcat ( term , " ) " , sizeof ( term ) ) ;
2016-07-12 00:40:13 +00:00
}
if ( def - > value & & * def - > value )
{
char * o , * i ;
2018-10-13 06:20:49 +00:00
success & = QC_strlcat ( term , " = " , sizeof ( term ) ) ;
2016-07-12 00:40:13 +00:00
//annoying logic to skip whitespace... hopefully it won't fuck stuff up too much.
for ( o = term + strlen ( term ) , i = def - > value ; o < term + sizeof ( term ) - 1 & & * i ; )
{
if ( * i = = ' ' | | * i = = ' \t ' | | * i = = ' \n ' | | * i = = ' \r ' )
i + + ;
else
* o + + = * i + + ;
}
* o = 0 ;
}
2018-10-13 06:20:49 +00:00
if ( ! success ) //this define was too long. don't show truncated stuff.
return ;
2016-07-12 00:40:13 +00:00
termsize = strlen ( term ) ;
if ( ctx - > length + termsize + 1 > ctx - > buffersize )
{
ctx - > buffersize = ( ctx - > length + termsize + 1 ) * 2 ;
ctx - > buffer = realloc ( ctx - > buffer , ctx - > buffersize ) ;
}
memcpy ( ctx - > buffer + ctx - > length , term , termsize ) ;
ctx - > length + = termsize ;
ctx - > buffer [ ctx - > length ] = 0 ;
}
char * QCC_PR_GetDefinesList ( void )
{
struct deflist_s ctx = { NULL } ;
Hash_Enumerate ( & compconstantstable , QCC_PR_GetDefinesListEnumerate , & ctx ) ;
return ctx . buffer ;
}
2013-09-26 14:36:52 +00:00
//returns true if it was white/comments only. false if there was actual text that was skipped.
static void QCC_PR_SkipToEndOfLine ( pbool errorifnonwhite )
------------------------------------------------------------------------
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-09-26 14:36:52 +00:00
pbool handleccomments = true ;
------------------------------------------------------------------------
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
while ( * pr_file_p ! = ' \n ' & & * pr_file_p ! = ' \0 ' ) //read on until the end of the line
{
2013-09-26 14:36:52 +00:00
if ( * pr_file_p = = ' / ' & & pr_file_p [ 1 ] = = ' * ' & & handleccomments )
------------------------------------------------------------------------
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
{
pr_file_p + = 2 ;
while ( * pr_file_p )
{
if ( * pr_file_p = = ' * ' & & pr_file_p [ 1 ] = = ' / ' )
{
pr_file_p + = 2 ;
break ;
}
if ( * pr_file_p = = ' \n ' )
pr_source_line + + ;
2013-03-12 22:47:42 +00:00
pr_file_p + + ;
------------------------------------------------------------------------
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-09-26 14:36:52 +00:00
else if ( * pr_file_p = = ' / ' & & pr_file_p [ 1 ] = = ' / ' & & handleccomments )
2013-03-12 22:32:25 +00:00
{
2013-09-26 14:36:52 +00:00
handleccomments = false ;
2013-03-12 22:32:25 +00:00
pr_file_p + = 2 ;
2014-05-21 06:21:09 +00:00
/*while(*pr_file_p)
{
if ( * pr_file_p = = ' \n ' )
break ;
pr_file_p + + ;
} */
2013-03-12 22:32:25 +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
else if ( * pr_file_p = = ' \\ ' & & pr_file_p [ 1 ] = = ' \r ' & & pr_file_p [ 2 ] = = ' \n ' )
{ /*windows endings*/
pr_file_p + = 3 ;
pr_source_line + + ;
}
2013-09-26 14:36:52 +00:00
else if ( * pr_file_p = = ' \" ' & & handleccomments )
{
if ( errorifnonwhite )
{
errorifnonwhite = false ;
QCC_PR_ParseWarning ( ERR_UNKNOWNPUCTUATION , " unexpected tokens at end of line " ) ;
}
pr_file_p + + ;
while ( * pr_file_p )
{
if ( * pr_file_p = = ' \n ' )
break ; //this text is junk/ignored, so ignore the obvious error here.
else if ( * pr_file_p = = ' \" ' )
{
pr_file_p + + ;
break ;
}
else if ( * pr_file_p = = ' \\ ' & & pr_file_p [ 1 ] = = ' \" ' )
pr_file_p + = 2 ; //don't trip on "\"/*"
else if ( * pr_file_p = = ' \\ ' & & pr_file_p [ 1 ] = = ' \\ ' )
pr_file_p + = 2 ; //don't trip on "\\"//"foo
else
pr_file_p + + ;
//any other \ should be part of the actual string, which we don't care about here
}
}
------------------------------------------------------------------------
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
else if ( * pr_file_p = = ' \\ ' & & pr_file_p [ 1 ] = = ' \n ' )
{ /*linux endings*/
pr_file_p + = 2 ;
pr_source_line + + ;
}
else
2013-09-26 14:36:52 +00:00
{
if ( errorifnonwhite & & handleccomments & & ! qcc_iswhite ( * pr_file_p ) )
{
errorifnonwhite = false ;
QCC_PR_ParseWarning ( ERR_UNKNOWNPUCTUATION , " unexpected tokens at end of line " ) ;
}
------------------------------------------------------------------------
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
pr_file_p + + ;
2013-09-26 14:36:52 +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
}
}
2015-08-02 11:36:46 +00:00
//if hadtrue, then we allow elses, otherwise we skip them.
2018-10-11 10:31:23 +00:00
static pbool QCC_PR_FalsePreProcessorIf ( pbool hadtrue , int originalline )
2015-08-02 11:36:46 +00:00
{
int eval ;
int level = 1 ;
while ( 1 )
{
while ( * pr_file_p & & ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' ) )
pr_file_p + + ;
if ( ! * pr_file_p )
{
pr_source_line = originalline ;
QCC_PR_ParseError ( ERR_NOENDIF , " #if with no endif " ) ;
}
if ( * pr_file_p = = ' # ' )
{
pr_file_p + + ;
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
pr_file_p + + ;
if ( ! strncmp ( pr_file_p , " endif " , 5 ) )
level - - ;
if ( ! strncmp ( pr_file_p , " if " , 2 ) )
level + + ;
if ( ! hadtrue & & ! strncmp ( pr_file_p , " else " , 4 ) & & level = = 1 )
{
pr_file_p + = 4 ;
QCC_PR_SkipToEndOfLine ( true ) ;
return true ;
}
if ( ! hadtrue & & ! strncmp ( pr_file_p , " elif " , 4 ) & & level = = 1 )
{
// QCC_PR_ParseError(ERR_UNKNOWNPUCTUATION, "#elif not supported\n");
pr_file_p + = 4 ;
if ( ! strncmp ( pr_file_p , " def " , 3 ) )
{
eval = 1 ;
pr_file_p + = 3 ;
}
else if ( ! strncmp ( pr_file_p , " ndef " , 4 ) )
{
eval = 0 ;
pr_file_p + = 4 ;
}
else
eval = 2 ;
if ( * pr_file_p ! = ' ' & & * pr_file_p ! = ' \t ' )
QCC_PR_ParseError ( ERR_UNKNOWNPUCTUATION , " malformed #elif \n " ) ;
if ( eval = = 2 )
eval = ParsePrecompilerIf ( PPI_TOPLEVEL ) ;
else
{
QCC_PR_SimpleGetToken ( ) ;
if ( eval )
eval = ! ! QCC_PR_CheckCompConstDefined ( pr_token ) ;
else
eval = ! QCC_PR_CheckCompConstDefined ( pr_token ) ;
}
if ( eval )
{
QCC_PR_SkipToEndOfLine ( true ) ;
return true ;
}
}
}
QCC_PR_SkipToEndOfLine ( false ) ;
if ( level < = 0 )
return false ;
pr_file_p + + ; //next line
pr_source_line + + ;
}
}
2018-03-04 14:41:16 +00:00
#if 0
static void QCC_PR_PackagerMessage ( void * userctx , char * message , . . . )
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , message ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , message , argptr ) ;
va_end ( argptr ) ;
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s " , string ) ;
2018-03-04 14:41:16 +00:00
}
# endif
2005-02-28 07:16:19 +00:00
/*
= = = = = = = = = = = = = =
QCC_PR_Precompiler
= = = = = = = = = = = = = =
Runs precompiler stage
*/
2018-10-11 10:31:23 +00:00
static pbool QCC_PR_Precompiler ( void )
2004-08-23 01:38:21 +00:00
{
char msg [ 1024 ] ;
int ifmode ;
int a ;
static int ifs = 0 ;
pbool eval = false ;
2005-02-28 07:16:19 +00:00
if ( * pr_file_p = = ' # ' )
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
char * directive ;
2005-02-28 07:16:19 +00:00
for ( directive = pr_file_p + 1 ; * directive ; directive + + ) //so # define works
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
if ( * directive = = ' \r ' | | * directive = = ' \n ' )
QCC_PR_ParseError ( ERR_UNKNOWNPUCTUATION , " Hanging # with no directive \n " ) ;
if ( * directive > ' ' )
break ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
if ( ! strncmp ( directive , " define " , 6 ) )
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive ;
2014-05-16 01:34:58 +00:00
QCC_PR_PreProcessor_Define ( false ) ;
QCC_PR_SkipToEndOfLine ( true ) ;
}
else if ( ! strncmp ( directive , " append " , 6 ) )
{
pr_file_p = directive ;
QCC_PR_PreProcessor_Define ( true ) ;
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " undef " , 5 ) )
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 5 ;
------------------------------------------------------------------------
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
while ( qcc_iswhitesameline ( * pr_file_p ) )
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
QCC_PR_SimpleGetToken ( ) ;
QCC_PR_UndefineName ( pr_token ) ;
// QCC_PR_ConditionCompilation();
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " if " , 2 ) )
2004-08-23 01:38:21 +00:00
{
2005-07-28 15:52:31 +00:00
int originalline = pr_source_line ;
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 2 ;
------------------------------------------------------------------------
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
if ( ! strncmp ( pr_file_p , " def " , 3 ) )
2004-10-14 11:24:13 +00:00
{
ifmode = 0 ;
------------------------------------------------------------------------
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
pr_file_p + = 3 ;
2004-10-14 11:24:13 +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
else if ( ! strncmp ( pr_file_p , " ndef " , 4 ) )
2004-10-14 11:24:13 +00:00
{
ifmode = 1 ;
------------------------------------------------------------------------
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
pr_file_p + = 4 ;
2004-10-14 11:24:13 +00:00
}
else
{
ifmode = 2 ;
pr_file_p + = 0 ;
//QCC_PR_ParseError("bad \"#if\" type");
}
2004-08-23 01:38:21 +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
if ( ! qcc_iswhite ( * pr_file_p ) )
2004-10-14 11:24:13 +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
pr_file_p = directive ;
2008-10-16 23:04:36 +00:00
QCC_PR_SimpleGetToken ( ) ;
------------------------------------------------------------------------
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
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " Unknown pragma \' %s \' " , qcc_token ) ;
2008-10-16 23:04:36 +00:00
}
2004-10-14 11:24:13 +00:00
else
{
------------------------------------------------------------------------
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
if ( ifmode = = 2 )
2004-10-14 11:24:13 +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
eval = ParsePrecompilerIf ( PPI_TOPLEVEL ) ;
}
else
{
QCC_PR_SimpleGetToken ( ) ;
// if (!STRCMP(pr_token, "COOP_MODE"))
// eval = false;
if ( QCC_PR_CheckCompConstDefined ( pr_token ) )
eval = true ;
if ( ifmode = = 1 )
eval = eval ? false : true ;
}
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-11-04 04:19:10 +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
if ( eval )
ifs + = 1 ;
else
2015-08-02 11:36:46 +00:00
ifs + = QCC_PR_FalsePreProcessorIf ( false , originalline ) ;
2004-10-14 11:24:13 +00:00
}
}
2015-08-02 11:36:46 +00:00
else if ( ! strncmp ( directive , " else " , 4 ) | | ! strncmp ( directive , " elif " , 4 ) )
2004-08-23 01:38:21 +00:00
{
2005-07-28 15:52:31 +00:00
int originalline = pr_source_line ;
2004-11-04 04:19:10 +00:00
2015-08-02 11:36:46 +00:00
if ( ! ifs )
QCC_PR_ParseError ( ERR_UNKNOWNPUCTUATION , " #else outside of #if \n " ) ;
2004-10-14 11:24:13 +00:00
ifs - = 1 ;
2005-02-28 07:16:19 +00:00
2013-09-26 14:36:52 +00:00
pr_file_p = directive + 4 ;
2015-08-02 11:36:46 +00:00
if ( ! strncmp ( directive , " elif " , 4 ) )
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( false ) ;
2015-08-02 11:36:46 +00:00
else
QCC_PR_SkipToEndOfLine ( true ) ;
ifs + = QCC_PR_FalsePreProcessorIf ( true , originalline ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " endif " , 5 ) )
2010-12-08 14:42:05 +00:00
{
2013-09-26 14:36:52 +00:00
pr_file_p = directive + 5 ;
QCC_PR_SkipToEndOfLine ( true ) ;
2004-10-14 11:24:13 +00:00
if ( ifs < = 0 )
QCC_PR_ParseError ( ERR_NOPRECOMPILERIF , " unmatched #endif " ) ;
else
ifs - = 1 ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " eof " , 3 ) )
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = NULL ;
2005-02-28 07:16:19 +00:00
return true ;
2004-10-14 11:24:13 +00:00
}
else if ( ! strncmp ( directive , " error " , 5 ) )
2010-12-08 14:42:05 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 5 ;
2014-08-25 07:35:41 +00:00
for ( a = 0 ; a < sizeof ( msg ) - 1 & & pr_file_p [ a ] ! = ' \t ' & & pr_file_p [ a ] ! = ' \n ' & & pr_file_p [ a ] ! = ' \0 ' ; a + + )
2004-10-14 11:24:13 +00:00
msg [ a ] = pr_file_p [ a ] ;
2011-11-08 06:00:35 +00:00
msg [ a ] = ' \0 ' ;
2004-10-14 11:24:13 +00:00
2013-10-08 14:28:11 +00:00
QCC_PR_SkipToEndOfLine ( false ) ;
2004-08-23 01:38:21 +00:00
2017-06-21 01:24:25 +00:00
QCC_PR_ParseError ( ERR_HASHERROR , " #Error: %s " , msg ) ;
2004-10-14 11:24:13 +00:00
}
else if ( ! strncmp ( directive , " warning " , 7 ) )
2010-12-08 14:42:05 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 7 ;
2014-08-25 07:35:41 +00:00
for ( a = 0 ; a < 1023 & & pr_file_p [ a ] ! = ' \r ' & & pr_file_p [ a ] ! = ' \n ' & & pr_file_p [ a ] ! = ' \0 ' ; a + + )
2004-10-14 11:24:13 +00:00
msg [ a ] = pr_file_p [ a ] ;
2014-08-25 07:35:41 +00:00
msg [ a ] = ' \0 ' ;
2004-10-14 11:24:13 +00:00
2013-10-08 14:28:11 +00:00
QCC_PR_SkipToEndOfLine ( false ) ;
2004-08-23 01:38:21 +00:00
2016-07-12 00:40:13 +00:00
QCC_PR_ParseWarning ( WARN_PRECOMPILERMESSAGE , " #warning: %s " , msg ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " message " , 7 ) )
2010-12-08 14:42:05 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 7 ;
2014-08-25 07:35:41 +00:00
for ( a = 0 ; a < sizeof ( msg ) - 1 & & pr_file_p [ a ] ! = ' \r ' & & pr_file_p [ a ] ! = ' \n ' & & pr_file_p [ a ] ! = ' \0 ' ; a + + )
2004-10-14 11:24:13 +00:00
msg [ a ] = pr_file_p [ a ] ;
2014-08-25 07:35:41 +00:00
msg [ a ] = ' \0 ' ;
2004-08-23 01:38:21 +00:00
2013-09-26 14:36:52 +00:00
if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s(%i) : #message: %s \n " , s_filen , pr_source_line , msg ) ;
2013-09-26 14:36:52 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s:%i: #message: %s \n " , s_filen , pr_source_line , msg ) ;
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( false ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " copyright " , 9 ) )
{
pr_file_p = directive + 9 ;
2014-08-25 07:35:41 +00:00
for ( a = 0 ; a < sizeof ( msg ) - 1 & & qcc_iswhite ( pr_file_p [ a ] ) & & pr_file_p [ a ] ! = ' \0 ' ; a + + )
2004-10-14 11:24:13 +00:00
msg [ a ] = pr_file_p [ a ] ;
2014-08-25 07:35:41 +00:00
msg [ a ] = ' \0 ' ;
2004-08-23 01:38:21 +00:00
2013-10-08 14:28:11 +00:00
QCC_PR_SkipToEndOfLine ( false ) ;
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
if ( strlen ( msg ) > = sizeof ( QCC_copyright ) )
QCC_PR_ParseWarning ( WARN_STRINGTOOLONG , " Copyright message is too long \n " ) ;
2015-02-02 08:01:53 +00:00
QC_strlcpy ( QCC_copyright , msg , sizeof ( QCC_copyright ) - 1 ) ;
2004-08-23 01:38:21 +00:00
}
2018-03-04 14:41:16 +00:00
else if ( ! strncmp ( directive , " package " , 7 ) )
{
pr_file_p = directive + 7 ;
QCC_PR_SkipToEndOfLine ( true ) ;
#if 0
if ( ! autoprototype )
{
struct pkgctx_s * ctx = Packager_Create ( QCC_PR_PackagerMessage , NULL ) ;
Packager_ParseText ( ctx , pr_file_p ) ;
Packager_WriteDataset ( ctx , NULL ) ;
Packager_Destroy ( ctx ) ;
}
# endif
pr_file_p + = strlen ( pr_file_p ) ;
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " pack " , 4 ) )
{
ifmode = 0 ;
pr_file_p = directive + 4 ;
if ( ! strncmp ( pr_file_p , " id " , 2 ) )
pr_file_p + = 3 ;
2010-12-08 14:42:05 +00:00
else
2004-10-14 11:24:13 +00:00
{
2010-12-08 14:42:05 +00:00
ifmode = QCC_PR_LexInteger ( ) ;
2004-10-14 11:24:13 +00:00
if ( ifmode = = 0 )
ifmode = 1 ;
pr_file_p + + ;
}
2014-08-25 07:35:41 +00:00
for ( a = 0 ; a < sizeof ( msg ) - 1 & & qcc_iswhite ( pr_file_p [ a ] ) & & pr_file_p [ a ] ! = ' \0 ' ; a + + )
2004-10-14 11:24:13 +00:00
msg [ a ] = pr_file_p [ a ] ;
2014-08-25 07:35:41 +00:00
msg [ a ] = ' \0 ' ;
2004-08-23 01:38:21 +00:00
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
if ( ifmode = = 0 )
2004-10-14 11:24:13 +00:00
QCC_packid = atoi ( msg ) ;
else if ( ifmode < = 5 )
strcpy ( QCC_Packname [ ifmode - 1 ] , msg ) ;
else
2010-12-08 14:42:05 +00:00
QCC_PR_ParseError ( ERR_TOOMANYPACKFILES , " No more than 5 packs are allowed " ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " forcecrc " , 8 ) )
2010-12-08 14:42:05 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 8 ;
2004-08-23 01:38:21 +00:00
2010-12-08 14:42:05 +00:00
ForcedCRC = QCC_PR_LexInteger ( ) ;
2004-08-23 01:38:21 +00:00
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-10-14 11:24:13 +00:00
}
2016-09-08 19:04:35 +00:00
else if ( ! strncmp ( directive , " merge " , 5 ) )
{
pr_file_p = directive + 5 ;
while ( qcc_iswhitesameline ( * pr_file_p ) )
pr_file_p + + ;
QCC_PR_SimpleGetString ( ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
externs - > Printf ( " Merging from %s \n " , pr_token ) ;
2016-09-08 19:04:35 +00:00
QCC_ImportProgs ( pr_token ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( ! * destfile & & ! destfile_explicit )
2016-09-08 19:04:35 +00:00
{
2021-02-08 10:59:53 +00:00
QCC_JoinPaths ( destfile , sizeof ( destfile ) , pr_token , compilingfile ) ;
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Outputfile: %s \n " , destfile ) ;
2016-09-08 19:04:35 +00:00
}
QCC_PR_SkipToEndOfLine ( true ) ;
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " includelist " , 11 ) )
{
2014-05-16 01:34:58 +00:00
int defines = 0 ;
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 11 ;
2004-08-23 01:38:21 +00:00
2014-05-16 01:34:58 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
while ( 1 )
{
2013-12-29 22:48:28 +00:00
QCC_PR_LexWhitespace ( false ) ;
2021-04-14 05:21:04 +00:00
if ( ! flag_hashonly & & QCC_PR_CheckCompConst ( ) )
2014-05-16 01:34:58 +00:00
{
defines + + ;
continue ;
}
2004-10-14 11:24:13 +00:00
if ( ! QCC_PR_SimpleGetToken ( ) )
{
if ( ! * pr_file_p )
2014-05-16 01:34:58 +00:00
{
if ( defines > 0 )
{
defines - - ;
QCC_PR_UnInclude ( ) ;
continue ;
}
2004-10-14 11:24:13 +00:00
QCC_Error ( ERR_EOF , " eof in includelist " ) ;
2014-05-16 01:34:58 +00:00
}
2004-10-14 11:24:13 +00:00
else
{
pr_file_p + + ;
pr_source_line + + ;
}
continue ;
}
if ( ! strcmp ( pr_token , " #endlist " ) )
2013-09-26 14:36:52 +00:00
{
QCC_PR_SkipToEndOfLine ( true ) ;
2004-10-14 11:24:13 +00:00
break ;
2013-09-26 14:36:52 +00:00
}
2005-08-27 05:45:45 +00:00
2016-02-10 23:23:43 +00:00
QCC_FindBestInclude ( pr_token , compilingfile , true ) ;
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
if ( * pr_file_p = = ' \r ' )
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
2014-05-16 01:34:58 +00:00
// QCC_PR_SkipToEndOfLine(true);
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
}
else if ( ! strncmp ( directive , " include " , 7 ) )
2005-05-04 14:45:00 +00:00
{
2005-04-17 02:22:51 +00:00
char sm ;
2005-04-16 16:21:27 +00:00
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 7 ;
------------------------------------------------------------------------
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
while ( qcc_iswhitesameline ( * pr_file_p ) )
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
2005-08-27 05:45:45 +00:00
msg [ 0 ] = ' \0 ' ;
2004-11-04 04:19:10 +00:00
if ( * pr_file_p = = ' \" ' )
2005-04-16 16:21:27 +00:00
sm = ' \" ' ;
else if ( * pr_file_p = = ' < ' )
sm = ' > ' ;
else
2004-11-04 04:19:10 +00:00
{
2006-02-23 23:03:12 +00:00
QCC_PR_ParseError ( 0 , " Not a string literal (on a #include) " ) ;
2005-04-16 16:21:27 +00:00
sm = 0 ;
2004-11-04 04:19:10 +00:00
}
2005-08-27 05:45:45 +00:00
pr_file_p + + ;
a = 0 ;
while ( * pr_file_p ! = sm )
2004-11-04 04:19:10 +00:00
{
2005-08-27 05:45:45 +00:00
if ( * pr_file_p = = ' \n ' )
2004-11-04 04:19:10 +00:00
{
2011-03-04 15:35:16 +00:00
QCC_PR_ParseError ( 0 , " #include continued over line boundry \n " ) ;
2005-04-16 16:21:27 +00:00
break ;
2004-11-04 04:19:10 +00:00
}
2005-08-27 05:45:45 +00:00
msg [ a + + ] = * pr_file_p ;
pr_file_p + + ;
2004-11-04 04:19:10 +00:00
}
2005-08-27 05:45:45 +00:00
msg [ a ] = 0 ;
2017-10-12 12:02:25 +00:00
pr_file_p + + ;
2005-04-16 16:21:27 +00:00
2016-02-10 23:23:43 +00:00
QCC_FindBestInclude ( msg , compilingfile , false ) ;
2004-08-23 01:38:21 +00:00
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " datafile " , 8 ) )
2010-12-08 14:42:05 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 8 ;
2004-08-23 01:38:21 +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
while ( qcc_iswhitesameline ( * pr_file_p ) )
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
2016-09-08 19:04:35 +00:00
QCC_PR_SimpleGetString ( ) ;
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Including datafile: %s \n " , pr_token ) ;
2004-10-14 11:24:13 +00:00
QCC_AddFile ( pr_token ) ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2010-07-03 21:49:48 +00:00
for ( a = 0 ; a < sizeof ( msg ) - 1 & & pr_file_p [ a ] ! = ' \n ' & & pr_file_p [ a ] ! = ' \0 ' ; a + + )
2004-10-14 11:24:13 +00:00
msg [ a ] = pr_file_p [ a ] ;
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
msg [ a - 1 ] = ' \0 ' ;
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
while ( * pr_file_p ! = ' \n ' & & * pr_file_p ! = ' \0 ' ) //read on until the end of the line
{
pr_file_p + + ;
}
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " output " , 6 ) )
{
pr_file_p = directive + 6 ;
2004-08-23 01:38:21 +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
while ( qcc_iswhitesameline ( * pr_file_p ) )
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
2016-09-08 19:04:35 +00:00
QCC_PR_SimpleGetString ( ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( ! destfile_explicit )
{
2021-02-08 10:59:53 +00:00
QCC_JoinPaths ( destfile , sizeof ( destfile ) , pr_token , compilingfile ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
externs - > Printf ( " Outputfile: %s \n " , pr_token ) ;
}
2004-08-23 01:38:21 +00:00
2016-09-08 19:04:35 +00:00
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! strncmp ( directive , " pragma " , 6 ) )
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p = directive + 6 ;
------------------------------------------------------------------------
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
while ( qcc_iswhitesameline ( * pr_file_p ) )
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
qcc_token [ 0 ] = ' \0 ' ;
for ( a = 0 ; * pr_file_p ! = ' \n ' & & * pr_file_p ! = ' \0 ' ; pr_file_p + + ) //read on until the end of the line
{
2004-11-13 17:18:34 +00:00
if ( ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' | | * pr_file_p = = ' ( ' ) & & ! * qcc_token )
2004-10-14 11:24:13 +00:00
{
msg [ a ] = ' \0 ' ;
strcpy ( qcc_token , msg ) ;
a = 0 ;
2017-10-31 22:52:58 +00:00
if ( * pr_file_p ! = ' ( ' )
continue ;
2004-10-14 11:24:13 +00:00
}
msg [ a + + ] = * pr_file_p ;
}
2010-12-08 14:42:05 +00:00
2004-10-14 11:24:13 +00:00
msg [ a ] = ' \0 ' ;
{
char * end ;
------------------------------------------------------------------------
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
for ( end = msg + a - 1 ; end > = msg & & qcc_iswhite ( * end ) ; end - - )
2004-10-14 11:24:13 +00:00
* end = ' \0 ' ;
}
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
if ( ! * qcc_token )
{
strcpy ( qcc_token , msg ) ;
msg [ 0 ] = ' \0 ' ;
}
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
char * end ;
------------------------------------------------------------------------
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
for ( end = msg + a - 1 ; end > = msg & & qcc_iswhite ( * end ) ; end - - )
2004-10-14 11:24:13 +00:00
* end = ' \0 ' ;
}
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
if ( ! QC_strcasecmp ( qcc_token , " DONT_COMPILE_THIS_FILE " ) )
{
2021-04-14 05:21:04 +00:00
QCC_PR_LexWhitespace ( false ) ;
2004-10-14 11:24:13 +00:00
while ( * pr_file_p )
2004-08-23 01:38:21 +00:00
{
2021-04-14 05:21:04 +00:00
if ( ! qcc_iswhite ( * pr_file_p ) )
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
2021-04-14 05:21:04 +00:00
QCC_PR_LexWhitespace ( false ) ;
2004-08-23 01:38:21 +00:00
}
}
2004-10-14 11:24:13 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " COPYRIGHT " ) )
2004-08-23 01:38:21 +00:00
{
2017-06-21 01:24:25 +00:00
char * e = strrchr ( msg + 1 , ' \" ' ) ;
if ( * msg = = ' \" ' & & e & & e ! = msg )
{ //FIXME: handle \ns
memmove ( msg , msg + 1 , e - ( msg + 1 ) ) ;
msg [ e - ( msg + 1 ) ] = 0 ;
}
2018-10-13 06:20:49 +00:00
if ( ! QC_strlcpy ( QCC_copyright , msg , sizeof ( QCC_copyright ) ) )
2004-10-14 11:24:13 +00:00
QCC_PR_ParseWarning ( WARN_STRINGTOOLONG , " Copyright message is too long \n " ) ;
}
2013-06-13 22:45:15 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " compress " ) )
2009-05-24 10:11:17 +00:00
{
extern pbool compressoutput ;
compressoutput = atoi ( msg ) ;
}
2013-06-13 22:45:15 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " forcecrc " ) )
2005-08-26 22:56:51 +00:00
{
ForcedCRC = atoi ( msg ) ;
}
2021-04-14 05:21:04 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " framerate " ) )
{
qcc_framerate = atof ( msg ) ;
}
2017-08-14 16:38:44 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " once " ) )
{
struct qccincludeonced_s * onced = qccHunkAlloc ( sizeof ( * onced ) + strlen ( compilingfile ) ) ;
strcpy ( onced - > name , compilingfile ) ;
onced - > next = qccincludeonced ;
qccincludeonced = onced ;
}
else if ( ! QC_strcasecmp ( qcc_token , " file " ) )
2017-10-31 22:52:58 +00:00
{ //#pragma file(foobar.qc)
if ( ! flag_nopragmafileline )
{
char * e ;
char * m = msg ;
if ( * m = = ' ( ' )
{
m + + ;
e = strchr ( m , ' ) ' ) ;
if ( e )
* e = 0 ;
}
s_filen = e = qccHunkAlloc ( strlen ( m ) + 1 ) ;
strcpy ( e , m ) ;
if ( opt_filenames )
{
optres_filenames + = strlen ( m ) ;
s_filed = 0 ;
}
else
s_filed = QCC_CopyString ( m ) ;
}
2017-08-14 16:38:44 +00:00
}
else if ( ! QC_strcasecmp ( qcc_token , " line " ) )
2017-10-31 22:52:58 +00:00
{ //#pragma line(666)
if ( ! flag_nopragmafileline )
{
char * m = msg ;
if ( * m = = ' ( ' )
m + + ;
pr_source_line = strtoul ( m , & m , 0 ) - 1 ;
}
2017-08-14 16:38:44 +00:00
}
2016-02-10 23:23:43 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " includedir " ) )
{
char newinc [ 1024 ] ;
int i ;
QCC_COM_Parse ( msg ) ;
if ( * qcc_token )
{
i = qcc_token [ strlen ( qcc_token ) - 1 ] ;
if ( i ! = ' / ' & & i ! = ' \\ ' )
QC_strlcat ( qcc_token , " / " , sizeof ( qcc_token ) ) ;
}
2021-02-08 10:59:53 +00:00
QCC_JoinPaths ( newinc , sizeof ( newinc ) , qcc_token , compilingfile ) ;
2016-02-10 23:23:43 +00:00
QCC_PR_AddIncludePath ( newinc ) ;
}
2013-06-13 22:45:15 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " noref " ) )
defaultnoref = ! ! atoi ( msg ) ;
2016-01-18 05:22:07 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " nosave " ) )
defaultnosave = ! ! atoi ( msg ) ;
2013-06-13 22:45:15 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " defaultstatic " ) )
defaultstatic = ! ! atoi ( msg ) ;
else if ( ! QC_strcasecmp ( qcc_token , " autoproto " ) )
{
if ( ! autoprototyped )
{
if ( numpr_globals ! = RESERVED_OFS )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " #pragma autoproto must appear before any definitions " ) ;
else
autoprototype = * msg ? ! ! atoi ( msg ) : true ;
}
}
else if ( ! QC_strcasecmp ( qcc_token , " wrasm " ) )
2011-08-16 04:12:15 +00:00
{
pbool on = atoi ( msg ) ;
if ( asmfile & & ! on )
{
fclose ( asmfile ) ;
asmfile = NULL ;
2013-06-02 06:03:54 +00:00
}
2011-08-16 04:12:15 +00:00
if ( ! asmfile & & on )
2013-06-02 06:03:54 +00:00
{
if ( asmfilebegun )
asmfile = fopen ( " qc.asm " , " ab " ) ;
else
asmfile = fopen ( " qc.asm " , " wb " ) ;
if ( asmfile )
asmfilebegun = true ;
}
2011-08-16 04:12:15 +00:00
}
2013-06-13 22:45:15 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " optimise " ) | | ! QC_strcasecmp ( qcc_token , " optimize " ) ) //bloomin' americans.
{
int o ;
extern pbool qcc_nopragmaoptimise ;
if ( pr_scope )
2014-05-16 01:34:58 +00:00
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " pragma %s: unable to change optimisation options mid-function " , qcc_token ) ;
2013-06-13 22:45:15 +00:00
else if ( * msg > = ' 0 ' & & * msg < = ' 3 ' )
{
int lev = atoi ( msg ) ;
2015-04-14 12:24:05 +00:00
pbool state ;
int once = false ;
2013-06-13 22:45:15 +00:00
for ( o = 0 ; optimisations [ o ] . enabled ; o + + )
{
2015-04-14 12:24:05 +00:00
state = optimisations [ o ] . optimisationlevel < = lev ;
if ( qcc_nopragmaoptimise & & * optimisations [ o ] . enabled ! = state )
{
if ( ! once + + )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " pragma %s %s: overriden by commandline " , qcc_token , msg ) ;
}
else
* optimisations [ o ] . enabled = state ;
2013-06-13 22:45:15 +00:00
}
}
2015-04-14 12:24:05 +00:00
else if ( ! strnicmp ( msg , " addon " , 5 ) | | ! strnicmp ( msg , " mutator " , 7 ) )
2013-06-13 22:45:15 +00:00
{
2015-04-14 12:24:05 +00:00
int lev = 2 ;
pbool state = false ;
for ( o = 0 ; optimisations [ o ] . enabled ; o + + )
2013-06-13 22:45:15 +00:00
{
2015-04-14 12:24:05 +00:00
if ( optimisations [ o ] . optimisationlevel > lev )
2013-06-13 22:45:15 +00:00
{
2015-04-14 12:24:05 +00:00
if ( qcc_nopragmaoptimise & & * optimisations [ o ] . enabled ! = state )
QCC_PR_ParseWarning ( WARN_IGNORECOMMANDLINE , " pragma %s %s: disabling %s " , qcc_token , msg , optimisations [ o ] . fullname ) ;
* optimisations [ o ] . enabled = state ;
2013-06-13 22:45:15 +00:00
}
}
2015-04-14 12:24:05 +00:00
}
else
{
char * opt = msg ;
pbool state = true ;
if ( ! strnicmp ( msg , " no- " , 3 ) )
2013-06-13 22:45:15 +00:00
{
2015-04-14 12:24:05 +00:00
state = false ;
opt + = 3 ;
2013-06-13 22:45:15 +00:00
}
2015-04-14 12:24:05 +00:00
for ( o = 0 ; optimisations [ o ] . enabled ; o + + )
if ( ( * optimisations [ o ] . abbrev & & ! stricmp ( opt , optimisations [ o ] . abbrev ) ) | | ! stricmp ( opt , optimisations [ o ] . fullname ) )
{
if ( qcc_nopragmaoptimise & & * optimisations [ o ] . enabled ! = state )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " pragma %s %s: overriden by commandline " , qcc_token , optimisations [ o ] . fullname ) ;
else
* optimisations [ o ] . enabled = state ;
break ;
}
2013-06-13 22:45:15 +00:00
if ( ! optimisations [ o ] . enabled )
2015-04-14 12:24:05 +00:00
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " pragma %s: %s unsupported " , qcc_token , opt ) ;
2013-06-13 22:45:15 +00:00
}
}
else if ( ! QC_strcasecmp ( qcc_token , " sourcefile " ) )
2008-11-09 22:29:28 +00:00
{
2020-09-29 07:09:01 +00:00
char * s = msg ;
while ( ( s = QCC_COM_Parse ( s ) ) )
QCC_RegisterSourceFile ( qcc_token ) ;
2008-11-09 22:29:28 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " TARGET " ) )
{
2013-12-07 00:24:06 +00:00
QCC_COM_Parse ( msg ) ;
2020-07-13 17:48:16 +00:00
if ( ! QCC_OPCodeSetTargetName ( qcc_token ) )
2014-05-16 01:34:58 +00:00
QCC_PR_ParseWarning ( WARN_BADTARGET , " Unknown target \' %s \' . Ignored. \n Valid targets are: ID, HEXEN2, FTE, FTEH2, KK7, DP(patched) " , qcc_token ) ;
2004-10-14 11:24:13 +00:00
}
else if ( ! QC_strcasecmp ( qcc_token , " PROGS_SRC " ) )
2020-09-11 01:18:32 +00:00
{ //doesn't make sense, but silenced if you are switching between using a certain precompiler app used with CuTF.
2004-08-23 01:38:21 +00:00
}
2004-10-14 11:24:13 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " PROGS_DAT " ) )
{ //doesn't make sence, but silenced if you are switching between using a certain precompiler app used with CuTF.
2013-06-13 22:45:15 +00:00
char olddest [ 1024 ] ;
Q_strlcpy ( olddest , destfile , sizeof ( olddest ) ) ;
2004-10-14 11:24:13 +00:00
QCC_COM_Parse ( msg ) ;
2006-04-02 23:47:27 +00:00
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
if ( ! destfile_explicit ) //if output file is named on the commandline, don't change it mid-compile
2021-02-08 10:59:53 +00:00
QCC_JoinPaths ( destfile , sizeof ( destfile ) , qcc_token , compilingfile ) ;
2006-04-02 23:47:27 +00:00
2013-06-13 22:45:15 +00:00
if ( strcmp ( destfile , olddest ) )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Outputfile: %s \n " , destfile ) ;
2004-10-14 11:24:13 +00:00
}
2020-09-29 07:09:01 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " opcode " ) )
{
int st ;
char * s = QCC_COM_Parse ( msg ) ;
if ( ! QC_strcasecmp ( qcc_token , " enable " ) | | ! QC_strcasecmp ( qcc_token , " on " ) )
st = 1 ;
else if ( ! QC_strcasecmp ( qcc_token , " disable " ) | | ! QC_strcasecmp ( qcc_token , " off " ) )
st = 0 ;
else
{
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " opcode state not recognised " ) ;
st = - 1 ;
}
if ( st > = 0 )
{
int f ;
while ( ( s = QCC_COM_Parse ( s ) ) )
{
for ( f = 0 ; pr_opcodes [ f ] . opname ; f + + )
{
if ( ! QC_strcasecmp ( pr_opcodes [ f ] . opname , qcc_token ) )
{
2022-06-19 15:18:00 +00:00
if ( f > = OP_NUMREALOPS )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " opcode %s is internal " , qcc_token ) ; //these will change with later opcodes, do not allow them to be written into the output.
else if ( st )
2020-09-29 07:09:01 +00:00
pr_opcodes [ f ] . flags | = OPF_VALID ;
else
pr_opcodes [ f ] . flags & = ~ OPF_VALID ;
break ;
}
}
if ( ! pr_opcodes [ f ] . opname )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " opcode %s not recognised " , qcc_token ) ;
}
}
}
2005-04-16 16:21:27 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " keyword " ) | | ! QC_strcasecmp ( qcc_token , " flag " ) )
{
char * s ;
int st ;
s = QCC_COM_Parse ( msg ) ;
if ( ! QC_strcasecmp ( qcc_token , " enable " ) | | ! QC_strcasecmp ( qcc_token , " on " ) )
st = 1 ;
2005-04-17 10:05:33 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " disable " ) | | ! QC_strcasecmp ( qcc_token , " off " ) )
st = 0 ;
2005-04-16 16:21:27 +00:00
else
{
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " compiler flag state not recognised " ) ;
st = - 1 ;
}
2020-09-29 07:09:01 +00:00
if ( st > = 0 )
2005-04-16 16:21:27 +00:00
{
int f ;
2020-09-29 07:09:01 +00:00
while ( ( s = QCC_COM_Parse ( s ) ) )
2005-04-16 16:21:27 +00:00
{
2020-09-29 07:09:01 +00:00
for ( f = 0 ; compiler_flag [ f ] . enabled ; f + + )
2005-04-16 16:21:27 +00:00
{
2020-09-29 07:09:01 +00:00
if ( ! QC_strcasecmp ( compiler_flag [ f ] . abbrev , qcc_token ) )
2017-10-31 22:52:58 +00:00
{
2020-09-29 07:09:01 +00:00
if ( compiler_flag [ f ] . flags & FLAG_MIDCOMPILE )
{
* compiler_flag [ f ] . enabled = st ;
if ( compiler_flag [ f ] . enabled = = & flag_cpriority )
QCC_PrioritiseOpcodes ( ) ;
}
else
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " Cannot enable/disable keyword/flag via a pragma " ) ;
break ;
2017-10-31 22:52:58 +00:00
}
2005-04-16 16:21:27 +00:00
}
2020-09-29 07:09:01 +00:00
if ( ! compiler_flag [ f ] . enabled )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " keyword/flag %s not recognised " , qcc_token ) ;
2005-04-16 16:21:27 +00:00
}
}
}
2004-11-13 17:18:34 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " warning " ) )
2004-08-23 01:38:21 +00:00
{
2004-11-13 17:18:34 +00:00
int st ;
char * s ;
s = QCC_COM_Parse ( msg ) ;
if ( ! stricmp ( qcc_token , " enable " ) | | ! stricmp ( qcc_token , " on " ) )
------------------------------------------------------------------------
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
st = WA_WARN ;
else if ( ! stricmp ( qcc_token , " disable " ) | | ! stricmp ( qcc_token , " off " ) | | ! stricmp ( qcc_token , " ignore " ) )
st = WA_IGNORE ;
else if ( ! stricmp ( qcc_token , " error " ) )
st = WA_ERROR ;
2004-11-13 17:18:34 +00:00
else if ( ! stricmp ( qcc_token , " toggle " ) )
------------------------------------------------------------------------
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
st = 3 ;
2004-11-13 17:18:34 +00:00
else
2005-04-16 16:21:27 +00:00
{
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " warning state not recognised " ) ;
2004-11-13 17:18:34 +00:00
st = - 1 ;
2005-04-16 16:21:27 +00:00
}
2004-11-13 17:18:34 +00:00
if ( st > = 0 )
{
int wn ;
2020-09-29 07:09:01 +00:00
while ( ( s = QCC_COM_Parse ( s ) ) )
2004-11-13 17:18:34 +00:00
{
2020-09-29 07:09:01 +00:00
wn = QCC_WarningForName ( qcc_token ) ;
if ( wn < 0 )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " warning id not recognised " ) ;
2004-11-13 17:18:34 +00:00
else
2020-09-29 07:09:01 +00:00
{
if ( st = = 3 ) //toggle
qccwarningaction [ wn ] = ! ! qccwarningaction [ wn ] ;
else
qccwarningaction [ wn ] = st ;
}
2004-11-13 17:18:34 +00:00
}
}
2004-08-23 01:38:21 +00:00
}
else
2020-09-29 07:09:01 +00:00
{
QCC_PR_SkipToEndOfLine ( false ) ;
2004-10-14 11:24:13 +00:00
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " Unknown pragma \' %s \' " , qcc_token ) ;
2020-09-29 07:09:01 +00:00
}
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
}
2005-02-28 07:16:19 +00:00
return true ;
}
return false ;
}
/*
= = = = = = = = = = = = = =
PR_NewLine
Call at start of file and when * pr_file_p = = ' \n '
= = = = = = = = = = = = = =
*/
void QCC_PR_NewLine ( pbool incomment )
{
pr_source_line + + ;
pr_line_start = pr_file_p ;
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
pr_file_p + + ;
if ( incomment ) //no constants if in a comment.
{
}
else if ( QCC_PR_Precompiler ( ) )
{
2004-08-23 01:38:21 +00:00
}
// if (pr_dumpasm)
// PR_PrintNextLine ();
}
/*
= = = = = = = = = = = = = =
PR_LexString
Parses a quoted string
= = = = = = = = = = = = = =
*/
2020-09-11 01:18:32 +00:00
int QCC_PR_LexEscapedCodepoint ( void )
{ //for "\foo" or '\foo' handling.
//caller will have read the \ already.
int t ;
int c = * pr_file_p + + ;
if ( ! c )
QCC_PR_ParseError ( ERR_EOF , " EOF inside quote " ) ;
if ( c = = ' n ' )
c = ' \n ' ;
else if ( c = = ' r ' )
c = ' \r ' ;
else if ( c = = ' # ' ) //avoid preqcc expansion in strings.
c = ' # ' ;
else if ( c = = ' " ' )
c = ' " ' ;
else if ( c = = ' t ' )
c = ' \t ' ; //tab
else if ( c = = ' a ' )
c = ' \a ' ; //bell
else if ( c = = ' v ' )
c = ' \v ' ; //vertical tab
else if ( c = = ' f ' )
c = ' \f ' ; //form feed
// else if (c == 's' || c == 'b')
// c = 0; //invalid...
//else if (c == 'b')
// c = '\b';
else if ( c = = ' [ ' )
c = 0xe010 ; //quake specific
else if ( c = = ' ] ' )
c = 0xe011 ; //quake specific
else if ( c = = ' { ' )
{
int d ;
c = 0 ;
if ( * pr_file_p = = ' x ' )
{
pr_file_p + + ;
while ( ( d = * pr_file_p + + ) ! = ' } ' )
{
if ( d > = ' 0 ' & & d < = ' 9 ' )
c = c * 16 + d - ' 0 ' ;
else if ( d > = ' a ' & & d < = ' f ' )
c = c * 16 + 10 + d - ' a ' ;
else if ( d > = ' A ' & & d < = ' F ' )
c = c * 16 + 10 + d - ' A ' ;
else
QCC_PR_ParseError ( ERR_BADCHARACTERCODE , " Bad character code " ) ;
}
}
else
{
while ( ( d = * pr_file_p + + ) ! = ' } ' )
{
if ( d > = ' 0 ' & & d < = ' 9 ' )
c = c * 10 + d - ' 0 ' ;
else
QCC_PR_ParseError ( ERR_BADCHARACTERCODE , " Bad character code " ) ;
}
}
}
else if ( c = = ' . ' )
c = 0xe01c ;
else if ( c = = ' < ' )
c = 0xe01d ; //separator start
else if ( c = = ' - ' )
c = 0xe01e ; //separator middle
else if ( c = = ' > ' )
c = 0xe01f ; //separator end
else if ( c = = ' ( ' )
c = 0xe080 ; //slider start
else if ( c = = ' = ' )
c = 0xe081 ; //slider middle
else if ( c = = ' ) ' )
c = 0xe082 ; //slider end
else if ( c = = ' + ' )
c = 0xe083 ; //slider box
else if ( c = = ' u ' | | c = = ' U ' )
{
//lower case u specifies exactly 4 nibbles.
//upper case U specifies exactly 8 nibbles.
unsigned int nibbles = ( c = = ' u ' ) ? 4 : 8 ;
c = 0 ;
while ( nibbles - - > 0 )
{
t = ( unsigned char ) * pr_file_p ;
if ( t > = ' 0 ' & & t < = ' 9 ' )
c = ( c * 16 ) + ( t - ' 0 ' ) ;
else if ( t > = ' A ' & & t < = ' F ' )
c = ( c * 16 ) + ( t - ' A ' ) + 10 ;
else if ( t > = ' a ' & & t < = ' f ' )
c = ( c * 16 ) + ( t - ' a ' ) + 10 ;
else
break ;
pr_file_p + + ;
}
if ( nibbles )
QCC_PR_ParseWarning ( ERR_BADCHARACTERCODE , " Unicode character terminated unexpectedly " ) ;
}
else if ( c = = ' x ' | | c = = ' X ' )
{
int d ;
c = 0 ;
d = ( unsigned char ) * pr_file_p + + ;
if ( d > = ' 0 ' & & d < = ' 9 ' )
c + = d - ' 0 ' ;
else if ( d > = ' A ' & & d < = ' F ' )
c + = d - ' A ' + 10 ;
else if ( d > = ' a ' & & d < = ' f ' )
c + = d - ' a ' + 10 ;
else
QCC_PR_ParseError ( ERR_BADCHARACTERCODE , " Bad character code " ) ;
c * = 16 ;
d = ( unsigned char ) * pr_file_p + + ;
if ( d > = ' 0 ' & & d < = ' 9 ' )
c + = d - ' 0 ' ;
else if ( d > = ' A ' & & d < = ' F ' )
c + = d - ' A ' + 10 ;
else if ( d > = ' a ' & & d < = ' f ' )
c + = d - ' a ' + 10 ;
else
QCC_PR_ParseError ( ERR_BADCHARACTERCODE , " Bad character code " ) ;
}
else if ( c = = ' \\ ' )
c = ' \\ ' ;
else if ( c = = ' \' ' )
c = ' \' ' ;
else if ( c > = ' 0 ' & & c < = ' 9 ' ) //WARNING: This is not octal, but uses 'yellow' numbers instead (as on hud).
c = 0xe012 + c - ' 0 ' ;
else if ( c = = ' \r ' )
{ //sigh
c = * pr_file_p + + ;
if ( c ! = ' \n ' )
QCC_PR_ParseWarning ( WARN_HANGINGSLASHR , " Hanging \\ \\ \r " ) ;
pr_source_line + + ;
}
else if ( c = = ' \n ' )
{ //sigh
pr_source_line + + ;
}
else
QCC_PR_ParseError ( ERR_INVALIDSTRINGIMMEDIATE , " Unknown escape char %c " , c ) ;
return c ;
}
2004-08-23 01:38:21 +00:00
void QCC_PR_LexString ( void )
{
2018-09-23 19:35:24 +00:00
unsigned int c , t ;
int bytecount ;
2014-02-07 08:38:40 +00:00
int len = 0 ;
2019-01-20 01:00:18 +00:00
char * end ;
const char * cnst ;
2014-01-15 02:13:58 +00:00
int raw ;
char rawdelim [ 64 ] ;
2018-10-11 10:31:23 +00:00
int stringtype ;
//0 - quake output, input is 8bit. warnings when its not ascii. \u will still give utf-8 text, other chars as-is. Expect \s to screw everything up with utf-8 output.
//1 - quake output, input is utf-8. due to editors not supporting it, that generally means the input (ab)uses markup.
//2 - utf-8 output, input is utf-8. welcome to the future! unfortunately not the present.
2004-08-23 01:38:21 +00:00
2014-01-15 02:13:58 +00:00
int texttype ;
pbool first = true ;
2010-07-03 21:49:48 +00:00
2014-01-15 02:13:58 +00:00
for ( ; ; )
2004-08-23 01:38:21 +00:00
{
2014-01-15 02:13:58 +00:00
raw = 0 ;
texttype = 0 ;
------------------------------------------------------------------------
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
2021-05-27 11:34:22 +00:00
QCC_PR_LexComment ( & pr_token_precomment ) ;
------------------------------------------------------------------------
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
2016-07-12 00:40:13 +00:00
if ( flag_qccx & & * pr_file_p = = ' : ' )
{
pr_file_p + + ;
pr_token [ len + + ] = 0 ;
continue ;
}
2014-01-15 02:13:58 +00:00
if ( * pr_file_p = = ' R ' & & pr_file_p [ 1 ] = = ' \" ' )
{
/*R"delim(fo
o ) delim " -> " fo \ no "
the [ ]
*/
raw = 1 ;
pr_file_p + = 2 ;
------------------------------------------------------------------------
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
2014-01-15 02:13:58 +00:00
while ( 1 )
{
c = * pr_file_p + + ;
if ( c = = ' ( ' )
------------------------------------------------------------------------
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
{
2014-01-15 02:13:58 +00:00
rawdelim [ 0 ] = ' ) ' ;
break ;
------------------------------------------------------------------------
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
}
2014-01-15 02:13:58 +00:00
if ( ! c | | raw > = sizeof ( rawdelim ) - 1 )
QCC_PR_ParseError ( ERR_EOF , " EOF while parsing raw string delimiter. Expected: R \" delim(string)delim \" " ) ;
rawdelim [ raw + + ] = c ;
------------------------------------------------------------------------
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
}
2014-01-15 02:13:58 +00:00
rawdelim [ raw + + ] = ' \" ' ;
2014-02-07 08:38:40 +00:00
//these two conditions are generally part of the C preprocessor.
if ( ! strncmp ( pr_file_p , " \\ \r \n " , 3 ) )
{ //dos format
pr_file_p + = 3 ;
pr_source_line + + ;
}
else if ( ! strncmp ( pr_file_p , " \\ \r " , 2 ) | | ! strncmp ( pr_file_p , " \\ \n " , 2 ) )
{ //mac + unix format
pr_file_p + = 2 ;
pr_source_line + + ;
}
2018-10-11 10:31:23 +00:00
stringtype = 0 ;
2014-01-15 02:13:58 +00:00
}
2018-09-23 19:35:24 +00:00
else if ( * pr_file_p = = ' Q ' & & pr_file_p [ 1 ] = = ' \" ' )
{ //quake output with utf-8 input (expect to need markup).
stringtype = 1 ;
pr_file_p + = 2 ;
}
else if ( ( * pr_file_p = = ' U ' | | * pr_file_p = = ' u ' | | * pr_file_p = = ' L ' ) & & pr_file_p [ 1 ] = = ' \" ' )
{ //unicode string, char32_t, char16_t, wchar_t respectively. we spit out utf-8 regardless.
2020-09-29 07:09:01 +00:00
QCC_PR_ParseWarning ( WARN_NOTUTF8 , " char32_t/char16_t/wchar_t strings are not supported, treating as u8 prefix (as utf-8) " ) ;
2018-09-23 19:35:24 +00:00
stringtype = 2 ;
pr_file_p + = 2 ;
}
else if ( * pr_file_p = = ' u ' & & pr_file_p [ 1 ] = = ' 8 ' & & pr_file_p [ 2 ] = = ' \" ' )
{ //utf-8 string.
stringtype = 2 ;
pr_file_p + = 3 ;
}
2014-01-15 02:13:58 +00:00
else if ( * pr_file_p = = ' \" ' )
2018-10-11 10:31:23 +00:00
{
stringtype = flag_utf8strings ? 2 : 0 ;
2014-01-15 02:13:58 +00:00
pr_file_p + + ;
2018-10-11 10:31:23 +00:00
}
2014-01-15 02:13:58 +00:00
else if ( first )
2018-10-11 10:31:23 +00:00
{
stringtype = 0 ;
2014-01-15 02:13:58 +00:00
QCC_PR_ParseError ( ERR_BADCHARACTERCODE , " Expected string constant " ) ;
2018-10-11 10:31:23 +00:00
}
2014-01-15 02:13:58 +00:00
else
break ;
first = false ;
2006-09-17 00:59:22 +00:00
2014-01-15 02:13:58 +00:00
for ( ; ; )
{
c = * pr_file_p + + ;
if ( ! c )
QCC_PR_ParseError ( ERR_EOF , " EOF inside quote " ) ;
2006-09-17 00:59:22 +00:00
2014-01-15 02:13:58 +00:00
if ( raw )
2013-03-12 22:32:25 +00:00
{
2014-02-07 08:38:40 +00:00
//raw strings contain very little parsing. just delimiter and initial \NL support.
2014-01-15 02:13:58 +00:00
if ( c = = rawdelim [ 0 ] & & ! strncmp ( pr_file_p , rawdelim + 1 , raw - 1 ) )
2013-03-12 22:32:25 +00:00
{
2014-01-15 02:13:58 +00:00
pr_file_p + = raw - 1 ;
break ;
}
2018-09-23 19:35:24 +00:00
//make sure line numbers are correct though.
2014-01-15 02:13:58 +00:00
if ( c = = ' \r ' & & * pr_file_p ! = ' \n ' )
pr_source_line + + ; //mac
if ( c = = ' \n ' ) //dos/unix
pr_source_line + + ;
2018-09-23 19:35:24 +00:00
goto forcebyte ;
2014-01-15 02:13:58 +00:00
}
else
{
if ( c = = ' \n ' )
QCC_PR_ParseError ( ERR_INVALIDSTRINGIMMEDIATE , " newline inside quote " ) ;
if ( c = = ' \\ ' )
{ // escape char
2020-09-11 01:18:32 +00:00
c = * pr_file_p ; //peek at it, for our hacks.
if ( c = = ' s ' | | c = = ' b ' )
2013-03-12 22:32:25 +00:00
{
2020-09-11 01:18:32 +00:00
pr_file_p + + ;
2018-10-11 10:31:23 +00:00
texttype ^ = 0xe080 ;
2014-01-15 02:13:58 +00:00
continue ;
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
else if ( c = = ' . ' )
2020-09-11 01:18:32 +00:00
{
pr_file_p + + ;
2018-09-23 19:35:24 +00:00
c = 0xe01c | texttype ;
2020-09-11 01:18:32 +00:00
}
2014-01-15 02:13:58 +00:00
else if ( c = = ' u ' | | c = = ' U ' )
2020-09-29 07:09:01 +00:00
{ //special hack, \u is a utf-8 code regardless of output encoding...
2020-09-11 01:18:32 +00:00
c = QCC_PR_LexEscapedCodepoint ( ) ;
2018-09-23 19:35:24 +00:00
goto forceutf8 ;
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
else if ( c = = ' x ' | | c = = ' X ' )
2020-09-29 07:09:01 +00:00
{ //special hack, \xXX in a string is an explicit byte regardless of encoding.
2020-09-11 01:18:32 +00:00
c = QCC_PR_LexEscapedCodepoint ( ) ;
2020-09-29 07:09:01 +00:00
// if (c > 0xff)
// QCC_PR_ParseWarning(ERR_BADCHARACTERCODE, "Bad unicode character code - codepoint %#x is above 0xFF", c);
2018-09-23 19:35:24 +00:00
goto forcebyte ;
2014-01-15 02:13:58 +00:00
}
else
2020-09-11 01:18:32 +00:00
{
c = QCC_PR_LexEscapedCodepoint ( ) ;
2020-09-29 07:09:01 +00:00
// if (stringtype != 2 && c > 0xff)
// QCC_PR_ParseWarning(ERR_BADCHARACTERCODE, "Bad legacy character code - codepoint %#x is above 0xFF", c);
2020-09-11 01:18:32 +00:00
}
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
else if ( c = = ' \" ' )
{
break ;
}
2021-07-03 01:47:16 +00:00
else if ( c = = ' # ' & & flag_macroinstrings )
2014-01-15 02:13:58 +00:00
{
for ( end = pr_file_p ; ; end + + )
{
if ( qcc_iswhite ( * end ) )
break ;
if ( * end = = ' ) '
| | * end = = ' ( '
| | * end = = ' + '
| | * end = = ' - '
| | * end = = ' * '
| | * end = = ' / '
| | * end = = ' \\ '
| | * end = = ' | '
| | * end = = ' & '
| | * end = = ' = '
| | * end = = ' ^ '
| | * end = = ' ~ '
| | * end = = ' [ '
| | * end = = ' ] '
| | * end = = ' \" '
| | * end = = ' { '
| | * end = = ' } '
| | * end = = ' ; '
| | * end = = ' : '
| | * end = = ' , '
| | * end = = ' . '
| | * end = = ' # ' )
break ;
}
c = * end ;
* end = ' \0 ' ;
cnst = QCC_PR_CheckCompConstString ( pr_file_p ) ;
if ( cnst = = pr_file_p )
{
2021-04-14 05:21:04 +00:00
if ( * pr_file_p )
QCC_PR_ParseWarning ( WARN_MACROINSTRING , " Unable to expand string macro %s " , pr_file_p ) ;
}
else if ( cnst )
{
QCC_PR_ParseWarning ( WARN_MACROINSTRING , " Macro %s expansion in string " , pr_file_p ) ;
* end = c ;
2014-01-15 02:13:58 +00:00
if ( len + strlen ( cnst ) > = sizeof ( pr_token ) - 1 )
2019-09-25 20:23:24 +00:00
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %u " , ( unsigned ) sizeof ( pr_token ) - 1 ) ;
2014-01-15 02:13:58 +00:00
strcpy ( pr_token + len , cnst ) ;
2021-04-14 05:21:04 +00:00
bytecount = strlen ( cnst ) ;
while ( bytecount > 0 & & qcc_iswhitesameline ( pr_token [ len + bytecount - 1 ] ) )
bytecount - - ; //make sure there's no trailing whitespace on the end.
len + = bytecount ;
2014-01-15 02:13:58 +00:00
pr_file_p = end ;
continue ;
}
2021-04-14 05:21:04 +00:00
* end = c ;
c = ' # ' ; //undo
2014-01-15 02:13:58 +00:00
}
else if ( c = = 0x7C & & flag_acc ) //reacc support... reacc is strange.
c = ' \n ' ;
else
2018-09-23 19:35:24 +00:00
{
2018-10-11 10:31:23 +00:00
unsigned int cp = c ;
2018-09-23 19:35:24 +00:00
unsigned int len = stringtype ? utf8_check ( pr_file_p - 1 , & cp ) : 0 ;
if ( ! len )
{ //invalid utf-8 encoding? don't treat it as utf-8!
2018-09-29 03:40:50 +00:00
if ( stringtype )
QCC_PR_ParseWarning ( ERR_BADCHARACTERCODE , " Input string is not valid utf-8 " ) ;
2018-10-11 10:31:23 +00:00
if ( c > = ' ' )
c | = texttype ;
goto forcebyte ;
2018-09-23 19:35:24 +00:00
}
if ( texttype )
{
2018-10-11 10:31:23 +00:00
if ( cp < ' ' )
c = cp ; //don't mask C0 chars like \t or \n
else if ( cp < 0x80 )
c = cp | 0xe080 ; //DO mask other ascii chars (and map to the private-use range at the same time, because this isn't standard unicode any more)
2018-09-23 19:35:24 +00:00
else
{
QCC_PR_ParseWarning ( ERR_BADCHARACTERCODE , " Unable to mask non-ascii chars. Attempting to mask bytes " ) ;
c | = texttype ;
goto forcequake ;
}
}
else
c = cp ;
pr_file_p + = len - 1 ;
}
}
2018-10-11 10:31:23 +00:00
// if (c >= 0x20 && c < 0x80)
// c |= 0xe000; //TEST
2018-09-23 19:35:24 +00:00
if ( stringtype = = 2 )
{ //we're outputting a utf-8 string.
forceutf8 :
if ( c > 0x10FFFFu ) //RFC 3629 imposes the same limit as UTF-16 surrogate pairs.
QCC_PR_ParseWarning ( WARN_NOTUTF8 , " Bad unicode character code - codepoint is above 0x10FFFFu " ) ;
//figure out the count of bytes required to encode this char
bytecount = 1 ;
2018-10-11 10:31:23 +00:00
t = 0x80 ;
while ( c > = t )
2018-09-23 19:35:24 +00:00
{
2018-10-11 10:31:23 +00:00
if ( bytecount = = 1 )
t < < = 4 ;
else if ( bytecount < 7 )
t < < = 5 ;
else
t < < = 6 ;
2018-09-23 19:35:24 +00:00
bytecount + + ;
}
//error if needed
if ( len + bytecount > = sizeof ( pr_token ) )
2019-09-25 20:23:24 +00:00
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %u " , ( unsigned ) sizeof ( pr_token ) - 1 ) ;
2018-09-23 19:35:24 +00:00
//output it.
if ( bytecount = = 1 )
pr_token [ len + + ] = ( unsigned char ) ( c & 0x7f ) ;
else
{
t = bytecount * 6 ;
2018-10-11 10:31:23 +00:00
t = t - 6 ;
2018-09-23 19:35:24 +00:00
pr_token [ len + + ] = ( unsigned char ) ( ( c > > t ) & ( 0x0000007f > > bytecount ) ) | ( 0xffffff00 > > bytecount ) ;
do
{
t = t - 6 ;
pr_token [ len + + ] = ( unsigned char ) ( ( c > > t ) & 0x3f ) | 0x80 ;
} while ( t ) ;
}
2013-03-12 22:32:25 +00:00
}
2018-09-23 19:35:24 +00:00
else
{
forcequake :
//we need to convert it to a quake char...
if ( c > = 0xe000 & & c < = 0xe0ff )
c = c & 0xff ; //this private use range is commonly used for quake's glyphs.
else if ( c > = 0 & & c < = 0x7f )
; //FIXME: SOME c0 codes are known to quake, but many got reused for random glyphs. however I'm going to treat quake as full ascii.
2018-10-11 10:31:23 +00:00
else if ( c > = 0x80 )
{
//FIXME: spit it out as ^{xxxxxx} instead
2018-09-23 19:35:24 +00:00
QCC_PR_ParseWarning ( WARN_NOTUTF8 , " Cannot convert character to quake's charset " ) ;
2018-10-11 10:31:23 +00:00
}
2014-01-15 02:13:58 +00:00
2018-09-23 19:35:24 +00:00
forcebyte :
if ( len > = sizeof ( pr_token ) - 1 )
2019-09-25 20:23:24 +00:00
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %u " , ( unsigned ) sizeof ( pr_token ) - 1 ) ;
2018-09-23 19:35:24 +00:00
pr_token [ len ] = c ;
len + + ;
}
2004-08-23 01:38:21 +00:00
}
2014-01-15 02:13:58 +00:00
}
if ( len > sizeof ( pr_immediate_string ) - 1 )
2019-09-25 20:23:24 +00:00
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %u " , ( unsigned ) sizeof ( pr_immediate_string ) - 1 ) ;
2014-01-15 02:13:58 +00:00
pr_token [ len ] = 0 ;
pr_token_type = tt_immediate ;
pr_immediate_type = type_string ;
2016-07-12 00:40:13 +00:00
memcpy ( pr_immediate_string , pr_token , len + 1 ) ;
pr_immediate_strlen = len ;
2014-01-15 02:13:58 +00:00
2018-09-29 03:40:50 +00:00
/*if (qccwarningaction[WARN_NOTUTF8] && stringtype != 1)
2014-01-15 02:13:58 +00:00
{
2018-09-29 03:40:50 +00:00
unsigned int code ;
2017-10-12 12:02:25 +00:00
size_t c ;
2016-07-12 00:40:13 +00:00
for ( c = 0 ; c < pr_immediate_strlen ; )
2004-08-23 01:38:21 +00:00
{
2014-05-21 06:21:09 +00:00
len = utf8_check ( & pr_token [ c ] , & code ) ;
2016-07-12 00:40:13 +00:00
if ( ! len | | c + len > pr_immediate_strlen )
2004-08-23 01:38:21 +00:00
{
2018-09-23 19:35:24 +00:00
QCC_PR_ParseWarning ( WARN_NOTUTF8 , " String literal is not valid utf-8 " ) ;
2014-05-21 06:21:09 +00:00
break ;
2004-08-23 01:38:21 +00:00
}
2016-07-12 00:40:13 +00:00
c + = len ;
2004-08-23 01:38:21 +00:00
}
2018-09-29 03:40:50 +00:00
} */
2004-08-23 01:38:21 +00:00
}
/*
= = = = = = = = = = = = = =
PR_LexNumber
= = = = = = = = = = = = = =
*/
int QCC_PR_LexInteger ( void )
{
int c ;
int len ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
len = 0 ;
c = * pr_file_p ;
2016-07-12 00:40:13 +00:00
if ( pr_file_p [ 0 ] = = ' 0 ' & & ( pr_file_p [ 1 ] = = ' x ' | | pr_file_p [ 1 ] = = ' X ' ) )
2004-08-23 01:38:21 +00:00
{
pr_token [ 0 ] = ' 0 ' ;
pr_token [ 1 ] = ' x ' ;
len = 2 ;
c = * ( pr_file_p + = 2 ) ;
}
do
{
pr_token [ len ] = c ;
len + + ;
pr_file_p + + ;
c = * pr_file_p ;
2012-01-17 07:57:46 +00:00
} while ( ( c > = ' 0 ' & & c < = ' 9 ' ) | | ( c = = ' . ' & & pr_file_p [ 1 ] ! = ' . ' ) | | ( c > = ' a ' & & c < = ' f ' ) ) ;
2004-08-23 01:38:21 +00:00
pr_token [ len ] = 0 ;
return atoi ( pr_token ) ;
}
2016-08-25 00:12:14 +00:00
# ifdef _MSC_VER
# define longlong __int64
# define LL(x) x##i64
# else
# define longlong long long
# define LL(x) x##ll
# endif
2018-10-11 10:31:23 +00:00
static void QCC_PR_LexNumber ( void )
2004-08-23 01:38:21 +00:00
{
2009-08-29 16:53:22 +00:00
int tokenlen = 0 ;
2016-08-25 00:12:14 +00:00
longlong num = 0 ;
2009-08-29 17:24:20 +00:00
int base = 0 ;
2004-08-23 01:38:21 +00:00
int c ;
int sign = 1 ;
if ( * pr_file_p = = ' - ' )
{
sign = - 1 ;
pr_file_p + + ;
2009-08-29 16:53:22 +00:00
pr_token [ tokenlen + + ] = ' - ' ;
2004-08-23 01:38:21 +00:00
}
2016-07-12 00:40:13 +00:00
if ( pr_file_p [ 0 ] = = ' 0 ' & & ( pr_file_p [ 1 ] = = ' x ' | | pr_file_p [ 1 ] = = ' X ' ) )
2004-08-23 01:38:21 +00:00
{
pr_file_p + = 2 ;
base = 16 ;
2009-08-29 16:53:22 +00:00
pr_token [ tokenlen + + ] = ' 0 ' ;
pr_token [ tokenlen + + ] = ' x ' ;
2004-08-23 01:38:21 +00:00
}
2020-09-11 01:18:32 +00:00
else if ( pr_file_p [ 0 ] = = ' 0 ' )
{
pr_file_p + + ;
if ( * pr_file_p > = ' 0 ' & & * pr_file_p < = ' 9 ' )
QCC_PR_ParseWarning ( WARN_GMQCC_SPECIFIC , " A leading 0 is interpreted as base-8. " ) ;
base = 8 ;
pr_token [ tokenlen + + ] = ' 0 ' ;
}
2004-08-23 01:38:21 +00:00
2009-08-29 17:24:20 +00:00
pr_immediate_type = NULL ;
//assume base 10 if not stated
if ( ! base )
base = 10 ;
2004-08-23 01:38:21 +00:00
while ( ( c = * pr_file_p ) )
2010-12-08 14:42:05 +00:00
{
2020-09-11 01:18:32 +00:00
if ( c > = ' 0 ' & & c < = ' 9 ' & & c < ' 0 ' + base )
2004-08-23 01:38:21 +00:00
{
2009-08-29 16:53:22 +00:00
pr_token [ tokenlen + + ] = c ;
2004-08-23 01:38:21 +00:00
num * = base ;
num + = c - ' 0 ' ;
}
2018-10-23 07:09:06 +00:00
else if ( c > = ' a ' & & c < = ' z ' & & c < ' a ' + base - 10 )
2004-08-23 01:38:21 +00:00
{
2009-08-29 16:53:22 +00:00
pr_token [ tokenlen + + ] = c ;
2004-08-23 01:38:21 +00:00
num * = base ;
num + = c - ' a ' + 10 ;
}
2018-10-23 07:09:06 +00:00
else if ( c > = ' A ' & & c < = ' Z ' & & c < ' A ' + base - 10 )
2004-08-23 01:38:21 +00:00
{
2009-08-29 16:53:22 +00:00
pr_token [ tokenlen + + ] = c ;
2004-08-23 01:38:21 +00:00
num * = base ;
num + = c - ' A ' + 10 ;
}
2012-01-17 07:57:46 +00:00
else if ( c = = ' . ' & & pr_file_p [ 1 ] ! = ' . ' )
2004-08-23 01:38:21 +00:00
{
2009-08-29 16:53:22 +00:00
pr_token [ tokenlen + + ] = c ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2020-09-29 07:09:01 +00:00
pr_immediate_type = flag_assume_double ? type_double : type_float ;
2004-08-23 01:38:21 +00:00
while ( 1 )
{
c = * pr_file_p ;
if ( c > = ' 0 ' & & c < = ' 9 ' )
{
2009-08-29 17:24:20 +00:00
pr_token [ tokenlen + + ] = c ;
2004-08-23 01:38:21 +00:00
}
2020-09-29 07:09:01 +00:00
else if ( c = = ' f ' | | c = = ' F ' )
2009-08-29 17:24:20 +00:00
{
pr_file_p + + ;
break ;
}
2020-09-29 07:09:01 +00:00
else if ( c = = ' d ' | | c = = ' D ' )
{
pr_immediate_type = type_double ;
pr_file_p + + ;
break ;
}
2004-08-23 01:38:21 +00:00
else
2010-12-08 14:42:05 +00:00
{
2004-08-23 01:38:21 +00:00
break ;
}
pr_file_p + + ;
}
2009-08-29 17:24:20 +00:00
pr_token [ tokenlen + + ] = 0 ;
2020-09-29 07:09:01 +00:00
if ( pr_immediate_type = = type_double )
pr_immediate . _double = atof ( pr_token ) ;
else
pr_immediate . _float = ( float ) atof ( pr_token ) ;
goto checkjunk ;
2004-08-23 01:38:21 +00:00
}
2020-09-29 07:09:01 +00:00
else if ( c = = ' f ' | | c = = ' F ' )
2012-01-17 07:57:46 +00:00
{
pr_token [ tokenlen + + ] = c ;
pr_token [ tokenlen + + ] = 0 ;
pr_file_p + + ;
pr_immediate_type = type_float ;
pr_immediate . _float = num * sign ;
2016-07-12 00:40:13 +00:00
num * = sign ;
2016-08-25 00:12:14 +00:00
if ( ( longlong ) pr_immediate . _float ! = ( longlong ) num )
2016-07-12 00:40:13 +00:00
QCC_PR_ParseWarning ( WARN_OVERFLOW , " numerical overflow " ) ;
2020-09-29 07:09:01 +00:00
goto checkjunk ;
2012-01-17 07:57:46 +00:00
}
2020-09-29 07:09:01 +00:00
else if ( c = = ' d ' | | c = = ' D ' )
{ //note: conflicts with hex. add a dot before it or something.
2009-08-29 17:24:20 +00:00
pr_token [ tokenlen + + ] = c ;
pr_token [ tokenlen + + ] = 0 ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2020-09-29 07:09:01 +00:00
pr_immediate_type = type_double ;
pr_immediate . _double = num * sign ;
2016-07-12 00:40:13 +00:00
num * = sign ;
2020-09-29 07:09:01 +00:00
if ( ( longlong ) pr_immediate . _double ! = ( longlong ) num )
QCC_PR_ParseWarning ( WARN_OVERFLOW , " numerical overflow " ) ;
goto checkjunk ;
}
else if ( c = = ' i ' | | c = = ' u ' | | c = = ' l ' | | c = = ' I ' | | c = = ' U ' | | c = = ' L ' )
{ //length and sign flags can be any order. LL suffix must have the same case (but not necessarily match the sign suffix)
int isunsigned ;
int islong = ( c = = ' l ' ) | | ( c = = ' L ' ) ;
pr_token [ tokenlen + + ] = c ;
pr_file_p + + ;
if ( islong )
{ //length suffix was first.
//long-long?
if ( * pr_file_p = = c )
pr_token [ tokenlen + + ] = * pr_file_p + + ;
//check for signed suffix...
c = * pr_file_p ;
isunsigned = ( c = = ' u ' ) | | ( c = = ' U ' ) ;
if ( c = = ' i ' | | c = = ' I ' | | isunsigned ) //ignore an explicit redundant 'i' char, for not-a-float.
pr_token [ tokenlen + + ] = * pr_file_p + + ;
}
else
2016-07-12 00:40:13 +00:00
{
2020-09-29 07:09:01 +00:00
isunsigned = ( c = = ' u ' ) | | ( c = = ' U ' ) ;
//we already made sure it u or i, and its not an l
c = * pr_file_p ;
if ( c = = ' l ' | | c = = ' L ' )
{
pr_token [ tokenlen + + ] = * pr_file_p + + ;
islong = true ;
//long-long?
if ( * pr_file_p = = c )
pr_token [ tokenlen + + ] = * pr_file_p + + ;
}
2016-07-12 00:40:13 +00:00
}
2020-09-29 07:09:01 +00:00
pr_token [ tokenlen + + ] = 0 ;
num * = sign ;
if ( islong )
{
pr_immediate_type = ( isunsigned ) ? type_uint64 : type_int64 ;
2021-08-04 21:17:31 +00:00
pr_immediate . i64 = num ;
2020-09-29 07:09:01 +00:00
}
else
{
pr_immediate_type = ( isunsigned ) ? type_uint : type_integer ;
pr_immediate . _int = num ;
if ( ( longlong ) pr_immediate . _int ! = ( longlong ) num )
{
if ( ( ( longlong ) pr_immediate . _int & LL ( 0xffffffff80000000 ) ) ! = LL ( 0xffffffff80000000 ) )
QCC_PR_ParseWarning ( WARN_OVERFLOW , " numerical overflow " ) ;
}
}
goto checkjunk ;
2004-08-23 01:38:21 +00:00
}
2009-08-29 17:24:20 +00:00
else
break ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
}
2009-08-29 16:53:22 +00:00
pr_token [ tokenlen + + ] = 0 ;
2004-08-23 01:38:21 +00:00
2009-08-29 17:24:20 +00:00
if ( ! pr_immediate_type )
{
2016-07-12 00:40:13 +00:00
//float f = num;
if ( flag_assume_integer ) // || (base != 10 && sign > 0 && (long long)f != (long long)num))
2009-08-29 17:24:20 +00:00
pr_immediate_type = type_integer ;
2016-07-12 00:40:13 +00:00
else if ( flag_qccx & & base = = 16 )
{
pr_immediate_type = type_float ;
goto qccxhex ;
}
2009-08-29 17:24:20 +00:00
else
pr_immediate_type = type_float ;
}
if ( pr_immediate_type = = type_integer )
2009-08-29 14:56:42 +00:00
{
pr_immediate_type = type_integer ;
2016-07-12 00:40:13 +00:00
qccxhex :
2009-08-29 14:56:42 +00:00
pr_immediate . _int = num * sign ;
2016-07-12 00:40:13 +00:00
num * = sign ;
2016-08-25 00:12:14 +00:00
if ( ( longlong ) pr_immediate . _int ! = ( longlong ) num )
2016-07-12 00:40:13 +00:00
{
2016-08-25 00:12:14 +00:00
if ( ( ( longlong ) pr_immediate . _int & LL ( 0xffffffff80000000 ) ) ! = LL ( 0xffffffff80000000 ) )
2016-07-12 00:40:13 +00:00
QCC_PR_ParseWarning ( WARN_OVERFLOW , " numerical overflow " ) ;
}
2009-08-29 14:56:42 +00:00
}
else
{
pr_immediate_type = type_float ;
2009-09-04 10:35:41 +00:00
// at this point, we know there's no . in it, so the NaN bug shouldn't happen
// and we cannot use atof on tokens like 0xabc, so use num*sign, it SHOULD be safe
//pr_immediate._float = atof(pr_token);
pr_immediate . _float = ( float ) ( num * sign ) ;
2016-07-12 00:40:13 +00:00
num * = sign ;
2016-08-25 00:12:14 +00:00
if ( ( longlong ) pr_immediate . _float ! = ( longlong ) num & & base = = 16 )
2016-07-12 00:40:13 +00:00
QCC_PR_ParseWarning ( WARN_OVERFLOW , " numerical overflow %lld will be rounded to %f " , num , pr_immediate . _float ) ;
2009-08-29 14:56:42 +00:00
}
2020-09-29 07:09:01 +00:00
checkjunk :
c = * pr_file_p ;
if ( ( c > = ' a ' & & c < = ' z ' ) | | ( c > = ' A ' & & c < = ' Z ' ) | | c = = ' _ ' | | ( c > = ' 0 ' & & c < = ' 9 ' ) | | ( c & 0x80 ) )
QCC_PR_ParseWarning ( ERR_NOTANUMBER , " bad suffix on number %s " , pr_token ) ;
2004-08-23 01:38:21 +00:00
}
2018-10-11 10:31:23 +00:00
static float QCC_PR_LexFloat ( void )
2004-08-23 01:38:21 +00:00
{
int c ;
int len ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
len = 0 ;
c = * pr_file_p ;
do
{
pr_token [ len ] = c ;
len + + ;
pr_file_p + + ;
c = * pr_file_p ;
2004-09-20 23:25:38 +00:00
} while ( ( c > = ' 0 ' & & c < = ' 9 ' ) | | ( c = = ' . ' & & pr_file_p [ 1 ] ! = ' . ' ) ) ; //only allow a . if the next isn't too...
2012-01-17 07:57:46 +00:00
if ( * pr_file_p = = ' f ' )
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
pr_token [ len ] = 0 ;
return ( float ) atof ( pr_token ) ;
}
/*
= = = = = = = = = = = = = =
PR_LexVector
Parses a single quoted vector
= = = = = = = = = = = = = =
*/
2018-10-11 10:31:23 +00:00
static void QCC_PR_LexVector ( void )
2004-08-23 01:38:21 +00:00
{
int i ;
2010-12-08 14:42:05 +00:00
2020-09-11 01:18:32 +00:00
pr_file_p + + ; //skip the leading ' char
2004-08-23 01:38:21 +00:00
if ( * pr_file_p = = ' \\ ' )
2008-01-28 13:27:30 +00:00
{ //extended character constant
2020-09-11 01:18:32 +00:00
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
2020-09-11 01:18:32 +00:00
pr_immediate . _float = QCC_PR_LexEscapedCodepoint ( ) ;
2004-08-23 01:38:21 +00:00
if ( * pr_file_p ! = ' \' ' )
2008-01-28 13:27:30 +00:00
QCC_PR_ParseError ( ERR_INVALIDVECTORIMMEDIATE , " Bad character constant " ) ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
return ;
}
2020-09-11 01:18:32 +00:00
if ( ( unsigned char ) * pr_file_p > = 0x80 )
{
int b = utf8_check ( pr_file_p , & pr_immediate . _int ) ; //utf-8 codepoint.
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
if ( flag_qccx )
QCC_PR_ParseWarning ( WARN_DENORMAL , " char constant: denormal " ) ;
else
pr_immediate . _float = pr_immediate . _int ;
pr_file_p + = b + 1 ;
return ;
}
else if ( pr_file_p [ 1 ] = = ' \' ' )
2004-08-23 01:38:21 +00:00
{ //character constant
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
2016-07-12 00:40:13 +00:00
if ( flag_qccx )
{
QCC_PR_ParseWarning ( WARN_DENORMAL , " char constant: denormal " ) ;
pr_immediate . _int = pr_file_p [ 0 ] ;
}
else
pr_immediate . _float = pr_file_p [ 0 ] ;
2004-08-23 01:38:21 +00:00
pr_file_p + = 2 ;
return ;
}
pr_token_type = tt_immediate ;
pr_immediate_type = type_vector ;
2013-12-29 22:48:28 +00:00
QCC_PR_LexWhitespace ( false ) ;
2004-08-23 01:38:21 +00:00
for ( i = 0 ; i < 3 ; i + + )
{
pr_immediate . vector [ i ] = QCC_PR_LexFloat ( ) ;
2013-12-29 22:48:28 +00:00
QCC_PR_LexWhitespace ( false ) ;
2006-09-17 00:59:22 +00:00
if ( * pr_file_p = = ' \' ' & & i = = 1 )
{
if ( i < 2 )
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
QCC_PR_ParseWarning ( WARN_FTE_SPECIFIC , " 2d vector " ) ;
2006-09-17 00:59:22 +00:00
for ( i + + ; i < 3 ; i + + )
pr_immediate . vector [ i ] = 0 ;
break ;
}
2004-08-23 01:38:21 +00:00
}
if ( * pr_file_p ! = ' \' ' )
QCC_PR_ParseError ( ERR_INVALIDVECTORIMMEDIATE , " Bad vector " ) ;
pr_file_p + + ;
}
/*
= = = = = = = = = = = = = =
PR_LexName
Parses an identifier
= = = = = = = = = = = = = =
*/
2018-10-11 10:31:23 +00:00
static void QCC_PR_LexName ( void )
2004-08-23 01:38:21 +00:00
{
2015-04-14 12:24:05 +00:00
unsigned int c ;
2004-08-23 01:38:21 +00:00
int len ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
len = 0 ;
do
{
2014-05-21 06:21:09 +00:00
int b = utf8_check ( pr_file_p , & c ) ;
if ( ! b )
{
unsigned char lead = * pr_file_p + + ;
char * o ;
while ( * pr_file_p & & ! utf8_check ( pr_file_p , & c ) )
pr_file_p + + ;
o = pr_file_p ;
while ( qcc_iswhite ( * pr_file_p ) )
{
if ( * pr_file_p = = ' \n ' )
break ;
pr_file_p + + ;
}
if ( * pr_file_p = = ' \n ' )
QCC_PR_ParseError ( ERR_NOTANAME , " Invalid UTF-8 code sequence at end of line. Lead byte was %#2x " , lead ) ;
else
{
len = 0 ;
while ( * pr_file_p & & ! qcc_iswhite ( * pr_file_p ) )
pr_token [ len + + ] = * pr_file_p + + ;
pr_token [ len + + ] = 0 ;
pr_file_p = o ;
QCC_PR_ParseError ( ERR_NOTANAME , " Invalid UTF-8 code sequence before %s. Lead byte was %#2x " , pr_token , lead ) ;
}
return ;
}
while ( b - - > 0 )
{
pr_token [ len ] = * pr_file_p + + ;
len + + ;
}
2004-08-23 01:38:21 +00:00
c = * pr_file_p ;
2010-12-08 14:42:05 +00:00
} while ( ( c > = ' a ' & & c < = ' z ' ) | | ( c > = ' A ' & & c < = ' Z ' ) | | c = = ' _ '
2018-05-28 21:09:15 +00:00
| | ( c > = ' 0 ' & & c < = ' 9 ' ) | | ( c & 0x80 ) ) ;
2004-08-23 01:38:21 +00:00
pr_token [ len ] = 0 ;
2010-12-08 14:42:05 +00:00
pr_token_type = tt_name ;
2004-08-23 01:38:21 +00:00
}
/*
= = = = = = = = = = = = = =
PR_LexPunctuation
= = = = = = = = = = = = = =
*/
2018-10-11 10:31:23 +00:00
static void QCC_PR_LexPunctuation ( void )
2004-08-23 01:38:21 +00:00
{
int i ;
int len ;
char * p ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
pr_token_type = tt_punct ;
2010-12-08 14:42:05 +00:00
2017-08-14 16:38:44 +00:00
if ( pr_file_p [ 0 ] = = ' * ' & & pr_file_p [ 1 ] = = ' * ' & & flag_dblstarexp )
2017-10-12 12:02:25 +00:00
{ //for compat with gmqcc. fteqcc uses *^ internally (which does not conflict with multiplying by dereferenced pointers - sucks for MSCLR c++ syntax)
2017-10-31 22:52:58 +00:00
QCC_PR_ParseWarning ( WARN_GMQCC_SPECIFIC , " ** is unsafe around pointers, use *^ instead. " , pr_token ) ;
2017-10-12 12:02:25 +00:00
strcpy ( pr_token , " *^ " ) ;
2017-08-14 16:38:44 +00:00
pr_file_p + = 2 ;
return ;
}
2004-08-23 01:38:21 +00:00
for ( i = 0 ; ( p = pr_punctuation [ i ] ) ! = NULL ; i + + )
{
len = strlen ( p ) ;
if ( ! strncmp ( p , pr_file_p , len ) )
{
2004-11-18 17:55:04 +00:00
strcpy ( pr_token , pr_punctuationremap [ i ] ) ;
2004-08-23 01:38:21 +00:00
if ( p [ 0 ] = = ' { ' )
pr_bracelevel + + ;
else if ( p [ 0 ] = = ' } ' )
pr_bracelevel - - ;
pr_file_p + = len ;
return ;
}
}
2010-12-08 14:42:05 +00:00
2017-08-14 16:38:44 +00:00
if ( ( unsigned char ) * pr_file_p = = ( unsigned char ) ' \\ ' & & pr_file_p [ 1 ] = = ' \r ' & & pr_file_p [ 2 ] = = ' \n ' )
pr_file_p + = 3 ;
else if ( ( unsigned char ) * pr_file_p = = ( unsigned char ) ' \\ ' & & ( pr_file_p [ 1 ] = = ' \r ' | | pr_file_p [ 1 ] = = ' \n ' ) )
pr_file_p + = 2 ;
2014-05-21 06:21:09 +00:00
else
2017-08-14 16:38:44 +00:00
{
if ( ( unsigned char ) * pr_file_p = = ( unsigned char ) 0xa0 )
QCC_PR_ParseWarning ( ERR_UNKNOWNPUCTUATION , " Unsupported punctuation: ' \\ x%x' - non-breaking space " , ( unsigned char ) * pr_file_p ) ;
else
QCC_PR_ParseWarning ( ERR_UNKNOWNPUCTUATION , " Unknown punctuation: ' \\ x%x' " , * pr_file_p ) ;
pr_file_p + + ;
}
2014-05-21 06:21:09 +00:00
QCC_PR_Lex ( ) ;
2004-08-23 01:38:21 +00:00
}
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
/*
= = = = = = = = = = = = = =
PR_LexWhitespace
= = = = = = = = = = = = = =
*/
2013-12-29 22:48:28 +00:00
void QCC_PR_LexWhitespace ( pbool inhibitpreprocessor )
2004-08-23 01:38:21 +00:00
{
int c ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
while ( 1 )
{
// skip whitespace
------------------------------------------------------------------------
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
while ( ( c = * pr_file_p ) & & qcc_iswhite ( c ) )
2004-08-23 01:38:21 +00:00
{
2017-03-04 19:36:06 +00:00
if ( qcc_islineending ( c , pr_file_p [ 1 ] ) )
2004-08-23 01:38:21 +00:00
{
2008-11-09 22:29:28 +00:00
pr_file_p + + ;
2013-12-29 22:48:28 +00:00
if ( ! inhibitpreprocessor )
QCC_PR_NewLine ( false ) ;
2014-05-16 01:34:58 +00:00
else
pr_source_line + + ;
2004-08-23 01:38:21 +00:00
if ( ! pr_file_p )
return ;
}
2008-11-09 22:29:28 +00:00
else
pr_file_p + + ;
2004-08-23 01:38:21 +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
if ( c = = 0 )
return ; // end of file
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
// skip // comments
if ( c = = ' / ' & & pr_file_p [ 1 ] = = ' / ' )
{
2017-03-04 19:36:06 +00:00
while ( * pr_file_p & & ! qcc_islineending ( pr_file_p [ 0 ] , pr_file_p [ 1 ] ) )
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2008-11-09 22:29:28 +00:00
2017-03-04 19:36:06 +00:00
if ( * pr_file_p )
2008-11-09 22:29:28 +00:00
pr_file_p + + ; //don't break on eof.
2013-12-29 22:48:28 +00:00
if ( ! inhibitpreprocessor )
QCC_PR_NewLine ( false ) ;
2014-05-16 01:34:58 +00:00
else
pr_source_line + + ;
2004-08-23 01:38:21 +00:00
continue ;
}
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
// skip /* */ comments
if ( c = = ' / ' & & pr_file_p [ 1 ] = = ' * ' )
{
2014-01-13 02:33:11 +00:00
pr_file_p + = 1 ;
2004-08-23 01:38:21 +00:00
do
{
2014-01-13 02:33:11 +00:00
pr_file_p + + ;
2017-03-04 19:36:06 +00:00
if ( qcc_islineending ( pr_file_p [ 0 ] , pr_file_p [ 1 ] ) )
2008-11-09 22:29:28 +00:00
{
2013-12-29 22:48:28 +00:00
if ( ! inhibitpreprocessor )
QCC_PR_NewLine ( true ) ;
2014-05-16 01:34:58 +00:00
else
pr_source_line + + ;
2008-11-09 22:29:28 +00:00
}
2004-08-23 01:38:21 +00:00
if ( pr_file_p [ 1 ] = = 0 )
{
2011-10-03 02:45:44 +00:00
QCC_PR_ParseError ( 0 , " EOF inside comment \n " ) ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
return ;
}
2018-08-18 13:33:50 +00:00
if ( pr_file_p [ 0 ] = = ' / ' & & pr_file_p [ 1 ] = = ' * ' )
QCC_PR_ParseWarning ( WARN_NESTEDCOMMENT , " \" /* \" inside comment " ) ;
2009-07-03 19:02:42 +00:00
} while ( pr_file_p [ 0 ] ! = ' * ' | | pr_file_p [ 1 ] ! = ' / ' ) ;
pr_file_p + = 2 ;
2004-08-23 01:38:21 +00:00
continue ;
}
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
break ; // a real character has been found
}
}
//============================================================================
# define MAX_FRAMES 8192
2005-02-28 07:16:19 +00:00
char pr_framemodelname [ 64 ] ;
2016-11-20 20:52:41 +00:00
struct
{
char name [ 64 ] ;
int value ;
const char * file ; //compare to s_filen to see if its current or not
} pr_framemacro [ MAX_FRAMES ] ;
int pr_nummacros ;
int pr_macrovalue ; //next value to use
int pr_savedmacro ; //for sub-groups.
2004-08-23 01:38:21 +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
void QCC_PR_ClearGrabMacros ( pbool newfile )
2004-08-23 01:38:21 +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
if ( ! newfile )
pr_nummacros = 0 ;
2004-08-23 01:38:21 +00:00
pr_macrovalue = 0 ;
pr_savedmacro = - 1 ;
}
2018-10-11 10:31:23 +00:00
static int QCC_PR_FindMacro ( char * name )
2004-08-23 01:38:21 +00:00
{
int i ;
2004-11-15 13:03:32 +00:00
for ( i = pr_nummacros - 1 ; i > = 0 ; i - - )
2004-08-23 01:38:21 +00:00
{
2016-11-20 20:52:41 +00:00
if ( ! STRCMP ( name , pr_framemacro [ i ] . name ) )
2004-08-23 01:38:21 +00:00
{
2016-11-20 20:52:41 +00:00
if ( pr_framemacro [ i ] . file ! = s_filen )
2017-02-01 04:42:33 +00:00
QCC_PR_ParseWarning ( WARN_STALEMACRO , " Stale macro used (%s, defined in %s) " , pr_token , pr_framemacro [ i ] . file ) ;
2016-11-20 20:52:41 +00:00
return pr_framemacro [ i ] . value ;
2004-08-23 01:38:21 +00:00
}
}
2004-11-15 13:03:32 +00:00
for ( i = pr_nummacros - 1 ; i > = 0 ; i - - )
2004-08-23 01:38:21 +00:00
{
2016-11-20 20:52:41 +00:00
if ( ! stricmp ( name , pr_framemacro [ i ] . name ) )
2004-08-23 01:38:21 +00:00
{
2016-11-20 20:52:41 +00:00
QCC_PR_ParseWarning ( WARN_CASEINSENSITIVEFRAMEMACRO , " Case insensitive frame macro (using %s) " , pr_framemacro [ i ] . name ) ;
if ( pr_framemacro [ i ] . file ! = s_filen )
2017-02-01 04:42:33 +00:00
QCC_PR_ParseWarning ( WARN_STALEMACRO , " Stale macro used (%s, defined in %s) " , pr_token , pr_framemacro [ i ] . file ) ;
2016-11-20 20:52:41 +00:00
return pr_framemacro [ i ] . value ;
2004-08-23 01:38:21 +00:00
}
}
2005-02-28 07:16:19 +00:00
return - 1 ;
}
2018-10-11 10:31:23 +00:00
static void QCC_PR_ExpandMacro ( void )
2005-02-28 07:16:19 +00:00
{
int i = QCC_PR_FindMacro ( pr_token ) ;
if ( i < 0 )
QCC_PR_ParseError ( ERR_BADFRAMEMACRO , " Unknown frame macro $%s " , pr_token ) ;
2015-02-02 08:01:53 +00:00
QC_snprintfz ( pr_token , sizeof ( pr_token ) , " %d " , i ) ;
2005-02-28 07:16:19 +00:00
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
pr_immediate . _float = ( float ) i ;
2004-08-23 01:38:21 +00:00
}
2016-09-08 19:04:35 +00:00
pbool QCC_PR_SimpleGetString ( void )
{
int c ;
int i = 0 ;
char * f ;
pr_token [ 0 ] = 0 ;
// skip whitespace
while ( ( c = * pr_file_p ) & & qcc_iswhite ( c ) )
{
if ( c = = ' \n ' )
return false ;
pr_file_p + + ;
}
if ( c = = 0 ) //eof
return false ;
//abort if there's a comment.
if ( pr_file_p [ 0 ] = = ' / ' )
{
if ( pr_file_p [ 1 ] = = ' / ' )
{ //comment alert
while ( * pr_file_p & & * pr_file_p ! = ' \n ' )
pr_file_p + + ;
return false ;
}
if ( pr_file_p [ 1 ] = = ' * ' )
return false ;
}
if ( * pr_file_p ! = ' \" ' )
return false ; //nope, not a string.
f = pr_file_p + 1 ;
while ( * f )
{
if ( * f = = ' \n ' | | ! * f )
{ //bad string
QCC_Error ( ERR_INTERNAL , " new line inside string " ) ;
pr_token [ 0 ] = 0 ;
return false ;
}
if ( * f = = ' \" ' )
{ //end-of-string
pr_token [ i ] = 0 ;
pr_file_p = f + 1 ;
return false ;
}
if ( i = = sizeof ( qcc_token ) - 1 )
QCC_Error ( ERR_INTERNAL , " token exceeds %i chars " , i ) ;
if ( * f = = ' \\ ' )
{
f + + ;
if ( ! * f )
f = " " ;
else if ( * f = = ' n ' )
{
pr_token [ i + + ] = ' \n ' ;
f + + ;
}
else if ( * f = = ' r ' )
{
pr_token [ i + + ] = ' \r ' ;
f + + ;
}
else if ( * f = = ' t ' )
{
pr_token [ i + + ] = ' \t ' ;
f + + ;
}
else
pr_token [ i + + ] = * f + + ;
}
else
pr_token [ i + + ] = * f + + ;
}
return true ;
}
2004-08-23 01:38:21 +00:00
// just parses text, returning false if an eol is reached
pbool QCC_PR_SimpleGetToken ( void )
{
int c ;
int i ;
2004-11-15 13:03:32 +00:00
2008-10-16 23:04:36 +00:00
pr_token [ 0 ] = 0 ;
2004-08-23 01:38:21 +00:00
// skip whitespace
------------------------------------------------------------------------
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
while ( ( c = * pr_file_p ) & & qcc_iswhite ( c ) )
2004-08-23 01:38:21 +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
if ( c = = ' \n ' )
2004-08-23 01:38:21 +00:00
return false ;
pr_file_p + + ;
}
------------------------------------------------------------------------
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
if ( c = = 0 ) //eof
return false ;
2005-01-04 08:22:03 +00:00
if ( pr_file_p [ 0 ] = = ' / ' )
{
if ( pr_file_p [ 1 ] = = ' / ' )
{ //comment alert
while ( * pr_file_p & & * pr_file_p ! = ' \n ' )
pr_file_p + + ;
return false ;
}
2005-02-28 07:16:19 +00:00
if ( pr_file_p [ 1 ] = = ' * ' )
return false ;
2005-01-04 08:22:03 +00:00
}
2004-11-15 13:03:32 +00:00
2004-08-23 01:38:21 +00:00
i = 0 ;
2014-05-21 06:21:09 +00:00
while ( ( c = * pr_file_p ) & & ! qcc_iswhite ( c ) & & c ! = ' , ' & & c ! = ' ; ' & & c ! = ' ) ' & & c ! = ' ( ' & & c ! = ' ] ' & & ! ( c = = ' / ' & & pr_file_p [ 1 ] = = ' / ' ) )
2004-08-23 01:38:21 +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
if ( i = = sizeof ( qcc_token ) - 1 )
QCC_Error ( ERR_INTERNAL , " token exceeds %i chars " , i ) ;
2004-08-23 01:38:21 +00:00
pr_token [ i ] = c ;
i + + ;
pr_file_p + + ;
}
pr_token [ i ] = 0 ;
2005-02-28 07:16:19 +00:00
return i ! = 0 ;
2004-08-23 01:38:21 +00:00
}
2018-10-11 10:31:23 +00:00
static pbool QCC_PR_LexMacroName ( void )
2008-10-30 11:10:58 +00:00
{
int c ;
int i ;
pr_token [ 0 ] = 0 ;
// skip whitespace
------------------------------------------------------------------------
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
while ( ( c = * pr_file_p ) & & qcc_iswhite ( c ) )
2008-10-30 11:10:58 +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
if ( c = = ' \n ' )
2008-10-30 11:10:58 +00:00
return false ;
pr_file_p + + ;
}
------------------------------------------------------------------------
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
if ( ! c )
return false ;
2008-10-30 11:10:58 +00:00
if ( pr_file_p [ 0 ] = = ' / ' )
{
if ( pr_file_p [ 1 ] = = ' / ' )
{ //comment alert
while ( * pr_file_p & & * pr_file_p ! = ' \n ' )
pr_file_p + + ;
return false ;
}
if ( pr_file_p [ 1 ] = = ' * ' )
return false ;
}
i = 0 ;
2014-07-01 07:01:33 +00:00
while ( ( c = * pr_file_p ) > ' ' & & c ! = ' \n ' & & c ! = ' , ' & & c ! = ' ; ' & & c ! = ' & ' & & c ! = ' | ' & & c ! = ' ) ' & & c ! = ' ( ' & & c ! = ' ] ' & & ! ( pr_file_p [ 0 ] = = ' . ' & & pr_file_p [ 1 ] = = ' . ' ) )
2008-10-30 11:10:58 +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
if ( i = = sizeof ( qcc_token ) - 1 )
QCC_Error ( ERR_INTERNAL , " token exceeds %i chars " , i ) ;
2008-10-30 11:10:58 +00:00
pr_token [ i ] = c ;
i + + ;
pr_file_p + + ;
}
pr_token [ i ] = 0 ;
return i ! = 0 ;
}
2018-10-11 10:31:23 +00:00
static void QCC_PR_MacroFrame ( char * name , int value , pbool force )
2004-08-23 01:38:21 +00:00
{
2004-11-15 13:03:32 +00:00
int i ;
2005-02-28 07:16:19 +00:00
for ( i = pr_nummacros - 1 ; i > = 0 ; i - - )
2004-08-23 01:38:21 +00:00
{
2016-11-20 20:52:41 +00:00
if ( ! STRCMP ( name , pr_framemacro [ i ] . name ) )
2004-11-15 13:03:32 +00:00
{
2016-11-20 20:52:41 +00:00
//vanilla macro behaviour is to not realise that there's dupes. lookups find the first, so dupes end up as dead gaps.
//our caller incremented the value externally
//so warn+ignore if its from the same file
if ( pr_framemacro [ i ] . file = = s_filen & & ! force )
2017-02-28 05:04:41 +00:00
QCC_PR_ParseWarning ( WARN_DUPLICATEMACRO , " Duplicate macro defined (%s). Rename it. " , pr_token ) ;
2016-11-20 20:52:41 +00:00
else
{
pr_framemacro [ i ] . value = value ; //old file, override it, whatever the old value was is redundant now
pr_framemacro [ i ] . file = s_filen ;
}
2005-02-28 07:16:19 +00:00
return ;
2004-11-15 13:03:32 +00:00
}
2005-02-28 07:16:19 +00:00
}
2004-11-15 13:03:32 +00:00
2016-11-20 20:52:41 +00:00
if ( strlen ( name ) + 1 > sizeof ( pr_framemacro [ 0 ] . name ) )
2008-01-16 03:43:53 +00:00
QCC_PR_ParseWarning ( ERR_TOOMANYFRAMEMACROS , " Name for frame macro %s is too long " , name ) ;
else
{
2016-11-20 20:52:41 +00:00
strcpy ( pr_framemacro [ pr_nummacros ] . name , name ) ;
pr_framemacro [ pr_nummacros ] . value = value ;
pr_framemacro [ pr_nummacros ] . file = s_filen ;
2008-01-16 03:43:53 +00:00
pr_nummacros + + ;
if ( pr_nummacros > = MAX_FRAMES )
QCC_PR_ParseError ( ERR_TOOMANYFRAMEMACROS , " Too many frame macros defined " ) ;
}
2005-02-28 07:16:19 +00:00
}
2004-11-15 13:03:32 +00:00
2018-10-11 10:31:23 +00:00
static void QCC_PR_ParseFrame ( void )
2005-02-28 07:16:19 +00:00
{
2008-10-30 11:10:58 +00:00
while ( QCC_PR_LexMacroName ( ) )
2005-02-28 07:16:19 +00:00
{
2016-11-20 20:52:41 +00:00
QCC_PR_MacroFrame ( pr_token , pr_macrovalue + + , false ) ;
2004-08-23 01:38:21 +00:00
}
}
/*
= = = = = = = = = = = = = =
PR_LexGrab
Deals with counting sequence numbers and replacing frame macros
= = = = = = = = = = = = = =
*/
2018-10-11 10:31:23 +00:00
static void QCC_PR_LexGrab ( void )
2010-12-08 14:42:05 +00:00
{
2004-08-23 01:38:21 +00:00
pr_file_p + + ; // skip the $
// if (!QCC_PR_SimpleGetToken ())
// QCC_PR_ParseError ("hanging $");
------------------------------------------------------------------------
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
if ( qcc_iswhite ( * pr_file_p ) )
2004-08-23 01:38:21 +00:00
QCC_PR_ParseError ( ERR_BADFRAMEMACRO , " hanging $ " ) ;
2008-10-30 11:10:58 +00:00
QCC_PR_LexMacroName ( ) ;
2004-08-23 01:38:21 +00:00
if ( ! * pr_token )
QCC_PR_ParseError ( ERR_BADFRAMEMACRO , " hanging $ " ) ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
// check for $frame
if ( ! STRCMP ( pr_token , " frame " ) | | ! STRCMP ( pr_token , " framesave " ) )
{
QCC_PR_ParseFrame ( ) ;
QCC_PR_Lex ( ) ;
}
// ignore other known $commands - just for model/spritegen
else if ( ! STRCMP ( pr_token , " cd " )
| | ! STRCMP ( pr_token , " origin " )
| | ! STRCMP ( pr_token , " base " )
| | ! STRCMP ( pr_token , " flags " )
| | ! STRCMP ( pr_token , " scale " )
| | ! STRCMP ( pr_token , " skin " ) )
{ // skip to end of line
2008-10-30 11:10:58 +00:00
while ( QCC_PR_LexMacroName ( ) )
2004-08-23 01:38:21 +00:00
;
QCC_PR_Lex ( ) ;
}
else if ( ! STRCMP ( pr_token , " flush " ) )
{
------------------------------------------------------------------------
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
QCC_PR_ClearGrabMacros ( true ) ;
2008-10-30 11:10:58 +00:00
while ( QCC_PR_LexMacroName ( ) )
2004-08-23 01:38:21 +00:00
;
QCC_PR_Lex ( ) ;
}
2021-02-17 03:55:20 +00:00
else if ( ! STRCMP ( pr_token , " frame_reset " ) )
{ //for compat with qfcc. full reset of all frame macros.
QCC_PR_ClearGrabMacros ( false ) ;
while ( QCC_PR_LexMacroName ( ) )
;
QCC_PR_Lex ( ) ;
}
2004-08-23 01:38:21 +00:00
else if ( ! STRCMP ( pr_token , " framevalue " ) )
{
2008-10-30 11:10:58 +00:00
QCC_PR_LexMacroName ( ) ;
2004-08-23 01:38:21 +00:00
pr_macrovalue = atoi ( pr_token ) ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
}
else if ( ! STRCMP ( pr_token , " framerestore " ) )
{
2008-10-30 11:10:58 +00:00
QCC_PR_LexMacroName ( ) ;
2005-02-28 07:16:19 +00:00
QCC_PR_ExpandMacro ( ) ;
2004-08-23 01:38:21 +00:00
pr_macrovalue = ( int ) pr_immediate . _float ;
2010-12-08 14:42:05 +00:00
2005-02-28 07:16:19 +00:00
QCC_PR_Lex ( ) ;
}
else if ( ! STRCMP ( pr_token , " modelname " ) )
{
int i ;
2008-10-30 11:10:58 +00:00
QCC_PR_LexMacroName ( ) ;
2005-02-28 07:16:19 +00:00
if ( * pr_framemodelname )
2016-11-20 20:52:41 +00:00
QCC_PR_MacroFrame ( pr_framemodelname , pr_macrovalue , true ) ;
2005-02-28 07:16:19 +00:00
2018-10-13 06:20:49 +00:00
if ( ! QC_strlcpy ( pr_framemodelname , pr_token , sizeof ( pr_framemodelname ) ) )
QCC_PR_ParseWarning ( WARN_STRINGTOOLONG , " $modelname name too long " ) ;
2005-02-28 07:16:19 +00:00
i = QCC_PR_FindMacro ( pr_framemodelname ) ;
if ( i )
pr_macrovalue = i ;
else
i = 0 ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
}
// look for a frame name macro
else
2005-02-28 07:16:19 +00:00
QCC_PR_ExpandMacro ( ) ;
2004-08-23 01:38:21 +00:00
}
//===========================
//compiler constants - dmw
2019-01-20 01:00:18 +00:00
pbool QCC_PR_UndefineName ( const char * name )
2004-08-23 01:38:21 +00:00
{
// int a;
CompilerConstant_t * c ;
2005-02-09 19:32:30 +00:00
c = pHash_Get ( & compconstantstable , name ) ;
2004-08-23 01:38:21 +00:00
if ( ! c )
2004-09-07 18:27:08 +00:00
{
2005-09-28 16:57:10 +00:00
QCC_PR_ParseWarning ( WARN_UNDEFNOTDEFINED , " Precompiler constant %s was not defined " , name ) ;
2004-08-23 01:38:21 +00:00
return false ;
2004-09-07 18:27:08 +00:00
}
2004-08-23 01:38:21 +00:00
Hash_Remove ( & compconstantstable , name ) ;
return true ;
}
2019-01-20 01:00:18 +00:00
CompilerConstant_t * QCC_PR_DefineName ( const char * name )
2004-08-23 01:38:21 +00:00
{
int i ;
CompilerConstant_t * cnst ;
2011-11-08 06:00:35 +00:00
if ( strlen ( name ) > = MAXCONSTANTNAMELENGTH | | ! * name )
2010-07-03 21:49:48 +00:00
QCC_PR_ParseError ( ERR_NAMETOOLONG , " Compiler constant name length is too long or short " ) ;
2010-12-08 14:42:05 +00:00
2005-02-09 19:32:30 +00:00
cnst = pHash_Get ( & compconstantstable , name ) ;
2010-07-03 21:49:48 +00:00
if ( cnst )
2004-09-07 18:27:08 +00:00
{
QCC_PR_ParseWarning ( WARN_DUPLICATEDEFINITION , " Duplicate definition for Precompiler constant %s " , name ) ;
Hash_Remove ( & compconstantstable , name ) ;
}
2004-08-23 01:38:21 +00:00
cnst = qccHunkAlloc ( sizeof ( CompilerConstant_t ) ) ;
cnst - > used = false ;
2015-04-14 12:24:05 +00:00
cnst - > numparams = - 1 ;
2013-12-29 22:48:28 +00:00
cnst - > evil = false ;
2004-08-23 01:38:21 +00:00
strcpy ( cnst - > name , name ) ;
cnst - > namelen = strlen ( name ) ;
2010-07-03 21:49:48 +00:00
cnst - > value = cnst - > name + strlen ( cnst - > name ) ;
2004-08-23 01:38:21 +00:00
for ( i = 0 ; i < MAXCONSTANTPARAMS ; i + + )
cnst - > params [ i ] [ 0 ] = ' \0 ' ;
2005-02-09 19:32:30 +00:00
pHash_Add ( & compconstantstable , cnst - > name , cnst , qccHunkAlloc ( sizeof ( bucket_t ) ) ) ;
2004-08-23 01:38:21 +00:00
return cnst ;
}
2014-05-16 01:34:58 +00:00
void QCC_PR_PreProcessor_Define ( pbool append )
2005-09-28 16:57:10 +00:00
{
2004-08-23 01:38:21 +00:00
char * d ;
2010-07-03 21:49:48 +00:00
char * dbuf ;
int dbuflen ;
2004-08-23 01:38:21 +00:00
char * s ;
int quote = false ;
2013-09-26 14:36:52 +00:00
pbool preprocessorhack = false ;
2014-05-16 01:34:58 +00:00
CompilerConstant_t * cnst , * oldcnst ;
2004-08-23 01:38:21 +00:00
QCC_PR_SimpleGetToken ( ) ;
2010-12-08 14:42:05 +00:00
if ( ! QCC_PR_SimpleGetToken ( ) )
2004-08-23 01:38:21 +00:00
QCC_PR_ParseError ( ERR_NONAME , " No name defined for compiler constant " ) ;
2014-05-16 01:34:58 +00:00
oldcnst = pHash_Get ( & compconstantstable , pr_token ) ;
if ( oldcnst )
Hash_Remove ( & compconstantstable , oldcnst - > name ) ;
2004-08-23 01:38:21 +00:00
cnst = QCC_PR_DefineName ( pr_token ) ;
if ( * pr_file_p = = ' ( ' )
{
2015-04-14 12:24:05 +00:00
cnst - > numparams = 0 ;
2013-12-29 22:48:28 +00:00
pr_file_p + + ;
while ( qcc_iswhitesameline ( * pr_file_p ) )
pr_file_p + + ;
s = pr_file_p ;
for ( ; ; )
2004-08-23 01:38:21 +00:00
{
2013-12-29 22:48:28 +00:00
if ( * pr_file_p = = ' , ' | | * pr_file_p = = ' ) ' )
2004-08-23 01:38:21 +00:00
{
2013-12-29 22:48:28 +00:00
int nl ;
nl = pr_file_p - s ;
while ( qcc_iswhitesameline ( s [ nl ] ) )
nl - - ;
2008-11-09 22:29:28 +00:00
if ( cnst - > numparams > = MAXCONSTANTPARAMS )
QCC_PR_ParseError ( ERR_MACROTOOMANYPARMS , " May not have more than %i parameters to a macro " , MAXCONSTANTPARAMS ) ;
2013-12-29 22:48:28 +00:00
if ( nl > = MAXCONSTANTPARAMLENGTH )
QCC_PR_ParseError ( ERR_MACROTOOMANYPARMS , " parameter name is too long (max %i) " , MAXCONSTANTPARAMLENGTH ) ;
if ( nl = = 3 & & s [ 0 ] = = ' . ' & & s [ 1 ] = = ' . ' & & s [ 2 ] = = ' . ' )
{
cnst - > varg = true ;
if ( * pr_file_p ! = ' ) ' )
QCC_PR_ParseError ( ERR_MACROTOOMANYPARMS , " varadic argument must be last " ) ;
}
else
{
memcpy ( cnst - > params [ cnst - > numparams ] , s , nl ) ;
cnst - > params [ cnst - > numparams ] [ nl ] = ' \0 ' ;
2017-08-14 16:38:44 +00:00
for ( nl = 0 ; nl < cnst - > numparams ; nl + + )
{
if ( ! strcmp ( cnst - > params [ nl ] , cnst - > params [ cnst - > numparams ] ) )
QCC_PR_ParseError ( ERR_MACROTOOMANYPARMS , " duplicate macro paramter name '%s' " , cnst - > params [ nl ] ) ;
}
2013-12-29 22:48:28 +00:00
cnst - > numparams + + ;
}
if ( * pr_file_p + + = = ' ) ' )
break ;
while ( qcc_iswhitesameline ( * pr_file_p ) )
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
s = pr_file_p ;
}
2013-12-29 22:48:28 +00:00
if ( ! * pr_file_p + + )
2004-08-23 01:38:21 +00:00
{
2014-05-16 01:34:58 +00:00
QCC_PR_ParseError ( ERR_EXPECTED , " missing ) in macro parameter list " ) ;
2004-08-23 01:38:21 +00:00
break ;
}
}
}
else cnst - > numparams = - 1 ;
2014-05-16 01:34:58 +00:00
//disable append mode if they're trying to do something stupid
if ( append )
{
if ( ! oldcnst )
append = false ; //append with no previous define is treated as just a regular define. huzzah.
else if ( cnst - > numparams ! = oldcnst - > numparams | | cnst - > varg ! = oldcnst - > varg )
{
QCC_PR_ParseWarning ( WARN_DUPLICATEPRECOMPILER , " different number of macro arguments in macro append " ) ;
append = false ;
}
else
{
int i ;
//arguments need to be specified, if only so that appends with arguments are still vaugely readable.
//argument names need to match because the expansion is too lame to cope if they're different.
for ( i = 0 ; i < cnst - > numparams ; i + + )
{
if ( strcmp ( cnst - > params [ i ] , oldcnst - > params [ i ] ) )
break ;
}
if ( i < cnst - > numparams )
{
QCC_PR_ParseWarning ( WARN_DUPLICATEPRECOMPILER , " arguments differ in macro append " ) ;
append = false ;
}
else
append = true ;
}
}
2004-08-23 01:38:21 +00:00
s = pr_file_p ;
2010-07-03 21:49:48 +00:00
d = dbuf = NULL ;
dbuflen = 0 ;
2014-05-16 01:34:58 +00:00
if ( append )
{
//start with the old value
int olen = strlen ( oldcnst - > value ) ;
dbuflen = olen + 128 ;
dbuf = qccHunkAlloc ( dbuflen ) ;
memcpy ( dbuf , oldcnst - > value , olen ) ;
d = dbuf + olen ;
* d + + = ' ' ;
}
2017-08-14 16:38:44 +00:00
cnst - > fromfile = s_filen ;
cnst - > fromline = pr_source_line ;
2004-08-23 01:38:21 +00:00
while ( * s = = ' ' | | * s = = ' \t ' )
s + + ;
while ( 1 )
{
2010-07-03 21:49:48 +00:00
if ( ( d - dbuf ) + 2 > = dbuflen )
{
int len = d - dbuf ;
dbuflen = ( len + 128 ) * 2 ;
dbuf = qccHunkAlloc ( dbuflen ) ;
memcpy ( dbuf , d - len , len ) ;
d = dbuf + len ;
}
2008-01-26 18:32:41 +00:00
if ( * s = = ' \\ ' )
2004-10-16 13:18:58 +00:00
{
2008-01-26 18:32:41 +00:00
// read over a newline if necessary
if ( s [ 1 ] = = ' \n ' | | s [ 1 ] = = ' \r ' )
2004-10-16 13:18:58 +00:00
{
2013-06-23 02:17:02 +00:00
char * exploitcheck ;
2018-10-11 10:31:23 +00:00
s + + ; //skip the \ char
if ( * s = = ' \r ' & & s [ 1 ] = = ' \n ' )
s + + ; //skip the \r. the \n will become part of the macro.
2023-01-09 05:13:12 +00:00
s + + ; //skip the \n
2017-10-12 12:02:25 +00:00
QCC_PR_NewLine ( true ) ;
2013-06-23 02:17:02 +00:00
2013-09-26 14:36:52 +00:00
/*
This began as a bug . It is still evil , but its oh so useful .
In C ,
# define foobar \
foo \
bar \
moo
becomes foobarmoo , not foo \ nbar \ nmoo
# define hacks however, require that it becomes
foo \ nbar \ nmoo
# cannot be used on the first line of the macro, and then is only valid as the first non-white char of the following lines
so if present , the preceeding \ \ \ n and following \ \ \ n must become an actual \ n instead of being stripped .
*/
2017-10-12 12:02:25 +00:00
for ( exploitcheck = s ; * exploitcheck & & qcc_iswhitesameline ( * exploitcheck ) ; exploitcheck + + )
2013-06-23 02:17:02 +00:00
;
if ( * exploitcheck = = ' # ' )
{
2013-09-26 14:36:52 +00:00
* d + + = ' \n ' ;
2013-12-29 22:48:28 +00:00
if ( ! cnst - > evil )
QCC_PR_ParseWarning ( WARN_EVILPREPROCESSOR , " preprocessor directive within preprocessor macro %s " , cnst - > name ) ;
cnst - > evil = true ;
2013-09-26 14:36:52 +00:00
preprocessorhack = true ;
}
2017-09-20 11:27:13 +00:00
else if ( preprocessorhack )
2013-09-26 14:36:52 +00:00
{
2013-06-23 02:17:02 +00:00
* d + + = ' \n ' ;
2013-09-26 14:36:52 +00:00
preprocessorhack = false ;
2008-01-26 18:32:41 +00:00
}
2004-10-16 13:18:58 +00:00
}
2010-12-08 14:42:05 +00:00
}
2008-01-26 18:32:41 +00:00
else if ( * s = = ' \r ' | | * s = = ' \n ' | | * s = = ' \0 ' )
{
break ;
2004-10-16 13:18:58 +00:00
}
2013-12-29 22:48:28 +00:00
if ( ! quote & & s [ 0 ] = = ' / ' & & s [ 1 ] = = ' / ' )
break ; //c++ style comments can just be ignored
if ( ! quote & & s [ 0 ] = = ' / ' & & s [ 1 ] = = ' * ' )
{ //multi-line c style comments become part of the define itself. this also negates the need for \ at the end of lines.
//although we don't bother embedding.
s + = 2 ;
for ( ; ; )
{
if ( ! s [ 0 ] )
{
QCC_PR_ParseWarning ( WARN_DUPLICATEPRECOMPILER , " EOF inside quote in define %s " , cnst - > name ) ;
break ;
}
if ( s [ 0 ] = = ' * ' & & s [ 1 ] = = ' / ' )
{
s + = 2 ;
break ;
}
2015-04-14 12:24:05 +00:00
if ( s [ 0 ] = = ' \n ' )
pr_source_line + + ;
2013-12-29 22:48:28 +00:00
s + + ;
}
continue ;
}
2004-08-23 01:38:21 +00:00
if ( * s = = ' \" ' )
quote = ! quote ;
* d = * s ;
d + + ;
s + + ;
}
* d = ' \0 ' ;
2010-07-03 21:49:48 +00:00
cnst - > value = dbuf ;
2005-09-28 16:57:10 +00:00
2014-05-16 01:34:58 +00:00
if ( oldcnst & & ! append )
2005-10-17 17:17:20 +00:00
{ //we always warn if it was already defined
//we use different warning codes so that -Wno-mundane can be used to ignore identical redefinitions.
2014-05-16 01:34:58 +00:00
if ( strcmp ( oldcnst - > value , cnst - > value ) )
2021-04-14 05:21:04 +00:00
QCC_PR_ParseWarning ( WARN_DUPLICATEPRECOMPILER , " Alternate precompiler definition of %s (%s -> %s) " , pr_token , oldcnst - > value , cnst - > value ) ;
2005-10-17 17:17:20 +00:00
else
QCC_PR_ParseWarning ( WARN_IDENTICALPRECOMPILER , " Identical precompiler definition of %s " , pr_token ) ;
}
2008-01-26 18:32:41 +00:00
pr_file_p = s ;
2004-08-23 01:38:21 +00:00
}
2011-11-08 06:00:35 +00:00
/* *buffer, *bufferlen and *buffermax should be NULL/0 at the start */
2014-02-13 23:54:57 +00:00
static void QCC_PR_ExpandStrCat ( char * * buffer , size_t * bufferlen , size_t * buffermax , char * newdata , size_t newlen )
2011-11-08 06:00:35 +00:00
{
2014-02-13 23:54:57 +00:00
size_t newmax = * bufferlen + newlen ;
2017-08-14 16:38:44 +00:00
2014-02-13 23:54:57 +00:00
if ( newmax < * bufferlen ) //check for overflow
2011-11-08 06:00:35 +00:00
{
2014-02-13 23:54:57 +00:00
QCC_PR_ParseWarning ( ERR_INTERNAL , " exceeds 4gb " ) ;
2011-11-08 06:00:35 +00:00
return ;
}
if ( newmax > * buffermax )
{
char * newbuf ;
if ( newmax < 64 )
newmax = 64 ;
if ( newmax < * bufferlen * 2 )
{
newmax = * bufferlen * 2 ;
if ( newmax < * bufferlen ) /*overflowed?*/
{
2014-02-13 23:54:57 +00:00
QCC_PR_ParseWarning ( ERR_INTERNAL , " exceeds 4gb " ) ;
2011-11-08 06:00:35 +00:00
return ;
}
}
newbuf = realloc ( * buffer , newmax ) ;
if ( ! newbuf )
{
QCC_PR_ParseWarning ( ERR_INTERNAL , " out of memory " ) ;
return ; /*OOM*/
}
* buffer = newbuf ;
* buffermax = newmax ;
}
memcpy ( * buffer + * bufferlen , newdata , newlen ) ;
* bufferlen + = newlen ;
/*no null terminator, remember to cat one if required*/
}
2017-08-14 16:38:44 +00:00
/* *buffer, *bufferlen and *buffermax should be NULL/0 at the start */
static void QCC_PR_ExpandStrCatMarkup ( char * * buffer , size_t * bufferlen , size_t * buffermax , char * newdata , size_t newlen )
{
size_t newmax = * bufferlen + newlen * 2 ;
if ( newmax < * bufferlen ) //check for overflow
{
QCC_PR_ParseWarning ( ERR_INTERNAL , " exceeds 4gb " ) ;
return ;
}
if ( newmax > * buffermax )
{
char * newbuf ;
if ( newmax < 64 )
newmax = 64 ;
if ( newmax < * bufferlen * 2 )
{
newmax = * bufferlen * 2 ;
if ( newmax < * bufferlen ) /*overflowed?*/
{
QCC_PR_ParseWarning ( ERR_INTERNAL , " exceeds 4gb " ) ;
return ;
}
}
newbuf = realloc ( * buffer , newmax ) ;
if ( ! newbuf )
{
QCC_PR_ParseWarning ( ERR_INTERNAL , " out of memory " ) ;
return ; /*OOM*/
}
* buffer = newbuf ;
* buffermax = newmax ;
}
while ( newlen - - )
{
if ( * newdata = = ' \n ' )
{
( * buffer ) [ * bufferlen + 0 ] = ' \\ ' ;
( * buffer ) [ * bufferlen + 1 ] = ' \n ' ;
* bufferlen + = 2 ;
}
else if ( * newdata = = ' \\ ' )
{
( * buffer ) [ * bufferlen + 0 ] = ' \\ ' ;
( * buffer ) [ * bufferlen + 1 ] = ' \\ ' ;
* bufferlen + = 2 ;
}
else if ( * newdata = = ' \0 ' )
{
( * buffer ) [ * bufferlen + 0 ] = ' \\ ' ;
( * buffer ) [ * bufferlen + 1 ] = ' 0 ' ;
* bufferlen + = 2 ;
}
else if ( * newdata = = ' \" ' )
{
( * buffer ) [ * bufferlen + 0 ] = ' \\ ' ;
( * buffer ) [ * bufferlen + 1 ] = ' \" ' ;
* bufferlen + = 2 ;
}
else
{
( * buffer ) [ * bufferlen ] = * newdata ;
* bufferlen + = 1 ;
}
newdata + + ;
}
/*no null terminator, remember to cat one if required*/
}
2011-11-08 06:00:35 +00:00
2018-10-11 10:31:23 +00:00
static const struct tm * QCC_CurrentTime ( void )
2017-10-31 22:52:58 +00:00
{
//if SOURCE_DATE_EPOCH environment is defined, use that as seconds from epoch (and show utc)
//this helps give reproducable builds (which is for some debian project, demonstrating that noone is hacking binaries).
const char * env = getenv ( " SOURCE_DATE_EPOCH " ) ;
time_t t ;
if ( env & & * env )
{
t = strtoull ( env , NULL , 0 ) ;
if ( t )
return gmtime ( & t ) ;
}
t = time ( NULL ) ;
return localtime ( & t ) ;
}
2021-04-14 05:21:04 +00:00
static char * QCC_PR_PopenMacro ( const char * macroname , const char * cmd , char * retbuf , size_t retbufsize )
{
char * ret = retbuf ;
char temp [ 65536 ] , * t = temp ;
# ifdef _WIN32
FILE * f = _popen ( cmd , " rt " ) ;
# else
FILE * f = popen ( cmd , " r " ) ;
# endif
int len ;
if ( ! f )
{
QCC_PR_ParseWarning ( ERR_CONSTANTNOTDEFINED , " %s: Unable to execute \" %s \" for value " , macroname , cmd ) ;
return NULL ;
}
retbufsize - = 3 ; // '""\0'
* retbuf + + = ' \" ' ;
2021-07-17 15:10:46 +00:00
for ( ; ; )
{
len = fread ( temp , 1 , sizeof ( temp ) , f ) ;
if ( len < = 0 )
break ;
else for ( t = temp ; len - - > 0 & & * t & & retbufsize > 1 ; t + + )
2021-04-14 05:21:04 +00:00
{
2021-07-17 15:10:46 +00:00
if ( * t = = ' \" ' ) retbuf [ 1 ] = ' \" ' ;
else if ( * t = = ' \n ' ) retbuf [ 1 ] = ' n ' ;
else if ( * t = = ' \r ' ) retbuf [ 1 ] = ' r ' ;
else if ( * t = = ' # ' ) retbuf [ 1 ] = ' # ' ; //so we don't get preqcc-style expansion in strings.
else
{
* retbuf + + = * t ;
retbufsize - - ;
continue ;
}
retbuf [ 0 ] = ' \\ ' ;
retbuf + = 2 ;
retbufsize - = 2 ;
2021-04-14 05:21:04 +00:00
}
}
2021-07-17 15:10:46 +00:00
if ( retbuf [ - 1 ] = = ' n ' & & retbuf [ - 2 ] = = ' \\ ' )
retbuf - = 2 ;
if ( retbuf [ - 1 ] = = ' r ' & & retbuf [ - 2 ] = = ' \\ ' )
retbuf - = 2 ;
2021-04-14 05:21:04 +00:00
* retbuf + + = ' \" ' ;
* retbuf + + = 0 ;
# ifdef _WIN32
_pclose ( f ) ;
# else
pclose ( f ) ;
# endif
return ret ;
}
2014-09-05 19:17:57 +00:00
static char * QCC_PR_CheckBuiltinCompConst ( char * constname , char * retbuf , size_t retbufsize )
{
2017-05-18 10:24:09 +00:00
if ( constname [ 0 ] ! = ' _ ' | | constname [ 1 ] ! = ' _ ' )
return NULL ;
2014-09-05 19:17:57 +00:00
if ( ! strcmp ( constname , " __TIME__ " ) )
{
2017-10-31 22:52:58 +00:00
strftime ( retbuf , retbufsize , " \" %H:%M \" " , QCC_CurrentTime ( ) ) ;
2014-09-05 19:17:57 +00:00
return retbuf ;
}
if ( ! strcmp ( constname , " __DATE__ " ) )
{
2017-10-31 22:52:58 +00:00
strftime ( retbuf , retbufsize , " \" %a %d %b %Y \" " , QCC_CurrentTime ( ) ) ;
2014-09-05 19:17:57 +00:00
return retbuf ;
}
2021-04-14 05:21:04 +00:00
if ( ! strcmp ( constname , " __GITURL__ " ) )
return QCC_PR_PopenMacro ( constname , " git remote get-url origin " , retbuf , retbufsize ) ; //some git url...
if ( ! strcmp ( constname , " __GITHASH__ " ) )
return QCC_PR_PopenMacro ( constname , " git log -1 --format=%H " , retbuf , retbufsize ) ; //just a hash
if ( ! strcmp ( constname , " __GITDATE__ " ) )
return QCC_PR_PopenMacro ( constname , " git log -1 --format=%cs " , retbuf , retbufsize ) ; //YYYY-MM-DD
if ( ! strcmp ( constname , " __GITDATETIME__ " ) )
return QCC_PR_PopenMacro ( constname , " git log -1 --format=%ci " , retbuf , retbufsize ) ; //YYYY-MM-DD HH:MM:SS +TZ
if ( ! strcmp ( constname , " __GITDESC__ " ) )
return QCC_PR_PopenMacro ( constname , " git describe " , retbuf , retbufsize ) ;
2014-09-05 19:17:57 +00:00
if ( ! strcmp ( constname , " __RAND__ " ) )
{
QC_snprintfz ( retbuf , retbufsize , " %i " , rand ( ) ) ;
return retbuf ;
}
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
# if defined(SVNREVISION) && defined(SVNDATE)
if ( ! strcmp ( constname , " __QCCREV__ " ) )
return STRINGIFY ( SVNREVISION ) ; //no M or anything, so you can compare revisions properly
# endif
2014-09-05 19:17:57 +00:00
if ( ! strcmp ( constname , " __QCCVER__ " ) )
{
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
# if defined(SVNREVISION) && defined(SVNDATE)
return " \" FTEQCC " STRINGIFY ( SVNREVISION ) " " STRINGIFY ( SVNDATE ) " \" " ;
# elif defined(SVNREVISION)
return " \" FTEQCC " STRINGIFY ( SVNREVISION ) " " __DATE__ " \" " ;
# else
return " \" " __DATE__ " \" " ;
2017-10-31 22:52:58 +00:00
# endif
2014-09-05 19:17:57 +00:00
}
if ( ! strcmp ( constname , " __FILE__ " ) )
{
2018-10-11 10:31:23 +00:00
char * erk ;
2016-09-08 19:04:35 +00:00
QC_snprintfz ( retbuf , retbufsize , " \" %s \" " , s_filen ) ;
2018-10-11 10:31:23 +00:00
erk = strchr ( retbuf , ' : ' ) ;
if ( erk )
{
erk [ 0 ] = ' \" ' ;
erk [ 1 ] = 0 ;
}
2014-09-05 19:17:57 +00:00
return retbuf ;
}
if ( ! strcmp ( constname , " __LINE__ " ) )
{
QC_snprintfz ( retbuf , retbufsize , " %i " , pr_source_line ) ;
return retbuf ;
}
if ( ! strcmp ( constname , " __LINESTR__ " ) )
{
QC_snprintfz ( retbuf , retbufsize , " \" %i \" " , pr_source_line ) ;
return retbuf ;
}
2017-05-18 10:24:09 +00:00
if ( ! strcmp ( constname , " __FUNC__ " ) | | ! strcmp ( constname , " __func__ " ) )
2014-09-05 19:17:57 +00:00
{
QC_snprintfz ( retbuf , retbufsize , " \" %s \" " , pr_scope ? pr_scope - > name : " <NO FUNCTION> " ) ;
return retbuf ;
}
if ( ! strcmp ( constname , " __NULL__ " ) )
{
return " 0i " ;
}
return NULL ; //didn't match
}
2018-10-11 10:31:23 +00:00
static pbool QCC_PR_ExpandPreProcessorMacro ( CompilerConstant_t * c , char * * buffer , size_t * bufferlen , size_t * buffermax )
{
int p ;
char * start ;
char * starttok ;
char * argsend ;
int argsendline ;
size_t whitestart ;
char * paramoffset [ MAXCONSTANTPARAMS + 1 ] ;
int param = 0 , extraparam = 0 ;
int plevel = 0 ;
pbool noargexpand ;
char * end ;
char retbuf [ 256 ] ;
pr_file_p + + ;
QCC_PR_LexWhitespace ( false ) ;
start = pr_file_p ;
while ( 1 )
{
// handle strings correctly by ignoring them
if ( * pr_file_p = = ' \" ' )
{
do {
pr_file_p + + ;
} while ( ( pr_file_p [ - 1 ] = = ' \\ ' | | pr_file_p [ 0 ] ! = ' \" ' ) & & * pr_file_p & & * pr_file_p ! = ' \n ' ) ;
}
if ( * pr_file_p = = ' ( ' )
plevel + + ;
else if ( ! plevel & & ( * pr_file_p = = ' , ' | | * pr_file_p = = ' ) ' ) )
{
if ( * pr_file_p = = ' , ' & & c - > varg & & param > = c - > numparams )
extraparam + + ; //skip extra trailing , arguments if we're varging.
else
{
paramoffset [ param + + ] = start ;
start = pr_file_p + 1 ;
if ( * pr_file_p = = ' ) ' )
{
* pr_file_p = ' \0 ' ;
pr_file_p + + ;
break ;
}
* pr_file_p = ' \0 ' ;
pr_file_p + + ;
QCC_PR_LexWhitespace ( false ) ;
start = pr_file_p ;
// move back by one char because we move forward by one at the end of the loop
pr_file_p - - ;
if ( param = = MAXCONSTANTPARAMS | | param > c - > numparams )
QCC_PR_ParseError ( ERR_TOOMANYPARAMS , " Too many parameters in macro call " ) ;
}
} else if ( * pr_file_p = = ' ) ' )
plevel - - ;
else if ( * pr_file_p = = ' \n ' )
QCC_PR_NewLine ( false ) ;
// see that *pr_file_p = '\0' up there? Must ++ BEFORE checking for !*pr_file_p
pr_file_p + + ;
if ( ! * pr_file_p )
QCC_PR_ParseError ( ERR_EOF , " EOF on macro call " ) ;
}
if ( param < c - > numparams )
QCC_PR_ParseError ( ERR_TOOFEWPARAMS , " Not enough macro parameters " ) ;
paramoffset [ param ] = start ;
* buffer = NULL ;
* bufferlen = 0 ;
* buffermax = 0 ;
// QCC_PR_LexWhitespace(false);
argsend = pr_file_p ;
argsendline = pr_source_line ;
pr_file_p = c - > value ;
for ( ; ; )
{
noargexpand = false ;
whitestart = * bufferlen ;
starttok = pr_file_p ;
/*while(qcc_iswhite(*pr_file_p)) //copy across whitespace
{
if ( ! * pr_file_p )
break ;
pr_file_p + + ;
} */
QCC_PR_LexWhitespace ( true ) ;
if ( starttok ! = pr_file_p )
{
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , starttok , pr_file_p - starttok ) ;
}
if ( * pr_file_p = = ' \" ' )
{
starttok = pr_file_p ;
do
{
pr_file_p + + ;
} while ( ( pr_file_p [ - 1 ] = = ' \\ ' | | pr_file_p [ 0 ] ! = ' \" ' ) & & * pr_file_p & & * pr_file_p ! = ' \n ' ) ;
if ( * pr_file_p = = ' \" ' )
pr_file_p + + ;
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , starttok , pr_file_p - starttok ) ;
continue ;
}
else if ( * pr_file_p = = ' # ' ) //if you ask for #a##b you will be shot. use #a #b instead, or chain macros.
{
if ( pr_file_p [ 1 ] = = ' # ' )
{ //concatinate (strip out whitespace before the token)
* bufferlen = whitestart ;
pr_file_p + = 2 ;
noargexpand = true ;
}
else
{ //stringify
pr_file_p + + ;
pr_file_p = QCC_COM_Parse2 ( pr_file_p ) ;
if ( ! pr_file_p )
break ;
for ( p = 0 ; p < param ; p + + )
{
if ( ! STRCMP ( qcc_token , c - > params [ p ] ) )
{
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , " \" " , 1 ) ;
QCC_PR_ExpandStrCatMarkup ( buffer , bufferlen , buffermax , paramoffset [ p ] , strlen ( paramoffset [ p ] ) ) ;
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , " \" " , 1 ) ;
break ;
}
}
if ( p = = param )
{
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , " # " , 1 ) ;
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , qcc_token , strlen ( qcc_token ) ) ;
if ( ! c - > evil )
2023-01-09 05:13:12 +00:00
QCC_PR_ParseWarning ( 0 , " '#%s' is not a macro parameter in %s " , qcc_token , c - > name ) ;
2018-10-11 10:31:23 +00:00
}
continue ; //already did this one
}
}
end = qcc_token ;
pr_file_p = QCC_COM_Parse2 ( pr_file_p ) ;
if ( ! pr_file_p )
break ;
for ( p = 0 ; p < c - > numparams ; p + + )
{
if ( ! STRCMP ( qcc_token , c - > params [ p ] ) )
{
char * argstart , * argend ;
for ( start = pr_file_p ; qcc_iswhite ( * start ) ; start + + )
;
if ( noargexpand | | ( start [ 0 ] = = ' # ' & & start [ 1 ] = = ' # ' ) )
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , paramoffset [ p ] , strlen ( paramoffset [ p ] ) ) ;
else
{
for ( argstart = paramoffset [ p ] ; * argstart ; argstart = argend )
{
argend = argstart ;
while ( qcc_iswhite ( * argend ) )
argend + + ;
if ( * argend = = ' \" ' )
{
do
{
argend + + ;
} while ( ( argend [ - 1 ] = = ' \\ ' | | argend [ 0 ] ! = ' \" ' ) & & * argend & & * argend ! = ' \n ' ) ;
if ( * argend = = ' \" ' )
argend + + ;
end = NULL ;
}
else
{
argend = QCC_COM_Parse2 ( argend ) ;
if ( ! argend )
break ;
end = QCC_PR_CheckBuiltinCompConst ( qcc_token , retbuf , sizeof ( retbuf ) ) ;
}
//FIXME: we should be testing all defines instead of just built-in ones.
if ( end )
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , end , strlen ( end ) ) ;
else
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , argstart , argend - argstart ) ;
}
}
break ;
}
}
if ( c - > varg & & ! STRCMP ( qcc_token , " __VA_ARGS__ " ) )
{ //c99
if ( param - 1 = = c - > numparams )
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , paramoffset [ c - > numparams ] , strlen ( paramoffset [ c - > numparams ] ) ) ;
else if ( noargexpand )
{
if ( * bufferlen > 0 & & ( * buffer ) [ * bufferlen - 1 ] = = ' , ' )
* bufferlen - = 1 ;
}
}
else if ( c - > varg & & ! STRCMP ( qcc_token , " __VA_COUNT__ " ) )
{ //not c99
char tmp [ 64 ] ;
if ( param < c - > numparams )
QCC_PR_ParseError ( ERR_TOOFEWPARAMS , " __VA_COUNT__ without any variable args " ) ;
QC_snprintfz ( tmp , sizeof ( tmp ) , " %i " , param - 1 + extraparam ) ;
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , tmp , strlen ( tmp ) ) ;
}
else if ( p = = c - > numparams )
{
/*CompilerConstant_t *c2 = pHash_Get(&compconstantstable, qcc_token);
if ( c2 & & c2 - > numparams > = 0 & & * pr_file_p = = ' ( ' )
{ //oh dear god this is vile bullshit
char * sub = NULL ;
size_t sublen ;
size_t submax ;
pr_file_p + + ;
if ( QCC_PR_ExpandPreProcessorMacro ( c , & sub , & sublen , & submax ) )
{
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , sub , sublen ) ;
}
free ( sub ) ;
}
else */
QCC_PR_ExpandStrCat ( buffer , bufferlen , buffermax , qcc_token , strlen ( qcc_token ) ) ;
}
}
for ( p = 0 ; p < param - 1 ; p + + )
paramoffset [ p ] [ strlen ( paramoffset [ p ] ) ] = ' , ' ;
paramoffset [ p ] [ strlen ( paramoffset [ p ] ) ] = ' ) ' ;
if ( c - > inside > 8 )
return false ;
pr_file_p = argsend ;
pr_source_line = argsendline ;
if ( flag_debugmacros )
{
if ( flag_msvcstyle )
externs - > Printf ( " %s(%i) : macro %s: %s \n " , s_filen , pr_source_line , c - > name , pr_file_p ) ;
else
externs - > Printf ( " %s:%i: macro %s: %s \n " , s_filen , pr_source_line , c - > name , pr_file_p ) ;
}
return true ;
}
2014-09-05 19:17:57 +00:00
2012-11-27 03:23:19 +00:00
int QCC_PR_CheckCompConst ( void )
2004-08-23 01:38:21 +00:00
{
2018-10-11 10:31:23 +00:00
//FIXME: FOO(SPLAT(FOO(BAR)))
//the above should expand the inner foo before expanding the outer foo
2017-08-14 16:38:44 +00:00
char * initial_file_p = pr_file_p ;
int initial_line = pr_source_line ;
2004-08-23 01:38:21 +00:00
CompilerConstant_t * c ;
2014-09-05 19:17:57 +00:00
char * end , * tok ;
char retbuf [ 256 ] ;
2004-08-23 01:38:21 +00:00
for ( end = pr_file_p ; ; end + + )
{
------------------------------------------------------------------------
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
if ( ! * end | | qcc_iswhite ( * end ) )
2004-08-23 01:38:21 +00:00
break ;
if ( * end = = ' ) '
| | * end = = ' ( '
| | * end = = ' + '
| | * end = = ' - '
| | * end = = ' * '
| | * end = = ' / '
| | * end = = ' | '
| | * end = = ' & '
| | * end = = ' = '
| | * end = = ' ^ '
| | * end = = ' ~ '
| | * end = = ' [ '
| | * end = = ' ] '
| | * end = = ' \" '
| | * end = = ' { '
| | * end = = ' } '
| | * end = = ' ; '
| | * end = = ' : '
| | * end = = ' , '
| | * end = = ' . '
| | * end = = ' # ' )
break ;
}
2018-10-13 06:20:49 +00:00
if ( ! QC_strnlcpy ( pr_token , pr_file_p , end - pr_file_p , sizeof ( pr_token ) ) )
return false ; //name too long to be a valid macro
2005-02-28 07:16:19 +00:00
2018-10-11 10:31:23 +00:00
// externs->Printf("%s\n", pr_token);
2005-02-09 19:32:30 +00:00
c = pHash_Get ( & compconstantstable , pr_token ) ;
2004-08-23 01:38:21 +00:00
2017-08-14 16:38:44 +00:00
if ( c & & ( ! currentchunk | | currentchunk - > cnst ! = c ) ) //macros don't expand themselves
2004-08-23 01:38:21 +00:00
{
2017-08-14 16:38:44 +00:00
pr_file_p = initial_file_p + strlen ( c - > name ) ;
2005-02-28 07:16:19 +00:00
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
if ( c - > numparams > = 0 )
{
if ( * pr_file_p = = ' ( ' )
{
2018-10-11 10:31:23 +00:00
char * buffer = NULL ;
size_t bufferlen , buffermax ;
if ( ! QCC_PR_ExpandPreProcessorMacro ( c , & buffer , & bufferlen , & buffermax ) )
2017-08-14 16:38:44 +00:00
{
2018-10-11 10:31:23 +00:00
free ( buffer ) ;
2017-08-14 16:38:44 +00:00
pr_file_p = initial_file_p ;
pr_source_line = initial_line ;
return false ;
}
2011-11-08 06:00:35 +00:00
if ( ! bufferlen )
2008-11-09 22:29:28 +00:00
expandedemptymacro = true ;
2011-11-08 06:00:35 +00:00
else
{
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , " \0 " , 1 ) ;
QCC_PR_IncludeChunkEx ( buffer , true , NULL , c ) ;
}
2015-02-07 18:07:30 +00:00
expandedemptymacro = true ;
2011-11-08 06:00:35 +00:00
free ( buffer ) ;
2004-08-23 01:38:21 +00:00
}
else
2017-10-12 12:02:25 +00:00
{
//QCC_PR_ParseError(ERR_TOOFEWPARAMS, "Macro without argument list");
2018-10-11 10:31:23 +00:00
//such macros don't get expanded.
2017-10-12 12:02:25 +00:00
pr_file_p = initial_file_p ;
pr_source_line = initial_line ;
return false ;
}
2004-08-23 01:38:21 +00:00
}
else
2008-11-09 22:29:28 +00:00
{
2017-08-14 16:38:44 +00:00
if ( c - > inside > = 8 )
{
pr_file_p = initial_file_p ;
pr_source_line = initial_line ;
return false ;
}
2015-02-07 18:07:30 +00:00
if ( * c - > value )
QCC_PR_IncludeChunkEx ( c - > value , false , NULL , c ) ;
expandedemptymacro = true ;
2008-11-09 22:29:28 +00:00
}
2004-08-23 01:38:21 +00:00
return true ;
}
2014-09-05 19:17:57 +00:00
tok = QCC_PR_CheckBuiltinCompConst ( pr_token , retbuf , sizeof ( retbuf ) ) ;
if ( tok )
2004-08-23 01:38:21 +00:00
{
2014-09-05 19:17:57 +00:00
pr_file_p = end ;
QCC_PR_IncludeChunkEx ( tok , true , NULL , NULL ) ;
2004-08-23 01:38:21 +00:00
return true ;
}
return false ;
}
2019-01-20 01:00:18 +00:00
const char * QCC_PR_CheckCompConstString ( const char * def )
2004-08-23 01:38:21 +00:00
{
2019-01-20 01:00:18 +00:00
const char * s ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
CompilerConstant_t * c ;
2005-02-09 19:32:30 +00:00
c = pHash_Get ( & compconstantstable , def ) ;
2004-08-23 01:38:21 +00:00
2010-12-08 14:42:05 +00:00
if ( c )
2004-08-23 01:38:21 +00:00
{
2012-11-27 03:23:19 +00:00
s = QCC_PR_CheckCompConstString ( c - > value ) ;
2004-08-23 01:38:21 +00:00
return s ;
}
return def ;
}
2019-01-20 01:00:18 +00:00
CompilerConstant_t * QCC_PR_CheckCompConstDefined ( const char * def )
2004-08-23 01:38:21 +00:00
{
2005-02-09 19:32:30 +00:00
CompilerConstant_t * c = pHash_Get ( & compconstantstable , def ) ;
2004-08-23 01:38:21 +00:00
return c ;
}
2013-09-26 14:36:52 +00:00
char * QCC_PR_CheckCompConstTooltip ( char * word , char * outstart , char * outend )
{
int i ;
CompilerConstant_t * c = QCC_PR_CheckCompConstDefined ( word ) ;
if ( c )
{
char * out = outstart ;
if ( c - > numparams > = 0 )
{
QC_snprintfz ( out , outend - out , " #define %s( " , c - > name ) ;
out + = strlen ( out ) ;
for ( i = 0 ; i < c - > numparams - 1 ; i + + )
{
QC_snprintfz ( out , outend - out , " %s, " , c - > params [ i ] ) ;
out + = strlen ( out ) ;
}
if ( i < c - > numparams )
{
QC_snprintfz ( out , outend - out , " %s " , c - > params [ i ] ) ;
out + = strlen ( out ) ;
}
2014-03-30 00:39:37 +00:00
QC_snprintfz ( out , outend - out , " ) " ) ;
2013-09-26 14:36:52 +00:00
}
else
QC_snprintfz ( out , outend - out , " #define %s " , c - > name ) ;
out + = strlen ( out ) ;
if ( c - > value & & * c - > value )
QC_snprintfz ( out , outend - out , " \n %s " , c - > value ) ;
return outstart ;
}
return NULL ;
}
2004-08-23 01:38:21 +00:00
//============================================================================
/*
= = = = = = = = = = = = = =
PR_Lex
Sets pr_token , pr_token_type , and possibly pr_immediate and pr_immediate_type
= = = = = = = = = = = = = =
*/
void QCC_PR_Lex ( void )
{
int c ;
pr_token [ 0 ] = 0 ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
if ( ! pr_file_p )
{
if ( QCC_PR_UnInclude ( ) )
2010-12-08 14:42:05 +00:00
{
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
return ;
}
pr_token_type = tt_eof ;
return ;
}
2021-05-27 11:34:22 +00:00
pr_token_precomment = NULL ;
QCC_PR_LexComment ( & pr_token_precomment ) ;
// QCC_PR_LexWhitespace (false);
2004-08-23 01:38:21 +00:00
2018-07-05 16:21:44 +00:00
pr_token_line_last = pr_token_line ;
2012-11-27 03:23:19 +00:00
pr_token_line = pr_source_line ;
2018-07-05 16:21:44 +00:00
if ( currentchunk )
pr_token_line + = currentchunk - > currentlinenumber - 1 ;
2012-11-27 03:23:19 +00:00
2004-08-23 01:38:21 +00:00
if ( ! pr_file_p )
{
if ( QCC_PR_UnInclude ( ) )
2010-12-08 14:42:05 +00:00
{
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
return ;
}
pr_token_type = tt_eof ;
return ;
}
c = * pr_file_p ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
if ( ! c )
{
if ( QCC_PR_UnInclude ( ) )
2010-12-08 14:42:05 +00:00
{
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
return ;
}
pr_token_type = tt_eof ;
return ;
}
// handle quoted strings as a unit
2018-09-23 19:35:24 +00:00
if ( c = = ' \" ' | | ( ( c = = ' R ' | | c = = ' Q ' | | c = = ' u ' | | c = = ' U ' ) & & pr_file_p [ 1 ] = = ' \" ' ) | | ( c = = ' u ' & & pr_file_p [ 1 ] = = ' 8 ' & & pr_file_p [ 2 ] = = ' \" ' ) )
2004-08-23 01:38:21 +00:00
{
QCC_PR_LexString ( ) ;
return ;
}
// handle quoted vectors as a unit
if ( c = = ' \' ' )
{
QCC_PR_LexVector ( ) ;
return ;
}
// if the first character is a valid identifier, parse until a non-id
// character is reached
2016-09-01 14:31:24 +00:00
if ( ( c = = ' % ' ) & & flag_qccx & & ( pr_file_p [ 1 ] = = ' - ' | | ( pr_file_p [ 1 ] > = ' 0 ' & & pr_file_p [ 1 ] < = ' 9 ' ) ) )
2004-08-23 01:38:21 +00:00
{
2016-09-01 14:31:24 +00:00
//with qccx, %5 is a denormalized float.
pr_file_p + + ;
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
QCC_PR_ParseWarning ( WARN_DENORMAL , " denormalized immediate " ) ;
pr_immediate . _int = QCC_PR_LexInteger ( ) ;
2004-08-23 01:38:21 +00:00
return ;
}
if ( c = = ' 0 ' & & pr_file_p [ 1 ] = = ' x ' )
{
pr_token_type = tt_immediate ;
QCC_PR_LexNumber ( ) ;
return ;
}
2012-01-17 07:57:46 +00:00
if ( ( c = = ' . ' & & pr_file_p [ 1 ] ! = ' . ' & & pr_file_p [ 1 ] > = ' 0 ' & & pr_file_p [ 1 ] < = ' 9 ' ) | | ( c > = ' 0 ' & & c < = ' 9 ' ) | | ( c = = ' - ' & & pr_file_p [ 1 ] > = ' 0 ' & & pr_file_p [ 1 ] < = ' 9 ' ) )
2004-08-23 01:38:21 +00:00
{
pr_token_type = tt_immediate ;
2009-08-29 14:56:42 +00:00
QCC_PR_LexNumber ( ) ;
2004-08-23 01:38:21 +00:00
return ;
}
2021-04-14 05:21:04 +00:00
if ( /*!flag_qccx &&*/ c = = ' # ' & & ! ( pr_file_p [ 1 ] = = ' ) ' | | pr_file_p [ 1 ] = = ' , ' | | pr_file_p [ 1 ] = = ' \" ' | | pr_file_p [ 1 ] = = ' - ' | | ( pr_file_p [ 1 ] > = ' 0 ' & & pr_file_p [ 1 ] < = ' 9 ' ) ) ) //hash and not number
2004-08-23 01:38:21 +00:00
{
pr_file_p + + ;
2012-11-27 03:23:19 +00:00
if ( ! QCC_PR_CheckCompConst ( ) )
2004-08-23 01:38:21 +00:00
{
if ( ! QCC_PR_SimpleGetToken ( ) )
strcpy ( pr_token , " unknown " ) ;
QCC_PR_ParseError ( ERR_CONSTANTNOTDEFINED , " Explicit precompiler usage when not defined %s " , pr_token ) ;
}
else
2014-05-16 01:34:58 +00:00
{
QCC_PR_Lex ( ) ;
2004-08-23 01:38:21 +00:00
if ( pr_token_type = = tt_eof )
QCC_PR_Lex ( ) ;
2014-05-16 01:34:58 +00:00
}
2004-08-23 01:38:21 +00:00
return ;
}
2010-12-08 14:42:05 +00:00
2014-05-21 06:21:09 +00:00
if ( ( c > = ' a ' & & c < = ' z ' ) | | ( c > = ' A ' & & c < = ' Z ' ) | | c = = ' _ ' | | ( c & 0x80 ) )
2004-08-23 01:38:21 +00:00
{
2012-11-27 03:23:19 +00:00
if ( flag_hashonly | | ! QCC_PR_CheckCompConst ( ) ) //look for a macro.
2004-08-23 01:38:21 +00:00
QCC_PR_LexName ( ) ;
else
2014-05-16 01:34:58 +00:00
{
//we expanded a macro. we need to read the tokens out of it now though
QCC_PR_Lex ( ) ;
2004-08-23 01:38:21 +00:00
if ( pr_token_type = = tt_eof )
{
if ( QCC_PR_UnInclude ( ) )
2010-12-08 14:42:05 +00:00
{
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
return ;
}
pr_token_type = tt_eof ;
}
2014-05-16 01:34:58 +00:00
}
2004-08-23 01:38:21 +00:00
return ;
}
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
if ( c = = ' $ ' )
{
QCC_PR_LexGrab ( ) ;
return ;
}
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
// parse symbol strings until a non-symbol is found
QCC_PR_LexPunctuation ( ) ;
}
//=============================================================================
2013-12-29 22:48:28 +00:00
pbool QCC_Temp_Describe ( QCC_def_t * def , char * buffer , int buffersize ) ;
2004-08-23 01:38:21 +00:00
void QCC_PR_ParsePrintDef ( int type , QCC_def_t * def )
{
------------------------------------------------------------------------
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
if ( ! qccwarningaction [ type ] )
2004-08-23 01:38:21 +00:00
return ;
2016-09-08 19:04:35 +00:00
if ( def - > filen )
2009-11-04 21:16:50 +00:00
{
2013-12-29 22:48:28 +00:00
char tybuffer [ 512 ] ;
char tmbuffer [ 512 ] ;
2021-07-07 13:10:20 +00:00
char vlbuffer [ 512 ] ;
2016-07-12 00:40:13 +00:00
char * modifiers ;
2013-12-29 22:48:28 +00:00
if ( QCC_Temp_Describe ( def , tmbuffer , sizeof ( tmbuffer ) ) )
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s:%i: (%s)(%s) \n " , def - > filen , def - > s_line , TypeName ( def - > type , tybuffer , sizeof ( tybuffer ) ) , tmbuffer ) ;
2013-12-29 22:48:28 +00:00
}
2009-11-04 21:16:50 +00:00
else
2013-12-29 22:48:28 +00:00
{
2016-07-12 00:40:13 +00:00
modifiers = " " ;
if ( def - > constant )
modifiers = " const " ;
else if ( def - > isstatic )
modifiers = " static " ;
2021-07-07 13:10:20 +00:00
if ( def & & def - > initialized & & def - > constant & & ! def - > arraysize )
{
const QCC_eval_t * ev = ( const QCC_eval_t * ) & def - > symboldata [ 0 ] ;
switch ( def - > type - > type )
{
case ev_float : QC_snprintfz ( vlbuffer , sizeof ( vlbuffer ) , " = %g " , ev - > _float ) ; break ;
case ev_double : QC_snprintfz ( vlbuffer , sizeof ( vlbuffer ) , " = %g " , ev - > _double ) ; break ;
case ev_integer : QC_snprintfz ( vlbuffer , sizeof ( vlbuffer ) , " = %i " , ev - > _int ) ; break ;
case ev_uint : QC_snprintfz ( vlbuffer , sizeof ( vlbuffer ) , " = %u " , ev - > _uint ) ; break ;
2021-08-04 21:17:31 +00:00
case ev_int64 : QC_snprintfz ( vlbuffer , sizeof ( vlbuffer ) , " = % " pPRIi64 , ev - > i64 ) ; break ;
case ev_uint64 : QC_snprintfz ( vlbuffer , sizeof ( vlbuffer ) , " = % " pPRIu64 , ev - > u64 ) ; break ;
2021-07-07 13:10:20 +00:00
default : * vlbuffer = 0 ; break ;
}
}
else
* vlbuffer = 0 ;
2013-12-29 22:48:28 +00:00
if ( flag_msvcstyle )
2021-07-07 13:10:20 +00:00
externs - > Printf ( " %s%s(%i) : %s%s%s %s%s%s%s%s is defined here \n " , col_location , def - > filen , def - > s_line , col_type , modifiers , TypeName ( def - > type , tybuffer , sizeof ( tybuffer ) ) , col_symbol , def - > name , col_type , vlbuffer , col_none ) ;
2013-12-29 22:48:28 +00:00
else
2021-07-07 13:10:20 +00:00
externs - > Printf ( " %s%s:%i: %s%s%s %s%s%s%s%s is defined here \n " , col_location , def - > filen , def - > s_line , col_type , modifiers , TypeName ( def - > type , tybuffer , sizeof ( tybuffer ) ) , col_symbol , def - > name , col_type , vlbuffer , col_none ) ;
2013-12-29 22:48:28 +00:00
}
2009-11-04 21:16:50 +00:00
}
2004-08-23 01:38:21 +00:00
}
2015-04-14 12:24:05 +00:00
void QCC_PR_ParsePrintSRef ( int type , QCC_sref_t def )
{
QCC_PR_ParsePrintDef ( type , def . sym ) ;
}
2006-01-14 03:37:22 +00:00
void * errorscope ;
2017-08-14 16:38:44 +00:00
static void QCC_PR_PrintMacro ( qcc_includechunk_t * chunk )
{
if ( chunk )
{
QCC_PR_PrintMacro ( chunk - > prev ) ;
if ( chunk - > cnst )
{
2017-10-12 12:02:25 +00:00
# if 1
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s:%i: macro %s%s%s is defined here \n " , col_location , chunk - > cnst - > fromfile , chunk - > cnst - > fromline , col_symbol , chunk - > cnst - > name , col_none ) ;
2017-10-12 12:02:25 +00:00
# else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s:%i: expanding %s \n " , chunk - > currentfilename , chunk - > currentlinenumber , chunk - > cnst - > name ) ;
2017-10-12 12:02:25 +00:00
# endif
2022-08-08 22:45:19 +00:00
if ( verbose > = VERBOSE_STANDARD )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s \n " , chunk - > datastart ) ;
2017-08-14 16:38:44 +00:00
}
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s:%i: \n " , chunk - > currentfilename , chunk - > currentlinenumber ) ;
2017-08-14 16:38:44 +00:00
}
}
2018-10-11 10:31:23 +00:00
static void QCC_PR_PrintScope ( void )
2006-01-14 03:37:22 +00:00
{
2017-08-14 16:38:44 +00:00
QCC_PR_PrintMacro ( currentchunk ) ;
2006-01-14 03:37:22 +00:00
if ( pr_scope )
{
if ( errorscope ! = pr_scope )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " in function %s%s%s (line %i), \n " , col_symbol , pr_scope - > name , col_none , pr_scope - > line ) ;
2006-01-14 03:37:22 +00:00
errorscope = pr_scope ;
}
else
{
if ( errorscope )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " at global scope, \n " ) ;
2006-01-14 03:37:22 +00:00
errorscope = NULL ;
}
}
void QCC_PR_ResetErrorScope ( void )
{
errorscope = NULL ;
}
2004-08-23 01:38:21 +00:00
/*
= = = = = = = = = = = =
PR_ParseError
Aborts the current file load
= = = = = = = = = = = =
*/
# ifndef QCC
2016-09-08 19:04:35 +00:00
void editbadfile ( const char * file , int line ) ;
2004-08-23 01:38:21 +00:00
# endif
------------------------------------------------------------------------
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
//will abort.
2020-09-29 07:09:01 +00:00
NORETURN void VARGS QCC_PR_ParseError ( int errortype , const char * error , . . . )
2004-08-23 01:38:21 +00:00
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
# ifndef QCC
2016-09-08 19:04:35 +00:00
editbadfile ( s_filen , pr_source_line ) ;
2004-08-23 01:38:21 +00:00
# endif
2006-01-14 03:37:22 +00:00
QCC_PR_PrintScope ( ) ;
2009-11-04 21:16:50 +00:00
if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s(%i) : %serror%s: %s \n " , col_location , s_filen , pr_source_line , col_error , col_none , string ) ;
2009-11-04 21:16:50 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s:%i: %serror%s: %s \n " , col_location , s_filen , pr_source_line , col_error , col_none , string ) ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
longjmp ( pr_parse_abort , 1 ) ;
}
------------------------------------------------------------------------
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
//will abort.
2020-09-29 07:09:01 +00:00
NORETURN void VARGS QCC_PR_ParseErrorPrintDef ( int errortype , QCC_def_t * def , const char * error , . . . )
2004-08-23 01:38:21 +00:00
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
# ifndef QCC
2016-09-08 19:04:35 +00:00
editbadfile ( s_filen , pr_source_line ) ;
2004-08-23 01:38:21 +00:00
# endif
2006-01-14 03:37:22 +00:00
QCC_PR_PrintScope ( ) ;
2009-11-04 21:16:50 +00:00
if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s(%i) : %serror%s: %s \n " , col_location , s_filen , pr_source_line , col_error , col_none , string ) ;
2009-11-04 21:16:50 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s:%i: %serror%s: %s \n " , col_location , s_filen , pr_source_line , col_error , col_none , string ) ;
2004-08-23 01:38:21 +00:00
QCC_PR_ParsePrintDef ( WARN_ERROR , def ) ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
longjmp ( pr_parse_abort , 1 ) ;
}
2020-09-29 07:09:01 +00:00
NORETURN void VARGS QCC_PR_ParseErrorPrintSRef ( int errortype , QCC_sref_t def , const char * error , . . . )
2015-04-14 12:24:05 +00:00
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
# ifndef QCC
2016-09-08 19:04:35 +00:00
editbadfile ( s_filen , pr_source_line ) ;
2015-04-14 12:24:05 +00:00
# endif
QCC_PR_PrintScope ( ) ;
if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s(%i) : %serror%s: %s \n " , col_location , s_filen , pr_source_line , col_error , col_none , string ) ;
2015-04-14 12:24:05 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s:%i: %serror%s: %s \n " , col_location , s_filen , pr_source_line , col_error , col_none , string ) ;
2015-04-14 12:24:05 +00:00
QCC_PR_ParsePrintSRef ( WARN_ERROR , def ) ;
longjmp ( pr_parse_abort , 1 ) ;
}
2018-10-11 10:31:23 +00:00
static pbool VARGS QCC_PR_PrintWarning ( int type , const char * file , int line , const char * string )
------------------------------------------------------------------------
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
{
char * wnam = QCC_NameForWarning ( type ) ;
if ( ! wnam )
wnam = " " ;
2004-08-23 01:38:21 +00:00
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
if ( string )
QCC_PR_PrintScope ( ) ;
2004-09-02 12:58:49 +00:00
if ( type > = ERR_PARSEERRORS )
{
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
if ( ! string )
;
else if ( ! file | | ! * file )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " :: %serror%s%s: %s \n " , col_error , wnam , col_none , string ) ;
------------------------------------------------------------------------
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
else if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s(%i) : %serror%s%s: %s \n " , col_location , file , line , col_error , wnam , col_none , string ) ;
------------------------------------------------------------------------
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
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s:%i: %serror%s%s: %s \n " , col_location , file , line , col_error , wnam , col_none , string ) ;
------------------------------------------------------------------------
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
pr_error_count + + ;
}
else if ( qccwarningaction [ type ] = = 2 )
{ //-werror
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
if ( ! string )
;
else if ( ! file | | ! * file )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " :: %swerror%s%s: %s \n " , col_error , wnam , col_none , string ) ;
------------------------------------------------------------------------
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
else if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s(%i) : %swerror%s%s: %s \n " , col_location , file , line , col_error , wnam , col_none , string ) ;
2009-11-04 21:16:50 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s:%i: %swerror%s%s: %s \n " , col_location , file , line , col_error , wnam , col_none , string ) ;
2004-09-02 12:58:49 +00:00
pr_error_count + + ;
}
else
2005-12-16 17:15:43 +00:00
{
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
if ( ! string )
;
else if ( ! file | | ! * file )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " :: %swarning%s%s: %s \n " , col_warning , wnam , col_none , string ) ;
------------------------------------------------------------------------
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
else if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s(%i) : %swarning%s%s: %s \n " , col_location , file , line , col_warning , wnam , col_none , string ) ;
2009-11-04 21:16:50 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s%s:%i: %swarning%s%s: %s \n " , col_location , file , line , col_warning , wnam , col_none , string ) ;
2005-12-16 17:15:43 +00:00
pr_warning_count + + ;
}
------------------------------------------------------------------------
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
return true ;
2004-08-23 01:38:21 +00:00
}
2015-04-14 12:24:05 +00:00
pbool VARGS QCC_PR_Warning ( int type , const char * file , int line , const char * error , . . . )
2010-05-01 22:47:47 +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
va_list argptr ;
2010-05-01 22:47:47 +00:00
char string [ 1024 ] ;
------------------------------------------------------------------------
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
if ( ! qccwarningaction [ type ] )
return false ;
2010-05-01 22:47:47 +00:00
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
if ( ! error )
return QCC_PR_PrintWarning ( type , file , line , NULL ) ;
2010-05-01 22:47:47 +00:00
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
------------------------------------------------------------------------
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
return QCC_PR_PrintWarning ( type , file , line , string ) ;
2010-05-01 22:47:47 +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
//can be used for errors, qcc execution will continue.
2015-04-14 12:24:05 +00:00
pbool VARGS QCC_PR_ParseWarning ( int type , const char * error , . . . )
2004-08-23 01:38:21 +00:00
{
va_list argptr ;
char string [ 1024 ] ;
------------------------------------------------------------------------
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
if ( ! qccwarningaction [ type ] )
2011-10-03 02:45:44 +00:00
return false ;
2004-08-23 01:38:21 +00:00
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
2016-09-08 19:04:35 +00:00
return QCC_PR_PrintWarning ( type , s_filen , pr_source_line , string ) ;
------------------------------------------------------------------------
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
}
2015-04-14 12:24:05 +00:00
void VARGS QCC_PR_Note ( int type , const char * file , int line , const char * error , . . . )
------------------------------------------------------------------------
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
{
va_list argptr ;
char string [ 1024 ] ;
if ( ! qccwarningaction [ type ] )
return ;
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
2006-01-14 03:37:22 +00:00
QCC_PR_PrintScope ( ) ;
------------------------------------------------------------------------
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
if ( ! file )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " note: %s \n " , string ) ;
------------------------------------------------------------------------
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
else if ( flag_msvcstyle )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s(%i) : note: %s \n " , file , line , string ) ;
2004-08-23 01:38:21 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s:%i: note: %s \n " , file , line , string ) ;
2004-08-23 01:38:21 +00:00
}
/*
= = = = = = = = = = = = =
PR_Expect
Issues an error if the current token isn ' t equal to string
Gets the next token
= = = = = = = = = = = = =
*/
# ifndef COMMONINLINES
2015-04-14 12:24:05 +00:00
void QCC_PR_Expect ( const char * string )
2004-08-23 01:38:21 +00:00
{
if ( STRCMP ( string , pr_token ) )
2018-09-29 03:40:50 +00:00
QCC_PR_ParseError ( ERR_EXPECTED , " expected %s%s%s, found %s%s%s " , col_location , string , col_none , col_name , pr_token , col_none ) ;
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
}
# endif
2021-05-27 11:34:22 +00:00
void QCC_PR_LexComment ( char * * comment )
2013-03-12 23:15:32 +00:00
{
char c ;
char * start ;
int nl ;
char * old ;
int oldlen ;
pbool replace = true ;
pbool nextcomment = true ;
2021-05-27 11:34:22 +00:00
// skip whitespace
nl = false ;
while ( nextcomment )
2013-03-12 23:15:32 +00:00
{
2021-05-27 11:34:22 +00:00
nextcomment = false ;
2013-03-12 23:15:32 +00:00
2021-05-27 11:34:22 +00:00
while ( ( c = * pr_file_p ) & & qcc_iswhite ( c ) )
{
if ( qcc_islineending ( c , pr_file_p [ 1 ] ) ) //allow new lines, but only if there's whitespace before any tokens, and no double newlines.
2013-03-12 23:15:32 +00:00
{
2021-05-27 11:34:22 +00:00
if ( nl )
2013-03-12 23:15:32 +00:00
{
pr_file_p + + ;
2021-05-27 11:34:22 +00:00
QCC_PR_NewLine ( false ) ;
break ;
2013-03-12 23:15:32 +00:00
}
2021-05-27 11:34:22 +00:00
nl = true ;
2013-03-12 23:15:32 +00:00
}
2021-05-27 11:34:22 +00:00
else
2013-03-12 23:15:32 +00:00
{
2021-05-27 11:34:22 +00:00
pr_file_p + + ;
nl = false ;
}
}
if ( nl )
break ;
2013-03-12 23:15:32 +00:00
2021-05-27 11:34:22 +00:00
// parse // comments
if ( c = = ' / ' & & pr_file_p [ 1 ] = = ' / ' )
{
pr_file_p + = 2 ;
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
pr_file_p + + ;
start = pr_file_p ;
while ( * pr_file_p & & * pr_file_p ! = ' \n ' )
pr_file_p + + ;
2013-03-12 23:15:32 +00:00
2021-05-27 11:34:22 +00:00
if ( * pr_file_p = = ' \n ' )
{
pr_file_p + + ;
QCC_PR_NewLine ( false ) ;
2013-03-12 23:15:32 +00:00
}
2021-05-27 11:34:22 +00:00
old = replace ? NULL : * comment ;
replace = false ;
oldlen = old ? strlen ( old ) + 1 : 0 ;
* comment = qccHunkAlloc ( oldlen + ( pr_file_p - start ) + 1 ) ;
if ( oldlen )
2013-03-12 23:15:32 +00:00
{
2021-05-27 11:34:22 +00:00
memcpy ( * comment , old , oldlen - 1 ) ;
memcpy ( * comment + oldlen - 1 , " \n " , 1 ) ;
}
memcpy ( * comment + oldlen , start , pr_file_p - start ) ;
oldlen = oldlen + pr_file_p - start ;
while ( oldlen > 0 & & ( ( * comment ) [ oldlen - 1 ] = = ' \r ' | | ( * comment ) [ oldlen - 1 ] = = ' \n ' | | ( * comment ) [ oldlen - 1 ] = = ' \t ' | | ( * comment ) [ oldlen - 1 ] = = ' ' ) )
oldlen - - ;
( * comment ) [ oldlen ] = 0 ;
nextcomment = true ; //include the next // too
nl = true ;
}
// parse /* comments
else if ( c = = ' / ' & & pr_file_p [ 1 ] = = ' * ' & & replace )
{
pr_file_p + = 1 ;
start = pr_file_p + 1 ;
2013-03-12 23:15:32 +00:00
2021-05-27 11:34:22 +00:00
do
{
pr_file_p + + ;
if ( pr_file_p [ 0 ] = = ' \n ' )
2013-03-12 23:15:32 +00:00
{
2021-05-27 11:34:22 +00:00
QCC_PR_NewLine ( true ) ;
}
else if ( pr_file_p [ 1 ] = = 0 )
{
QCC_PR_ParseError ( 0 , " EOF inside comment \n " ) ;
2014-01-13 02:33:11 +00:00
break ;
2021-05-27 11:34:22 +00:00
}
if ( pr_file_p [ 0 ] = = ' / ' & & pr_file_p [ 1 ] = = ' * ' )
QCC_PR_ParseWarning ( WARN_NESTEDCOMMENT , " \" /* \" inside comment " ) ;
} while ( pr_file_p [ 0 ] ! = ' * ' | | pr_file_p [ 1 ] ! = ' / ' ) ;
2014-01-13 02:33:11 +00:00
2021-05-27 11:34:22 +00:00
if ( pr_file_p [ 1 ] = = 0 )
break ;
2004-08-23 01:38:21 +00:00
2021-05-27 11:34:22 +00:00
old = replace ? NULL : * comment ;
replace = false ;
oldlen = old ? strlen ( old ) : 0 ;
* comment = qccHunkAlloc ( oldlen + ( pr_file_p - start ) + 1 ) ;
memcpy ( * comment , old , oldlen ) ;
memcpy ( * comment + oldlen , start , pr_file_p - start ) ;
( * comment ) [ oldlen + pr_file_p - start ] = 0 ;
pr_file_p + = 2 ;
2013-03-12 23:15:32 +00:00
}
}
2021-05-27 11:34:22 +00:00
QCC_PR_LexWhitespace ( false ) ;
}
pbool QCC_PR_CheckTokenComment ( const char * string , char * * comment )
{
if ( pr_token_type ! = tt_punct )
return false ;
if ( STRCMP ( string , pr_token ) )
return false ;
if ( comment )
QCC_PR_LexComment ( comment ) ;
2013-03-12 23:15:32 +00:00
//and then do the rest properly.
QCC_PR_Lex ( ) ;
return true ;
}
2004-08-23 01:38:21 +00:00
/*
= = = = = = = = = = = = =
PR_Check
Returns true and gets the next token if the current token equals string
Returns false and does nothing otherwise
= = = = = = = = = = = = =
*/
# ifndef COMMONINLINES
2015-04-14 12:24:05 +00:00
pbool QCC_PR_CheckToken ( const char * string )
2004-08-23 01:38:21 +00:00
{
2008-10-16 23:04:36 +00:00
if ( pr_token_type ! = tt_punct )
return false ;
if ( STRCMP ( string , pr_token ) )
return false ;
2010-12-08 14:42:05 +00:00
2008-10-16 23:04:36 +00:00
QCC_PR_Lex ( ) ;
return true ;
}
2017-01-13 00:39:50 +00:00
pbool QCC_PR_PeekToken ( const char * string )
{
if ( pr_token_type ! = tt_punct )
return false ;
if ( STRCMP ( string , pr_token ) )
return false ;
return true ;
}
2015-04-14 12:24:05 +00:00
pbool QCC_PR_CheckImmediate ( const char * string )
2008-10-16 23:04:36 +00:00
{
if ( pr_token_type ! = tt_immediate )
return false ;
2004-08-23 01:38:21 +00:00
if ( STRCMP ( string , pr_token ) )
return false ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
return true ;
}
2015-04-14 12:24:05 +00:00
pbool QCC_PR_CheckName ( const char * string )
2005-02-09 19:32:30 +00:00
{
2008-10-16 23:04:36 +00:00
if ( pr_token_type ! = tt_name )
return false ;
2014-03-30 08:55:06 +00:00
if ( flag_caseinsensitive )
2005-03-20 02:57:11 +00:00
{
if ( stricmp ( string , pr_token ) )
return false ;
}
else
{
if ( STRCMP ( string , pr_token ) )
return false ;
}
QCC_PR_Lex ( ) ;
return true ;
}
2015-04-14 12:24:05 +00:00
pbool QCC_PR_CheckKeyword ( int keywordenabled , const char * string )
2005-03-20 02:57:11 +00:00
{
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
if ( pr_token [ 0 ] = = ' _ ' & & pr_token [ 1 ] = = ' _ ' )
2005-03-20 02:57:11 +00:00
{
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
//lets just always go insensitive with a leading underscore pair.
if ( stricmp ( string , pr_token + 2 ) )
2005-03-20 02:57:11 +00:00
return false ;
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
QCC_PR_Lex ( ) ;
return true ;
2005-03-20 02:57:11 +00:00
}
else
{
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
if ( ! keywordenabled )
2005-03-20 02:57:11 +00:00
return false ;
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
if ( flag_caseinsensitive )
{
if ( stricmp ( string , pr_token ) )
return false ;
}
else
{
if ( STRCMP ( string , pr_token ) )
return false ;
}
2005-03-20 02:57:11 +00:00
}
2005-02-09 19:32:30 +00:00
QCC_PR_Lex ( ) ;
return true ;
}
2005-03-20 02:57:11 +00:00
# endif
2005-02-09 19:32:30 +00:00
2004-08-23 01:38:21 +00:00
/*
= = = = = = = = = = = =
PR_ParseName
Checks to see if the current token is a valid name
= = = = = = = = = = = =
*/
char * QCC_PR_ParseName ( void )
{
2015-04-14 12:24:05 +00:00
char ident [ MAX_NAME ] ;
2004-08-23 01:38:21 +00:00
char * ret ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
if ( pr_token_type ! = tt_name )
2011-09-03 03:49:43 +00:00
{
if ( pr_token_type = = tt_eof )
QCC_PR_ParseError ( ERR_EOF , " unexpected EOF " , pr_token ) ;
2015-04-14 12:24:05 +00:00
else if ( strcmp ( pr_token , " ... " ) ) //seriously? someone used '...' as an intrinsic NAME?
2018-09-29 03:40:50 +00:00
QCC_PR_ParseError ( ERR_NOTANAME , " \" %s%s%s \" - not a name " , col_name , pr_token , col_none ) ;
2011-09-03 03:49:43 +00:00
}
2004-08-23 01:38:21 +00:00
if ( strlen ( pr_token ) > = MAX_NAME - 1 )
QCC_PR_ParseError ( ERR_NAMETOOLONG , " name too long " ) ;
strcpy ( ident , pr_token ) ;
QCC_PR_Lex ( ) ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
ret = qccHunkAlloc ( strlen ( ident ) + 1 ) ;
strcpy ( ret , ident ) ;
return ret ;
// return ident;
}
/*
= = = = = = = = = = = =
PR_FindType
Returns a preexisting complex type that matches the parm , or allocates
a new one and copies it out .
= = = = = = = = = = = =
*/
2014-09-05 19:17:57 +00:00
//requires EVERYTHING to be the same
2015-04-14 12:24:05 +00:00
static int typecmp_strict ( QCC_type_t * a , QCC_type_t * b )
2014-09-05 19:17:57 +00:00
{
int i ;
if ( a = = b )
return 0 ;
if ( ! a | | ! b )
return 1 ; //different (^ and not both null)
if ( a - > type ! = b - > type )
return 1 ;
if ( a - > num_parms ! = b - > num_parms )
return 1 ;
if ( a - > vargs ! = b - > vargs )
return 1 ;
if ( a - > vargcount ! = b - > vargcount )
return 1 ;
if ( a - > size ! = b - > size )
return 1 ;
2014-09-08 23:35:32 +00:00
if ( a - > accessors ! = b - > accessors )
2014-09-05 19:17:57 +00:00
return 1 ;
if ( STRCMP ( a - > name , b - > name ) )
return 1 ;
if ( typecmp_strict ( a - > aux_type , b - > aux_type ) )
return 1 ;
i = a - > num_parms ;
while ( i - - > 0 )
{
if ( STRCMP ( a - > params [ i ] . paramname , b - > params [ i ] . paramname ) )
return 1 ;
if ( typecmp_strict ( a - > params [ i ] . type , b - > params [ i ] . type ) )
return 1 ;
2017-02-19 00:15:42 +00:00
if ( a - > params [ i ] . defltvalue . cast | | b - > params [ i ] . defltvalue . cast )
{
if ( typecmp_strict ( a - > params [ i ] . defltvalue . cast , b - > params [ i ] . defltvalue . cast ) | |
a - > params [ i ] . defltvalue . sym ! = b - > params [ i ] . defltvalue . sym | |
a - > params [ i ] . defltvalue . ofs ! = b - > params [ i ] . defltvalue . ofs )
return 1 ;
}
2014-09-05 19:17:57 +00:00
}
return 0 ;
}
//reports if they're functionally equivelent (allows assignments)
2004-08-23 01:38:21 +00:00
int typecmp ( QCC_type_t * a , QCC_type_t * b )
{
2013-06-02 06:03:54 +00:00
int i ;
2004-08-23 01:38:21 +00:00
if ( a = = b )
return 0 ;
if ( ! a | | ! b )
return 1 ; //different (^ and not both null)
if ( a - > type ! = b - > type )
return 1 ;
if ( a - > num_parms ! = b - > num_parms )
return 1 ;
2013-06-02 06:03:54 +00:00
if ( a - > vargs ! = b - > vargs )
return 1 ;
2013-12-29 22:48:28 +00:00
if ( a - > vargcount ! = b - > vargcount )
return 1 ;
2004-08-23 01:38:21 +00:00
if ( a - > size ! = b - > size )
return 1 ;
2013-06-02 06:03:54 +00:00
if ( ( a - > type = = ev_entity & & a - > parentclass ) | | a - > type = = ev_struct | | a - > type = = ev_union )
{
if ( STRCMP ( a - > name , b - > name ) )
return 1 ;
}
2004-08-23 01:38:21 +00:00
if ( typecmp ( a - > aux_type , b - > aux_type ) )
return 1 ;
2013-06-02 06:03:54 +00:00
i = a - > num_parms ;
while ( i - - > 0 )
2004-08-23 01:38:21 +00:00
{
2013-06-02 06:03:54 +00:00
if ( a - > type ! = ev_function & & STRCMP ( a - > params [ i ] . paramname , b - > params [ i ] . paramname ) )
return 1 ;
if ( typecmp ( a - > params [ i ] . type , b - > params [ i ] . type ) )
return 1 ;
2021-07-07 13:10:20 +00:00
if ( ( a - > type ! = ev_function & & ( a - > params [ i ] . defltvalue . cast | | b - > params [ i ] . defltvalue . cast ) ) | |
( a - > type = = ev_function & & ( a - > params [ i ] . defltvalue . cast & & b - > params [ i ] . defltvalue . cast ) ) )
2017-02-19 00:15:42 +00:00
{
if ( typecmp ( a - > params [ i ] . defltvalue . cast , b - > params [ i ] . defltvalue . cast ) | |
a - > params [ i ] . defltvalue . sym ! = b - > params [ i ] . defltvalue . sym | |
a - > params [ i ] . defltvalue . ofs ! = b - > params [ i ] . defltvalue . ofs )
return 1 ;
}
2004-08-23 01:38:21 +00:00
}
return 0 ;
}
2012-11-27 03:23:19 +00:00
//compares the types, but doesn't complain if there are optional arguments which differ
int typecmp_lax ( QCC_type_t * a , QCC_type_t * b )
{
2013-06-02 06:03:54 +00:00
unsigned int minargs = 0 ;
unsigned int t ;
2014-09-05 19:17:57 +00:00
2012-11-27 03:23:19 +00:00
if ( a = = b )
return 0 ;
if ( ! a | | ! b )
return 1 ; //different (^ and not both null)
if ( a - > type ! = b - > type )
{
2014-09-05 19:17:57 +00:00
if ( a - > type = = ev_accessor & & a - > parentclass )
if ( ! typecmp_lax ( a - > parentclass , b ) )
return 0 ;
if ( b - > type = = ev_accessor & & b - > parentclass )
if ( ! typecmp_lax ( a , b - > parentclass ) )
return 0 ;
2012-11-27 03:23:19 +00:00
if ( a - > type ! = ev_variant & & b - > type ! = ev_variant )
return 1 ;
}
else if ( a - > size ! = b - > size )
return 1 ;
2013-12-29 22:48:28 +00:00
if ( a - > vargcount ! = b - > vargcount )
return 1 ;
2012-11-27 03:23:19 +00:00
t = a - > num_parms ;
2013-06-02 06:03:54 +00:00
minargs = t ;
2012-11-27 03:23:19 +00:00
t = b - > num_parms ;
2013-06-02 06:03:54 +00:00
if ( minargs > t )
minargs = t ;
2012-11-27 03:23:19 +00:00
// if (STRCMP(a->name, b->name)) //This isn't 100% clean.
// return 1;
if ( typecmp_lax ( a - > aux_type , b - > aux_type ) )
return 1 ;
2015-06-12 14:44:50 +00:00
//variants and args don't make sense, and are considered equivelent(ish).
if ( a - > type = = ev_variant | | b - > type = = ev_variant )
return 0 ;
2013-06-02 06:03:54 +00:00
//optional arg types must match, even if they're not specified in one.
for ( t = 0 ; t < minargs ; t + + )
2012-11-27 03:23:19 +00:00
{
2013-06-02 06:03:54 +00:00
if ( a - > params [ t ] . type - > type ! = b - > params [ t ] . type - > type )
return 1 ;
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
if ( a - > params [ t ] . out ! = b - > params [ t ] . out )
return 1 ;
2013-06-02 06:03:54 +00:00
//classes/structs/unions are matched on class names rather than the contents of the class
//it gets too painful otherwise, with recursive definitions.
if ( a - > params [ t ] . type - > type = = ev_entity | | a - > params [ t ] . type - > type = = ev_struct | | a - > params [ t ] . type - > type = = ev_union )
2012-11-27 03:23:19 +00:00
{
2013-06-02 06:03:54 +00:00
if ( STRCMP ( a - > params [ t ] . type - > name , b - > params [ t ] . type - > name ) )
return 1 ;
}
else
{
if ( typecmp_lax ( a - > params [ t ] . type , b - > params [ t ] . type ) )
return 1 ;
}
2017-02-19 00:15:42 +00:00
2021-07-07 13:10:20 +00:00
if ( ( a - > type ! = ev_function & & ( a - > params [ t ] . defltvalue . cast | | b - > params [ t ] . defltvalue . cast ) ) | |
( a - > type = = ev_function & & ( a - > params [ t ] . defltvalue . cast & & b - > params [ t ] . defltvalue . cast ) ) )
2017-02-19 00:15:42 +00:00
{
if ( typecmp ( a - > params [ t ] . defltvalue . cast , b - > params [ t ] . defltvalue . cast ) | |
a - > params [ t ] . defltvalue . sym ! = b - > params [ t ] . defltvalue . sym | |
a - > params [ t ] . defltvalue . ofs ! = b - > params [ t ] . defltvalue . ofs )
return 1 ;
}
2013-06-02 06:03:54 +00:00
}
if ( a - > num_parms > minargs )
{
2014-05-18 23:02:04 +00:00
for ( t = minargs ; t < a - > num_parms ; t + + )
2013-06-02 06:03:54 +00:00
{
if ( ! a - > params [ t ] . optional )
return 1 ;
}
}
if ( b - > num_parms > minargs )
{
2014-05-18 23:02:04 +00:00
for ( t = minargs ; t < b - > num_parms ; t + + )
2013-06-02 06:03:54 +00:00
{
if ( ! b - > params [ t ] . optional )
2012-11-27 03:23:19 +00:00
return 1 ;
}
}
return 0 ;
}
2013-06-02 06:03:54 +00:00
QCC_type_t * QCC_PR_DuplicateType ( QCC_type_t * in , pbool recurse )
2004-08-23 01:38:21 +00:00
{
2013-06-02 06:03:54 +00:00
QCC_type_t * out ;
2004-08-23 01:38:21 +00:00
if ( ! in )
return NULL ;
2012-02-05 01:38:51 +00:00
out = QCC_PR_NewType ( in - > name , in - > type , false ) ;
2013-06-02 06:03:54 +00:00
out - > aux_type = recurse ? QCC_PR_DuplicateType ( in - > aux_type , recurse ) : in - > aux_type ;
out - > num_parms = in - > num_parms ;
out - > params = qccHunkAlloc ( sizeof ( * out - > params ) * out - > num_parms ) ;
memcpy ( out - > params , in - > params , sizeof ( * out - > params ) * out - > num_parms ) ;
2018-07-14 18:50:20 +00:00
out - > accessors = in - > accessors ;
2004-08-23 01:38:21 +00:00
out - > size = in - > size ;
out - > num_parms = in - > num_parms ;
out - > name = in - > name ;
out - > parentclass = in - > parentclass ;
2022-06-19 15:18:00 +00:00
out - > vargs = in - > vargs ;
out - > vargcount = in - > vargcount ;
2004-08-23 01:38:21 +00:00
return out ;
}
2013-06-02 06:03:54 +00:00
static void Q_strlcat ( char * dest , const char * src , int sizeofdest )
{
if ( sizeofdest )
{
int dlen = strlen ( dest ) ;
int slen = strlen ( src ) + 1 ;
memcpy ( dest + dlen , src , min ( ( sizeofdest - 1 ) - dlen , slen ) ) ;
dest [ sizeofdest - 1 ] = 0 ;
}
}
2013-03-12 23:22:05 +00:00
char * TypeName ( QCC_type_t * type , char * buffer , int buffersize )
2004-08-23 01:38:21 +00:00
{
char * ret ;
2022-05-28 18:00:09 +00:00
/*if (type->typedefed)
{
if ( buffersize < 0 )
return buffer ;
* buffer = 0 ;
Q_strlcat ( buffer , type - > name , buffersize ) ;
return buffer ;
} */
2004-08-23 01:38:21 +00:00
2013-12-17 22:45:37 +00:00
if ( type - > type = = ev_void )
2014-03-01 11:38:53 +00:00
{
if ( buffersize < 0 )
return buffer ;
* buffer = 0 ;
Q_strlcat ( buffer , " void " , buffersize ) ;
return buffer ;
}
2020-09-29 07:09:01 +00:00
if ( type - > type = = ev_enum )
{
if ( buffersize < 0 )
return buffer ;
* buffer = 0 ;
Q_strlcat ( buffer , " enum " , buffersize ) ;
Q_strlcat ( buffer , type - > name , buffersize ) ;
Q_strlcat ( buffer , " : " , buffersize ) ;
TypeName ( type - > aux_type , buffer + strlen ( buffer ) , buffersize - strlen ( buffer ) ) ;
return buffer ;
}
if ( type - > type = = ev_struct )
{
if ( buffersize < 0 )
return buffer ;
* buffer = 0 ;
Q_strlcat ( buffer , " struct " , buffersize ) ;
Q_strlcat ( buffer , type - > name , buffersize ) ;
return buffer ;
}
if ( type - > type = = ev_union )
{
if ( buffersize < 0 )
return buffer ;
* buffer = 0 ;
Q_strlcat ( buffer , " union " , buffersize ) ;
Q_strlcat ( buffer , type - > name , buffersize ) ;
return buffer ;
}
2013-12-17 22:45:37 +00:00
2013-03-12 23:22:05 +00:00
if ( type - > type = = ev_pointer )
{
2013-06-02 06:03:54 +00:00
if ( buffersize < 0 )
return buffer ;
2013-03-12 23:22:05 +00:00
TypeName ( type - > aux_type , buffer , buffersize - 2 ) ;
2013-06-02 06:03:54 +00:00
Q_strlcat ( buffer , " * " , buffersize ) ;
2013-03-12 23:22:05 +00:00
return buffer ;
}
2004-08-23 01:38:21 +00:00
2013-03-12 23:22:05 +00:00
ret = buffer ;
2004-08-23 01:38:21 +00:00
if ( type - > type = = ev_field )
{
type = type - > aux_type ;
* ret + + = ' . ' ;
}
* ret = 0 ;
if ( type - > type = = ev_function )
{
2011-11-08 06:00:35 +00:00
int args = type - > num_parms ;
2013-06-02 06:03:54 +00:00
pbool vargs = type - > vargs ;
unsigned int i ;
Q_strlcat ( buffer , type - > aux_type - > name , buffersize ) ;
Q_strlcat ( buffer , " ( " , buffersize ) ;
for ( i = 0 ; i < type - > num_parms ; )
2004-08-23 01:38:21 +00:00
{
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
if ( type - > params [ i ] . out )
Q_strlcat ( buffer , " inout " , buffersize ) ;
2013-06-02 06:03:54 +00:00
if ( type - > params [ i ] . optional )
Q_strlcat ( buffer , " optional " , buffersize ) ;
2011-11-08 06:00:35 +00:00
args - - ;
2013-06-02 06:03:54 +00:00
Q_strlcat ( buffer , type - > params [ i ] . type - > name , buffersize ) ;
2014-03-01 11:38:53 +00:00
if ( type - > params [ i ] . paramname & & * type - > params [ i ] . paramname )
2013-03-12 23:15:32 +00:00
{
2013-06-02 06:03:54 +00:00
Q_strlcat ( buffer , " " , buffersize ) ;
Q_strlcat ( buffer , type - > params [ i ] . paramname , buffersize ) ;
2013-03-12 23:15:32 +00:00
}
2004-08-23 01:38:21 +00:00
2017-02-19 00:15:42 +00:00
if ( type - > params [ i ] . defltvalue . cast )
{
Q_strlcat ( buffer , " = " , buffersize ) ;
Q_strlcat ( buffer , QCC_VarAtOffset ( type - > params [ i ] . defltvalue ) , buffersize ) ;
}
2013-06-02 06:03:54 +00:00
if ( + + i < type - > num_parms | | vargs )
Q_strlcat ( buffer , " , " , buffersize ) ;
2011-11-08 06:00:35 +00:00
}
2013-06-02 06:03:54 +00:00
if ( vargs )
Q_strlcat ( buffer , " ... " , buffersize ) ;
Q_strlcat ( buffer , " ) " , buffersize ) ;
2004-08-23 01:38:21 +00:00
}
else if ( type - > type = = ev_entity & & type - > parentclass )
{
2013-03-12 23:22:05 +00:00
ret = buffer ;
2004-08-23 01:38:21 +00:00
* ret = 0 ;
2013-06-02 06:03:54 +00:00
Q_strlcat ( buffer , " class " , buffersize ) ;
Q_strlcat ( buffer , type - > name , buffersize ) ;
2004-08-23 01:38:21 +00:00
/* strcat(ret, " {");
type = type - > param ;
while ( type )
{
strcat ( ret , type - > name ) ;
type = type - > next ;
if ( type )
strcat ( ret , " , " ) ;
}
strcat ( ret , " } " ) ;
*/
}
else
2013-06-02 06:03:54 +00:00
Q_strlcat ( buffer , type - > name , buffersize ) ;
2004-08-23 01:38:21 +00:00
2013-03-12 23:22:05 +00:00
return buffer ;
2004-08-23 01:38:21 +00:00
}
//#define typecmp(a, b) (a && ((a)->type==(b)->type) && !STRCMP((a)->name, (b)->name))
2018-10-11 10:31:23 +00:00
static QCC_type_t * QCC_PR_FindType ( QCC_type_t * type )
2004-08-23 01:38:21 +00:00
{
int t ;
for ( t = 0 ; t < numtypeinfos ; t + + )
{
// check = &qcc_typeinfo[t];
2014-09-05 19:17:57 +00:00
if ( typecmp_strict ( & qcc_typeinfo [ t ] , type ) )
2004-08-23 01:38:21 +00:00
continue ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
// c2 = check->next;
// n2 = type->next;
// for (i=0 ; n2&&c2 ; i++)
// {
// if (!typecmp((c2), (n2)))
// break;
// c2=c2->next;
// n2=n2->next;
// }
// if (n2==NULL&&c2==NULL)
{
return & qcc_typeinfo [ t ] ;
}
}
2018-10-11 10:31:23 +00:00
type = QCC_PR_DuplicateType ( type , false ) ;
2004-08-23 01:38:21 +00:00
return type ;
}
/*
QCC_type_t * QCC_PR_NextSubType ( QCC_type_t * type , QCC_type_t * prev )
{
int p ;
if ( ! prev )
return type - > next ;
for ( p = prev - > num_parms ; p ; p - - )
prev = QCC_PR_NextSubType ( prev , NULL ) ;
if ( prev - > num_parms )
switch ( prev - > type )
{
case ev_function :
}
return prev - > next ;
}
*/
2018-07-14 18:50:20 +00:00
QCC_type_t * QCC_TypeForName ( const char * name )
2004-08-23 01:38:21 +00:00
{
2022-06-19 15:18:00 +00:00
QCC_type_t * t = pHash_Get ( & typedeftable , name ) ;
while ( t & & t - > scope )
{
if ( t - > scope = = pr_scope )
break ; //its okay after all.
t = pHash_GetNext ( & typedeftable , name , t ) ;
}
2022-08-08 22:45:19 +00:00
if ( t & & t - > type = = ev_typedef )
return t - > aux_type ; //just use its real type.
2022-06-19 15:18:00 +00:00
return t ;
2004-08-23 01:38:21 +00:00
}
/*
= = = = = = = = = = = =
PR_SkipToSemicolon
For error recovery , also pops out of nested braces
= = = = = = = = = = = =
*/
void QCC_PR_SkipToSemicolon ( void )
{
2017-08-14 16:38:44 +00:00
//escape out of any #define
while ( currentchunk & & currentchunk - > cnst )
QCC_PR_UnInclude ( ) ;
2004-08-23 01:38:21 +00:00
do
{
2005-03-20 02:57:11 +00:00
if ( ! pr_bracelevel & & QCC_PR_CheckToken ( " ; " ) )
2004-08-23 01:38:21 +00:00
return ;
QCC_PR_Lex ( ) ;
} while ( pr_token_type ! = tt_eof ) ;
}
/*
= = = = = = = = = = = =
PR_ParseType
Parses a variable type , including field and functions types
= = = = = = = = = = = =
*/
# ifdef MAX_EXTRA_PARMS
char pr_parm_names [ MAX_PARMS + MAX_EXTRA_PARMS ] [ MAX_NAME ] ;
# else
char pr_parm_names [ MAX_PARMS ] [ MAX_NAME ] ;
# endif
2013-12-29 22:48:28 +00:00
char * pr_parm_argcount_name ;
2004-08-23 01:38:21 +00:00
2013-06-04 15:41:21 +00:00
int recursivefunctiontype ;
2004-09-02 12:58:49 +00:00
2018-10-23 07:09:06 +00:00
QCC_type_t * QCC_PR_MakeThiscall ( QCC_type_t * orig , QCC_type_t * thistype )
2018-10-11 10:31:23 +00:00
{
QCC_type_t ftype = * orig ;
ftype . ptrto = NULL ;
ftype . typedefed = false ;
ftype . num_parms + + ;
ftype . params = qccHunkAlloc ( sizeof ( * ftype . params ) * ftype . num_parms ) ;
memcpy ( ftype . params + 1 , orig - > params , sizeof ( * ftype . params ) * orig - > num_parms ) ;
ftype . params [ 0 ] . paramname = " this " ;
2018-10-23 07:09:06 +00:00
ftype . params [ 0 ] . type = QCC_PR_PointerType ( thistype ) ;
2018-10-11 10:31:23 +00:00
ftype . params [ 0 ] . isvirtual = true ;
2018-10-23 07:09:06 +00:00
memmove ( & pr_parm_names [ 1 ] , & pr_parm_names [ 0 ] , sizeof ( * pr_parm_names ) * orig - > num_parms ) ;
strcpy ( pr_parm_names [ 0 ] , " this " ) ;
2018-10-11 10:31:23 +00:00
orig = QCC_PR_FindType ( & ftype ) ;
if ( ! orig )
{
orig = QCC_PR_NewType ( ftype . name , ftype . type , false ) ;
* orig = ftype ;
}
return orig ;
}
2004-08-23 01:38:21 +00:00
//expects a ( to have already been parsed.
QCC_type_t * QCC_PR_ParseFunctionType ( int newtype , QCC_type_t * returntype )
{
2020-09-11 01:18:32 +00:00
QCC_type_t * ftype , * t ;
2004-08-23 01:38:21 +00:00
char * name ;
2004-09-02 12:58:49 +00:00
int definenames = ! recursivefunctiontype ;
2011-11-08 06:00:35 +00:00
int numparms = 0 ;
2013-06-02 06:03:54 +00:00
struct QCC_typeparam_s paramlist [ MAX_PARMS + MAX_EXTRA_PARMS ] ;
2004-09-02 12:58:49 +00:00
recursivefunctiontype + + ;
2012-02-05 01:38:51 +00:00
ftype = QCC_PR_NewType ( type_function - > name , ev_function , false ) ;
2004-08-23 01:38:21 +00:00
ftype - > aux_type = returntype ; // return type
ftype - > num_parms = 0 ;
2013-12-29 22:48:28 +00:00
if ( definenames )
pr_parm_argcount_name = NULL ;
2004-08-23 01:38:21 +00:00
2005-03-20 02:57:11 +00:00
if ( ! QCC_PR_CheckToken ( " ) " ) )
2004-08-23 01:38:21 +00:00
{
2013-06-02 06:03:54 +00:00
do
{
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
pbool foundinout ;
2013-06-02 06:03:54 +00:00
if ( ftype - > num_parms > = MAX_PARMS + MAX_EXTRA_PARMS )
QCC_PR_ParseError ( ERR_TOOMANYTOTALPARAMETERS , " Too many parameters. Sorry. (limit is %i) \n " , MAX_PARMS + MAX_EXTRA_PARMS ) ;
2004-08-23 01:38:21 +00:00
2013-06-02 06:03:54 +00:00
if ( QCC_PR_CheckToken ( " ... " ) )
{
2020-09-11 01:18:32 +00:00
t = QCC_PR_ParseType ( false , true ) ; //the evil things I do...
if ( ! t )
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
{
2020-09-11 01:18:32 +00:00
ftype - > vargs = true ;
break ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
}
2020-09-11 01:18:32 +00:00
else
{ //its a ... followed by a type... don't bug out...
t = QCC_PR_FieldType ( t ) ;
t = QCC_PR_FieldType ( t ) ;
t = QCC_PR_FieldType ( t ) ;
paramlist [ numparms ] . type = t ;
2020-10-26 06:30:35 +00:00
foundinout = false ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
}
2020-09-11 01:18:32 +00:00
}
else
{
foundinout = false ;
paramlist [ numparms ] . optional = false ;
paramlist [ numparms ] . isvirtual = false ;
paramlist [ numparms ] . out = false ;
while ( 1 )
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
{
2020-09-11 01:18:32 +00:00
if ( ! paramlist [ numparms ] . optional & & QCC_PR_CheckKeyword ( keyword_optional , " optional " ) )
paramlist [ numparms ] . optional = true ;
else if ( ! foundinout & & QCC_PR_CheckKeyword ( keyword_inout , " inout " ) )
{
paramlist [ numparms ] . out = true ;
foundinout = true ;
}
else if ( ! foundinout & & QCC_PR_CheckKeyword ( keyword_inout , " out " ) )
{
paramlist [ numparms ] . out = 2 ; //not really supported, but parsed for readability.
foundinout = true ;
}
else if ( ! foundinout & & QCC_PR_CheckKeyword ( keyword_inout , " in " ) )
{
paramlist [ numparms ] . out = false ;
foundinout = true ;
}
else
break ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
}
2004-08-23 01:38:21 +00:00
2020-09-11 01:18:32 +00:00
t = QCC_PR_ParseType ( false , false ) ;
}
2017-02-19 00:15:42 +00:00
paramlist [ numparms ] . defltvalue . cast = NULL ;
2013-06-02 06:03:54 +00:00
paramlist [ numparms ] . ofs = 0 ;
paramlist [ numparms ] . arraysize = 0 ;
2020-09-11 01:18:32 +00:00
paramlist [ numparms ] . type = t ;
2017-02-01 04:42:33 +00:00
if ( ! paramlist [ numparms ] . type )
QCC_PR_ParseError ( 0 , " Expected type \n " ) ;
2004-08-23 01:38:21 +00:00
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
while ( QCC_PR_CheckToken ( " * " ) )
paramlist [ numparms ] . type = QCC_PointerTypeTo ( paramlist [ numparms ] . type ) ;
2013-06-02 06:03:54 +00:00
if ( paramlist [ numparms ] . type - > type = = ev_void )
2017-02-19 00:15:42 +00:00
break ; //float(void) has no actual args
2013-06-02 06:03:54 +00:00
2017-10-31 22:52:58 +00:00
if ( ! foundinout & & QCC_PR_CheckToken ( " & " ) )
{ //accept c++ syntax, at least on arguments. its not quite the same, but it'll do.
paramlist [ numparms ] . out = true ;
foundinout = true ;
}
2013-06-02 06:03:54 +00:00
// type->name = "FUNC PARAMETER";
paramlist [ numparms ] . paramname = " " ;
if ( STRCMP ( pr_token , " , " ) & & STRCMP ( pr_token , " ) " ) )
{
2015-04-14 12:24:05 +00:00
if ( QCC_PR_CheckToken ( " ... " ) )
{
ftype - > vargs = true ;
break ;
}
2013-06-02 06:03:54 +00:00
newtype = true ;
name = QCC_PR_ParseName ( ) ;
paramlist [ numparms ] . paramname = qccHunkAlloc ( strlen ( name ) + 1 ) ;
strcpy ( paramlist [ numparms ] . paramname , name ) ;
if ( definenames )
strcpy ( pr_parm_names [ numparms ] , name ) ;
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
if ( QCC_PR_CheckToken ( " [ " ) )
{
2020-09-29 07:09:01 +00:00
if ( QCC_PR_CheckToken ( " ] " ) ) //length omitted. just treat it as a pointer...?
{
QCC_PR_ParseError ( 0 , " unsized array argument \n " ) ;
paramlist [ numparms ] . type = QCC_PointerTypeTo ( paramlist [ numparms ] . type ) ;
}
else
{ //proper array
paramlist [ numparms ] . arraysize = QCC_PR_IntConstExpr ( ) ;
if ( ! paramlist [ numparms ] . arraysize )
QCC_PR_ParseError ( ERR_NOTANAME , " cannot cope with 0-sized arrays " ) ;
QCC_PR_Expect ( " ] " ) ;
}
added r_meshpitch cvar that allows for fixing the unfixable mesh pitch bug from vanilla... needs a better name... do note that this will break pretty much any mod, so this is really only for TCs designed to use it. Its likely that I missed places.
nqsv: added support for spectators with nq clients. the angles are a bit rough, but hey. need to do something about frags so nq clients know who's a spectator. use 'cmd observe' to get an nq client to spectate on an fte server (then attack/jump behave the same as in qw clients).
nqsv: rewrote EF_MUZZLEFLASH handling, so svc_muzzleflash is now translated properly to EF_MUZZLEFLASH, and vice versa. No more missing muzzleflashes!
added screenshot_cubemap, so you can actually pre-generate cubemaps with fte (which can be used for reflections or whatever).
misc fixes (server crash, a couple of other less important ones).
external files based on a model's name will now obey r_replacemodels properly, instead of needing to use foo.mdl_0.skin for foo.md3.
identify <playernum> should now use the correct masked ip, instead of abrubtly failing (reported by kt)
vid_toggle console command should now obey vid_width and vid_height when switching to fullscreen, but only if vid_fullscreen is actually set, which should make it seem better behaved (reported by kt).
qcc: cleaned up sym->symboldata[sym->ofs] to be more consistent at all stages.
qcc: typedef float vec4[4]; now works to define a float array with 4 elements (however, it will be passed by-value rather than by-reference).
qcc: cleaned up optional vs __out ordering issues.
qccgui: shift+f3 searches backwards
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5064 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-02-27 09:34:35 +00:00
}
2013-06-02 06:03:54 +00:00
}
else if ( definenames )
strcpy ( pr_parm_names [ numparms ] , " " ) ;
2017-02-19 00:15:42 +00:00
if ( QCC_PR_CheckToken ( " = " ) )
2017-06-05 15:20:57 +00:00
{
2017-02-19 00:15:42 +00:00
paramlist [ numparms ] . defltvalue = QCC_PR_ParseDefaultInitialiser ( paramlist [ numparms ] . type ) ;
2017-06-05 15:20:57 +00:00
QCC_FreeTemp ( paramlist [ numparms ] . defltvalue ) ;
}
2013-06-02 06:03:54 +00:00
numparms + + ;
} while ( QCC_PR_CheckToken ( " , " ) ) ;
2010-12-08 14:42:05 +00:00
2013-12-29 22:48:28 +00:00
if ( ftype - > vargs )
{
if ( ! QCC_PR_CheckToken ( " ) " ) )
{
name = QCC_PR_ParseName ( ) ;
if ( definenames )
{
pr_parm_argcount_name = qccHunkAlloc ( strlen ( name ) + 1 ) ;
strcpy ( pr_parm_argcount_name , name ) ;
}
ftype - > vargcount = true ;
QCC_PR_Expect ( " ) " ) ;
}
}
else
QCC_PR_Expect ( " ) " ) ;
2004-08-23 01:38:21 +00:00
}
2013-06-02 06:03:54 +00:00
ftype - > num_parms = numparms ;
ftype - > params = qccHunkAlloc ( sizeof ( * ftype - > params ) * numparms ) ;
memcpy ( ftype - > params , paramlist , sizeof ( * ftype - > params ) * numparms ) ;
2004-09-02 12:58:49 +00:00
recursivefunctiontype - - ;
2016-07-12 00:40:13 +00:00
if ( returntype - > size > 3 & & ! autoprototype ) //fixme: handle properly, without breaking __out
QCC_PR_ParseWarning ( WARN_UNDESIRABLECONVENTION , " Unable to handle functions returning structures larger than a vector. Will truncate. " ) ;
2004-08-23 01:38:21 +00:00
if ( newtype )
return ftype ;
return QCC_PR_FindType ( ftype ) ;
}
2005-02-09 19:32:30 +00:00
QCC_type_t * QCC_PR_ParseFunctionTypeReacc ( int newtype , QCC_type_t * returntype )
{
2014-03-01 11:38:53 +00:00
QCC_type_t * ftype , * nptype ;
char * name ;
int definenames = ! recursivefunctiontype ;
int numparms = 0 ;
struct QCC_typeparam_s paramlist [ MAX_PARMS + MAX_EXTRA_PARMS ] ;
2005-02-09 19:32:30 +00:00
recursivefunctiontype + + ;
2012-02-05 01:38:51 +00:00
ftype = QCC_PR_NewType ( type_function - > name , ev_function , false ) ;
2005-02-09 19:32:30 +00:00
ftype - > aux_type = returntype ; // return type
ftype - > num_parms = 0 ;
2013-12-29 22:48:28 +00:00
pr_parm_argcount_name = NULL ;
2005-02-09 19:32:30 +00:00
2005-03-20 02:57:11 +00:00
if ( ! QCC_PR_CheckToken ( " ) " ) )
2005-02-09 19:32:30 +00:00
{
2014-03-01 11:38:53 +00:00
do
{
if ( numparms > = MAX_PARMS + MAX_EXTRA_PARMS )
QCC_PR_ParseError ( ERR_TOOMANYTOTALPARAMETERS , " Too many parameters. Sorry. (limit is %i) \n " , MAX_PARMS + MAX_EXTRA_PARMS ) ;
if ( QCC_PR_CheckToken ( " ... " ) )
2005-02-09 19:32:30 +00:00
{
2014-03-01 11:38:53 +00:00
ftype - > vargs = true ;
break ;
}
2005-02-09 19:32:30 +00:00
2014-03-01 11:38:53 +00:00
if ( QCC_PR_CheckName ( " arg " ) )
{
name = " " ;
nptype = QCC_PR_NewType ( " Variant " , ev_variant , false ) ;
}
else if ( QCC_PR_CheckName ( " vect " ) ) //this can only be of vector sizes, so...
{
name = " " ;
nptype = QCC_PR_NewType ( " Vector " , ev_vector , false ) ;
}
else
{
name = QCC_PR_ParseName ( ) ;
QCC_PR_Expect ( " : " ) ;
nptype = QCC_PR_ParseType ( true , false ) ;
}
2005-02-09 19:32:30 +00:00
2017-02-01 04:42:33 +00:00
if ( ! nptype )
QCC_PR_ParseError ( 0 , " Expected type \n " ) ;
2014-03-01 11:38:53 +00:00
if ( nptype - > type = = ev_void )
break ;
// type->name = "FUNC PARAMETER";
2005-02-09 19:32:30 +00:00
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
paramlist [ numparms ] . out = false ;
2014-03-01 11:38:53 +00:00
paramlist [ numparms ] . optional = false ;
2018-10-11 10:31:23 +00:00
paramlist [ numparms ] . isvirtual = false ;
2014-03-01 11:38:53 +00:00
paramlist [ numparms ] . ofs = 0 ;
paramlist [ numparms ] . arraysize = 0 ;
paramlist [ numparms ] . type = nptype ;
if ( ! * name )
paramlist [ numparms ] . paramname = " " ;
else
{
paramlist [ numparms ] . paramname = qccHunkAlloc ( strlen ( name ) + 1 ) ;
strcpy ( paramlist [ numparms ] . paramname , name ) ;
}
if ( definenames )
QC_snprintfz ( pr_parm_names [ numparms ] , MAX_NAME , " %s " , name ) ;
numparms + + ;
} while ( QCC_PR_CheckToken ( " ; " ) ) ;
2005-02-09 19:32:30 +00:00
QCC_PR_Expect ( " ) " ) ;
}
2014-03-01 11:38:53 +00:00
ftype - > num_parms = numparms ;
ftype - > params = qccHunkAlloc ( sizeof ( * ftype - > params ) * numparms ) ;
memcpy ( ftype - > params , paramlist , sizeof ( * ftype - > params ) * numparms ) ;
2005-02-09 19:32:30 +00:00
recursivefunctiontype - - ;
if ( newtype )
return ftype ;
return QCC_PR_FindType ( ftype ) ;
}
2004-11-04 04:19:10 +00:00
QCC_type_t * QCC_PR_PointerType ( QCC_type_t * pointsto )
{
2020-07-07 22:01:53 +00:00
QCC_type_t * ptype ;
2015-06-16 23:53:58 +00:00
char name [ 128 ] ;
if ( pointsto - > ptrto )
return pointsto - > ptrto ;
QC_snprintfz ( name , sizeof ( name ) , " %s* " , pointsto - > name ) ;
2020-07-07 22:01:53 +00:00
ptype = QCC_PR_NewType ( strcpy ( qccHunkAlloc ( strlen ( name ) + 1 ) , name ) , ev_pointer , false ) ;
2004-11-04 04:19:10 +00:00
ptype - > aux_type = pointsto ;
2020-07-07 22:01:53 +00:00
return pointsto - > ptrto = QCC_PR_FindType ( ptype ) ;
2004-11-04 04:19:10 +00:00
}
2005-02-09 19:32:30 +00:00
QCC_type_t * QCC_PR_FieldType ( QCC_type_t * pointsto )
{
QCC_type_t * ptype ;
char name [ 128 ] ;
2020-07-07 22:01:53 +00:00
if ( pointsto - > fldto )
return pointsto - > fldto ;
QC_snprintfz ( name , sizeof ( name ) , " .%s " , pointsto - > name ) ;
ptype = QCC_PR_NewType ( strcpy ( qccHunkAlloc ( strlen ( name ) + 1 ) , name ) , ev_field , false ) ;
2005-02-09 19:32:30 +00:00
ptype - > aux_type = pointsto ;
ptype - > size = ptype - > aux_type - > size ;
2020-07-07 22:01:53 +00:00
return pointsto - > fldto = QCC_PR_FindType ( ptype ) ;
2005-02-09 19:32:30 +00:00
}
2016-07-12 00:40:13 +00:00
QCC_type_t * QCC_PR_GenFunctionType ( QCC_type_t * rettype , struct QCC_typeparam_s * args , int numargs )
2014-09-08 23:35:32 +00:00
{
int i ;
struct QCC_typeparam_s * p ;
QCC_type_t * ftype ;
ftype = QCC_PR_NewType ( " $func " , ev_function , false ) ;
ftype - > aux_type = rettype ;
ftype - > num_parms = numargs ;
ftype - > params = p = qccHunkAlloc ( sizeof ( * ftype - > params ) * numargs ) ;
ftype - > vargs = false ;
ftype - > vargcount = false ;
for ( i = 0 ; i < numargs ; i + + , p + + )
{
2017-10-12 12:02:25 +00:00
if ( args [ i ] . paramname )
{
p - > paramname = qccHunkAlloc ( strlen ( args [ i ] . paramname ) + 1 ) ;
strcpy ( p - > paramname , args [ i ] . paramname ) ;
}
else
p - > paramname = " " ;
2016-07-12 00:40:13 +00:00
p - > type = args [ i ] . type ;
p - > out = args [ i ] . out ;
p - > optional = args [ i ] . optional ;
2018-10-11 10:31:23 +00:00
p - > isvirtual = args [ i ] . isvirtual ;
2016-07-12 00:40:13 +00:00
p - > ofs = args [ i ] . ofs ;
p - > arraysize = args [ i ] . arraysize ;
2017-02-19 00:15:42 +00:00
p - > defltvalue . cast = NULL ;
2014-09-08 23:35:32 +00:00
}
return QCC_PR_FindType ( ftype ) ;
}
2004-11-04 04:19:10 +00:00
2021-07-03 23:33:52 +00:00
struct accessor_s * QCC_PR_ParseAccessorMember ( QCC_type_t * classtype , pbool isinline , pbool setnotget )
{
struct accessor_s * acc , * pacc ;
char * fieldtypename ;
QCC_type_t * fieldtype ;
QCC_type_t * indextype ;
QCC_sref_t def ;
QCC_type_t * functype ;
QCC_type_t * parenttype ;
struct QCC_typeparam_s arg [ 3 ] ;
int args ;
char * indexname ;
pbool isref ;
char * accessorname ;
if ( QCC_PR_CheckToken ( " & " ) )
isref = 2 ;
else
isref = QCC_PR_CheckToken ( " * " ) ;
fieldtypename = QCC_PR_ParseName ( ) ;
fieldtype = QCC_TypeForName ( fieldtypename ) ;
if ( ! fieldtype )
QCC_PR_ParseError ( ERR_NOTATYPE , " Invalid type: %s " , fieldtypename ) ;
while ( QCC_PR_CheckToken ( " * " ) )
fieldtype = QCC_PR_PointerType ( fieldtype ) ;
if ( pr_token_type ! = tt_punct )
accessorname = QCC_PR_ParseName ( ) ;
else
accessorname = " " ;
indextype = NULL ;
indexname = " index " ;
if ( QCC_PR_CheckToken ( " [ " ) )
{
fieldtypename = QCC_PR_ParseName ( ) ;
indextype = QCC_TypeForName ( fieldtypename ) ;
if ( ! QCC_PR_CheckToken ( " ] " ) )
{
indexname = QCC_PR_ParseName ( ) ;
QCC_PR_Expect ( " ] " ) ;
}
}
QCC_PR_Expect ( " = " ) ;
args = 0 ;
memset ( arg , 0 , sizeof ( arg ) ) ;
strcpy ( pr_parm_names [ args ] , " this " ) ;
arg [ args ] . paramname = " this " ;
if ( isref = = 2 )
{
arg [ args ] . type = classtype ;
arg [ args ] . out = 1 ; //inout
}
else if ( isref )
arg [ args ] . type = QCC_PointerTypeTo ( classtype ) ;
else
arg [ args ] . type = classtype ;
args + + ;
if ( indextype )
{
strcpy ( pr_parm_names [ args ] , indexname ) ;
arg [ args ] . paramname = indexname ;
arg [ args + + ] . type = indextype ;
}
if ( setnotget )
{
strcpy ( pr_parm_names [ args ] , " value " ) ;
arg [ args ] . paramname = " value " ;
arg [ args + + ] . type = fieldtype ;
}
functype = QCC_PR_GenFunctionType ( setnotget ? type_void : fieldtype , arg , args ) ;
if ( pr_token_type ! = tt_name )
{
QCC_function_t * f ;
char funcname [ 256 ] ;
QC_snprintfz ( funcname , sizeof ( funcname ) , " %s::%s_%s " , classtype - > name , setnotget ? " set " : " get " , accessorname ) ;
def = QCC_PR_GetSRef ( functype , funcname , NULL , true , 0 , GDF_CONST | ( isinline ? GDF_INLINE : 0 ) ) ;
2021-07-07 13:10:20 +00:00
if ( autoprototype )
{
if ( QCC_PR_CheckToken ( " [ " ) )
{
while ( ! QCC_PR_CheckToken ( " ] " ) )
{
if ( pr_token_type = = tt_eof )
break ;
QCC_PR_Lex ( ) ;
}
}
QCC_PR_Expect ( " { " ) ;
{
int blev = 1 ;
//balance out the { and }
while ( blev )
{
if ( pr_token_type = = tt_eof )
break ;
if ( QCC_PR_CheckToken ( " { " ) )
blev + + ;
else if ( QCC_PR_CheckToken ( " } " ) )
blev - - ;
else
QCC_PR_Lex ( ) ; //ignore it.
}
}
}
else
{
pr_classtype = ( ( classtype - > type = = ev_entity ) ? classtype : NULL ) ;
f = QCC_PR_ParseImmediateStatements ( def . sym , functype , false ) ;
pr_classtype = NULL ;
pr_scope = NULL ;
def . sym - > symboldata [ def . ofs ] . function = f - functions ;
f - > def = def . sym ;
def . sym - > initialized = 1 ;
}
2021-07-03 23:33:52 +00:00
}
else
{
const char * funcname = QCC_PR_ParseName ( ) ;
def = QCC_PR_GetSRef ( functype , funcname , NULL , true , 0 , GDF_CONST | ( isinline ? GDF_INLINE : 0 ) ) ;
if ( ! def . cast )
QCC_Error ( ERR_NOFUNC , " %s::set_%s: %s was not defined " , classtype - > name , accessorname , funcname ) ;
}
if ( ! def . cast | | ! def . sym | | def . sym - > temp )
QCC_Error ( ERR_NOFUNC , " %s::%s_%s function invalid " , classtype - > name , setnotget ? " set " : " get " , accessorname ) ;
for ( acc = classtype - > accessors ; acc ; acc = acc - > next )
if ( ! strcmp ( acc - > fieldname , accessorname ) )
break ;
if ( ! acc )
{
acc = qccHunkAlloc ( sizeof ( * acc ) ) ;
acc - > fieldname = accessorname ;
acc - > next = classtype - > accessors ;
acc - > type = fieldtype ;
acc - > indexertype = indextype ;
classtype - > accessors = acc ;
}
2021-07-07 13:10:20 +00:00
if ( acc - > getset_func [ setnotget ] . cast & & (
acc - > getset_func [ setnotget ] . sym ! = def . sym | |
acc - > getset_func [ setnotget ] . cast ! = def . cast | |
acc - > getset_func [ setnotget ] . ofs ! = def . ofs ) )
2021-07-03 23:33:52 +00:00
QCC_Error ( ERR_TOOMANYINITIALISERS , " %s::%s_%s already declared " , classtype - > name , setnotget ? " set " : " get " , accessorname ) ;
acc - > getset_func [ setnotget ] = def ;
acc - > getset_isref [ setnotget ] = isref ;
QCC_FreeTemp ( def ) ;
for ( parenttype = classtype - > parentclass ; parenttype ; parenttype = parenttype - > parentclass )
{
if ( ! parenttype - > accessors )
continue ;
for ( pacc = parenttype - > accessors ; pacc ; pacc = pacc - > next )
{
if ( ! strcmp ( acc - > fieldname , pacc - > fieldname ) )
QCC_PR_ParseWarning ( WARN_DUPLICATEDEFINITION , " %s::%s shadows parent %s " , classtype - > name , acc - > fieldname ? acc - > fieldname : " <anon> " , parenttype - > name ) ;
}
}
return acc ;
}
2013-09-26 14:36:52 +00:00
extern char * basictypenames [ ] ;
extern QCC_type_t * * basictypes [ ] ;
2007-04-15 17:35:58 +00:00
pbool type_inlinefunction ;
2011-09-03 03:49:43 +00:00
/*newtype=true: creates a new type always
silentfail = true : function is permitted to return NULL if it was not given a type , otherwise never returns NULL
*/
QCC_type_t * QCC_PR_ParseType ( int newtype , pbool silentfail )
2004-08-23 01:38:21 +00:00
{
QCC_type_t * newparm ;
QCC_type_t * newt ;
QCC_type_t * type ;
char * name ;
2013-06-02 06:03:54 +00:00
etype_t structtype ;
2004-08-23 01:38:21 +00:00
2007-04-15 17:35:58 +00:00
type_inlinefunction = false ; //doesn't really matter so long as its not from an inline function type
2004-08-23 01:38:21 +00:00
// int ofs;
2020-09-29 07:09:01 +00:00
if ( QCC_PR_CheckKeyword ( keyword_const , " const " ) )
{
QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " ignoring unsupported const keyword " ) ;
silentfail = false ; //FIXME
}
2020-09-11 01:18:32 +00:00
if ( QCC_PR_PeekToken ( " ... " ) ) //this is getting stupid
{
QCC_PR_LexWhitespace ( false ) ;
if ( * pr_file_p = = ' ( ' )
{ //work around gmqcc's "(...(" being misinterpreted as a cast syntax error, instead abort here so it can be treated as an intrinsic (with args) instead.
if ( silentfail )
return NULL ;
QCC_PR_ParseError ( ERR_NOTATYPE , " \" %s \" is not a type " , pr_token ) ;
}
QCC_PR_Lex ( ) ;
type = QCC_PR_NewType ( " FIELD_TYPE " , ev_field , false ) ;
type - > aux_type = QCC_PR_ParseType ( false , false ) ;
type - > size = type - > aux_type - > size ;
newt = QCC_PR_FindType ( type ) ;
type = QCC_PR_NewType ( " FIELD_TYPE " , ev_field , false ) ;
type - > aux_type = newt ;
type - > size = type - > aux_type - > size ;
newt = QCC_PR_FindType ( type ) ;
type = QCC_PR_NewType ( " FIELD_TYPE " , ev_field , false ) ;
type - > aux_type = newt ;
type - > size = type - > aux_type - > size ;
if ( newtype )
return type ;
return QCC_PR_FindType ( type ) ;
}
2005-03-20 02:57:11 +00:00
if ( QCC_PR_CheckToken ( " .. " ) ) //so we don't end up with the user specifying '. .vector blah' (hexen2 added the .. token for array ranges)
2004-11-29 19:38:06 +00:00
{
2013-06-11 02:06:06 +00:00
newt = QCC_PR_NewType ( " FIELD_TYPE " , ev_field , false ) ;
2011-09-03 03:49:43 +00:00
newt - > aux_type = QCC_PR_ParseType ( false , false ) ;
2004-11-29 19:38:06 +00:00
newt - > size = newt - > aux_type - > size ;
newt = QCC_PR_FindType ( newt ) ;
2013-06-11 02:06:06 +00:00
type = QCC_PR_NewType ( " FIELD_TYPE " , ev_field , false ) ;
2004-11-29 19:38:06 +00:00
type - > aux_type = newt ;
type - > size = type - > aux_type - > size ;
if ( newtype )
return type ;
return QCC_PR_FindType ( type ) ;
}
2005-03-20 02:57:11 +00:00
if ( QCC_PR_CheckToken ( " . " ) )
2004-08-23 01:38:21 +00:00
{
2013-06-26 03:35:29 +00:00
//.float *foo; is annoying.
//technically it is a pointer to a .float
//most people will want a .(float*) foo;
//so .*float will give you that.
//however, we can't cope parsing that with regular types, so we support that ONLY when . was already specified.
//this is pretty much an evil syntax hack.
2017-02-01 04:42:33 +00:00
pbool ptr = QCC_PR_CheckToken ( " * " ) ;
type = QCC_PR_ParseType ( false , false ) ;
if ( ! type )
QCC_PR_ParseError ( 0 , " Expected type \n " ) ;
if ( ptr )
type = QCC_PointerTypeTo ( type ) ;
2013-06-02 06:03:54 +00:00
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
name = qccHunkAlloc ( strlen ( type - > name ) + 2 ) ;
* name = ' . ' ;
strcpy ( name + 1 , type - > name ) ;
newt = QCC_PR_NewType ( name , ev_field , false ) ;
newt - > aux_type = type ;
2013-06-02 06:03:54 +00:00
newt - > size = newt - > aux_type - > size ;
if ( newtype )
return newt ;
return QCC_PR_FindType ( newt ) ;
}
2004-08-23 01:38:21 +00:00
2018-08-18 13:33:50 +00:00
name = pr_token ;
if ( pr_token_type ! = tt_name )
{
if ( silentfail )
return NULL ;
QCC_PR_ParseError ( ERR_NOTATYPE , " \" %s \" is not a type " , name ) ;
}
// name = QCC_PR_CheckCompConstString(name);
2004-08-23 01:38:21 +00:00
2014-09-05 19:17:57 +00:00
//accessors
2020-07-13 17:48:16 +00:00
if ( QCC_PR_CheckKeyword ( keyword_accessor , " accessor " ) )
2014-09-05 19:17:57 +00:00
{
2015-01-21 18:18:37 +00:00
char parentname [ 256 ] ;
2014-09-05 19:17:57 +00:00
char * accessorname ;
char * funcname ;
newt = NULL ;
funcname = QCC_PR_ParseName ( ) ;
accessorname = qccHunkAlloc ( strlen ( funcname ) + 1 ) ;
strcpy ( accessorname , funcname ) ;
/* Look to see if this type is already defined */
2017-10-31 22:52:58 +00:00
newt = QCC_TypeForName ( accessorname ) ;
if ( newt & & newt - > type ! = ev_accessor )
QCC_PR_ParseError ( ERR_NOTANAME , " Type %s cannot be redefined as an accessor " , accessorname ) ;
2014-09-05 19:17:57 +00:00
if ( QCC_PR_CheckToken ( " : " ) )
{
2015-01-21 18:18:37 +00:00
type = QCC_PR_ParseType ( false , false ) ;
if ( type )
TypeName ( type , parentname , sizeof ( parentname ) ) ;
else
strcpy ( parentname , " ?? " ) ;
2014-09-05 19:17:57 +00:00
if ( ! type | | type - > type = = ev_struct | | type - > type = = ev_union )
QCC_PR_ParseError ( ERR_NOTANAME , " Accessor %s cannot be based upon %s " , accessorname , parentname ) ;
}
2014-09-08 23:35:32 +00:00
else
type = NULL ;
2014-09-05 19:17:57 +00:00
if ( ! newt )
{
newt = QCC_PR_NewType ( accessorname , ev_accessor , true ) ;
newt - > size = type - > size ;
}
if ( ! newt - > parentclass )
2014-09-08 23:35:32 +00:00
{
2014-09-05 19:17:57 +00:00
newt - > parentclass = type ;
2014-09-08 23:35:32 +00:00
if ( ! newt - > parentclass | | newt - > parentclass - > type = = ev_struct | | newt - > parentclass - > type = = ev_union | | newt - > size ! = newt - > parentclass - > size )
QCC_PR_ParseError ( ERR_NOTANAME , " Accessor %s cannot be based upon %s " , accessorname , parentname ) ;
}
2014-09-05 19:17:57 +00:00
else if ( type ! = newt - > parentclass )
2022-05-28 18:00:09 +00:00
{
char bufe [ 256 ] ;
char bufn [ 256 ] ;
QCC_PR_ParseError ( ERR_NOTANAME , " Accessor %s basic type mismatch (%s, expected %s) " , accessorname ,
TypeName ( type , bufn , sizeof ( bufn ) ) , TypeName ( newt - > parentclass , bufe , sizeof ( bufe ) ) ) ;
}
2014-09-05 19:17:57 +00:00
2014-09-08 23:35:32 +00:00
if ( QCC_PR_CheckToken ( " { " ) )
2014-09-05 19:17:57 +00:00
{
2014-09-08 23:35:32 +00:00
pbool setnotget ;
2015-01-21 18:18:37 +00:00
pbool isinline ;
2014-09-05 19:17:57 +00:00
2021-07-06 00:12:27 +00:00
newt - > filen = s_filen ;
newt - > line = pr_source_line ;
2014-09-05 19:17:57 +00:00
do
{
2015-01-21 18:18:37 +00:00
isinline = QCC_PR_CheckName ( " inline " ) ;
2014-09-08 23:35:32 +00:00
if ( QCC_PR_CheckName ( " set " ) )
setnotget = true ;
else if ( QCC_PR_CheckName ( " get " ) )
setnotget = false ;
else
break ;
2021-07-03 23:33:52 +00:00
QCC_PR_ParseAccessorMember ( newt , isinline , setnotget ) ;
2014-09-05 19:17:57 +00:00
} while ( QCC_PR_CheckToken ( " , " ) | | QCC_PR_CheckToken ( " ; " ) ) ;
QCC_PR_Expect ( " } " ) ;
}
if ( newtype )
newt = QCC_PR_DuplicateType ( newt , false ) ;
return newt ;
}
2023-01-09 05:13:12 +00:00
if ( flag_qcfuncs & & QCC_PR_CheckKeyword ( keyword_class , " class " ) )
2004-08-23 01:38:21 +00:00
{
// int parms;
QCC_type_t * fieldtype ;
char membername [ 2048 ] ;
2013-06-02 06:03:54 +00:00
char * classname ;
2006-09-28 02:46:42 +00:00
int forwarddeclaration ;
2013-06-02 06:03:54 +00:00
int numparms = 0 ;
struct QCC_typeparam_s * parms = NULL ;
char * parmname ;
int arraysize ;
2013-06-13 22:45:15 +00:00
pbool redeclaration ;
2013-09-26 14:36:52 +00:00
int basicindex ;
QCC_def_t * d ;
QCC_type_t * pc ;
2023-01-09 05:13:12 +00:00
QCC_type_t * basetype ;
2013-09-26 14:36:52 +00:00
pbool found = false ;
2015-06-12 14:44:50 +00:00
int assumevirtual = 0 ; //0=erk, 1=yes, -1=no
2013-06-02 06:03:54 +00:00
parmname = QCC_PR_ParseName ( ) ;
classname = qccHunkAlloc ( strlen ( parmname ) + 1 ) ;
strcpy ( classname , parmname ) ;
2006-09-28 02:46:42 +00:00
newt = 0 ;
2013-06-13 22:45:15 +00:00
if ( QCC_PR_CheckToken ( " : " ) )
{
char * parentname = QCC_PR_ParseName ( ) ;
fieldtype = QCC_TypeForName ( parentname ) ;
if ( ! fieldtype )
QCC_PR_ParseError ( ERR_NOTANAME , " Parent class %s was not yet defined " , parentname ) ;
2021-07-06 00:12:27 +00:00
//FIXME: we should allow inheriting from 'object' too.
if ( fieldtype - > type ! = ev_entity )
QCC_PR_ParseError ( ERR_NOTANAME , " Parent type %s is not a class/entity " , parentname ) ;
2013-06-13 22:45:15 +00:00
forwarddeclaration = false ;
QCC_PR_Expect ( " { " ) ;
}
else
{
fieldtype = type_entity ;
forwarddeclaration = ! QCC_PR_CheckToken ( " { " ) ;
}
2006-09-28 02:46:42 +00:00
2017-10-31 22:52:58 +00:00
newt = QCC_TypeForName ( classname ) ;
2006-09-28 02:46:42 +00:00
if ( newt & & newt - > num_parms ! = 0 )
2013-06-13 22:45:15 +00:00
redeclaration = true ;
else
redeclaration = false ;
2006-09-28 02:46:42 +00:00
if ( ! newt )
2013-06-13 22:45:15 +00:00
{
2021-07-06 00:12:27 +00:00
newt = QCC_PR_NewType ( classname , fieldtype - > type , true ) ;
2013-06-13 22:45:15 +00:00
newt - > size = type_entity - > size ;
}
2004-08-23 01:38:21 +00:00
type = NULL ;
2006-09-28 02:46:42 +00:00
if ( forwarddeclaration )
2013-06-13 22:45:15 +00:00
return newt ;
2004-08-23 01:38:21 +00:00
2013-06-13 22:45:15 +00:00
if ( pr_scope )
2020-09-08 04:44:07 +00:00
QCC_PR_ParseError ( ERR_REDECLARATION , " Declaration of class %s%s%s within function " , col_type , classname , col_none ) ;
2013-06-13 22:45:15 +00:00
if ( redeclaration & & fieldtype ! = newt - > parentclass )
2020-09-08 04:44:07 +00:00
QCC_PR_ParseError ( ERR_REDECLARATION , " Parent class changed on redeclaration of %s%s%s " , col_type , classname , col_none ) ;
2013-06-13 22:45:15 +00:00
newt - > parentclass = fieldtype ;
2021-07-06 00:12:27 +00:00
newt - > filen = s_filen ;
newt - > line = pr_source_line ;
2004-08-23 01:38:21 +00:00
2005-03-20 02:57:11 +00:00
if ( QCC_PR_CheckToken ( " , " ) )
2004-08-23 01:38:21 +00:00
QCC_PR_ParseError ( ERR_NOTANAME , " member missing name " ) ;
2005-03-20 02:57:11 +00:00
while ( ! QCC_PR_CheckToken ( " } " ) )
2004-08-23 01:38:21 +00:00
{
2021-07-17 15:09:44 +00:00
unsigned int gdf_flags ;
2023-01-09 05:13:12 +00:00
pbool wasvirt = false ;
pbool wasnonvirt = false ;
pbool wasstatic = false ;
2021-07-17 15:09:44 +00:00
pbool isconst = false ;
pbool isvar = false ;
2015-06-04 06:15:14 +00:00
pbool isignored = false ;
2021-07-03 23:33:52 +00:00
pbool isinline = false ;
pbool isget = false ;
pbool isset = false ;
2016-02-15 06:01:17 +00:00
// pbool ispublic = false;
// pbool isprivate = false;
// pbool isprotected = false;
2023-01-09 05:13:12 +00:00
pbool firstkeyword = true ;
2013-08-21 06:55:54 +00:00
while ( 1 )
{
if ( QCC_PR_CheckKeyword ( 1 , " nonvirtual " ) )
2023-01-09 05:13:12 +00:00
{
if ( firstkeyword & & QCC_PR_CheckToken ( " : " ) )
{ //fteqcc-specific
assumevirtual = - 1 ;
continue ;
}
wasnonvirt = true ;
}
2013-08-21 06:55:54 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " static " ) )
2023-01-09 05:13:12 +00:00
wasstatic = true ;
2021-07-17 15:09:44 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " const " ) )
2023-01-09 05:13:12 +00:00
isconst = wasstatic = true ;
2021-07-17 15:09:44 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " var " ) )
isvar = true ;
2013-08-21 06:55:54 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " virtual " ) )
2023-01-09 05:13:12 +00:00
{
if ( firstkeyword & & QCC_PR_CheckToken ( " : " ) )
{ //fteqcc-specific
assumevirtual = 1 ;
continue ;
}
wasvirt = true ;
}
2015-06-04 06:15:14 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " ignore " ) )
isignored = true ;
else if ( QCC_PR_CheckKeyword ( 1 , " strip " ) )
isignored = true ;
2021-07-03 23:33:52 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " inline " ) )
isinline = true ;
else if ( QCC_PR_CheckKeyword ( 1 , " get " ) )
isget = true ;
else if ( QCC_PR_CheckKeyword ( 1 , " set " ) )
isset = true ;
2023-01-09 05:13:12 +00:00
else if ( firstkeyword & & QCC_PR_CheckKeyword ( 1 , " public " ) )
{
/*ispublic = true;*/
QCC_PR_Expect ( " : " ) ;
continue ;
}
else if ( firstkeyword & & QCC_PR_CheckKeyword ( 1 , " private " ) )
{
QCC_PR_Expect ( " : " ) ;
/*isprivate = true; */
continue ;
}
else if ( firstkeyword & & QCC_PR_CheckKeyword ( 1 , " protected " ) )
{
QCC_PR_Expect ( " : " ) ;
/*isprotected = true;*/ QCC_PR_Expect ( " : " ) ;
continue ;
}
2013-08-21 06:55:54 +00:00
else
break ;
2023-01-09 05:13:12 +00:00
firstkeyword = false ;
2015-06-12 14:44:50 +00:00
}
2021-07-03 23:33:52 +00:00
if ( isget | | isset )
{
2023-01-09 05:13:12 +00:00
if ( wasvirt )
2021-07-03 23:33:52 +00:00
QCC_PR_ParseWarning ( ERR_INTERNAL , " virtual accessors are not supported at this time " ) ;
2023-01-09 05:13:12 +00:00
if ( wasstatic )
2021-07-03 23:33:52 +00:00
QCC_PR_ParseError ( ERR_INTERNAL , " static accessors are not supported " ) ;
QCC_PR_ParseAccessorMember ( newt , isinline , isset ) ;
QCC_PR_CheckToken ( " ; " ) ;
continue ;
}
2023-01-09 05:13:12 +00:00
basetype = QCC_PR_ParseType ( false , false ) ;
2004-08-23 01:38:21 +00:00
2023-01-09 05:13:12 +00:00
if ( ! basetype )
2013-06-11 02:06:06 +00:00
QCC_PR_ParseError ( ERR_INTERNAL , " In class %s, expected type, found %s " , classname , pr_token ) ;
2023-01-09 05:13:12 +00:00
if ( basetype - > type = = ev_struct | | basetype - > type = = ev_union ) //we wouldn't be able to handle it.
2004-08-23 01:38:21 +00:00
QCC_PR_ParseError ( ERR_INTERNAL , " Struct or union in class %s " , classname ) ;
2013-06-02 06:03:54 +00:00
2023-01-09 05:13:12 +00:00
for ( ; basetype ; )
2013-08-21 06:55:54 +00:00
{
2023-01-09 05:13:12 +00:00
pbool havebody = false ;
pbool isnull = false ;
pbool isstatic = wasstatic ;
pbool isvirt = wasvirt ;
pbool isnonvirt = wasnonvirt ;
if ( flag_qcfuncs & & basetype - > type = = ev_function & & basetype - > aux_type = = newt & & QCC_PR_PeekToken ( " ; " ) )
{ //C++ style constructor (ie: missing return type followed by class name)
//swap the class out for the appropriate function type...
newparm = QCC_PR_GenFunctionType ( type_void , basetype - > params , basetype - > num_parms ) ;
parmname = classname ;
2013-12-02 14:30:30 +00:00
}
2023-01-09 05:13:12 +00:00
else if ( ! flag_qcfuncs & & basetype = = newt & & QCC_PR_CheckToken ( " ( " ) )
2013-08-21 06:55:54 +00:00
{
2023-01-09 05:13:12 +00:00
newparm = QCC_PR_ParseFunctionType ( false , type_void ) ;
parmname = classname ;
2013-08-21 06:55:54 +00:00
}
2023-01-09 05:13:12 +00:00
else
2013-08-21 06:55:54 +00:00
{
2023-01-09 05:13:12 +00:00
parmname = QCC_PR_ParseName ( ) ;
if ( QCC_PR_CheckToken ( " [ " ) )
{
arraysize = QCC_PR_IntConstExpr ( ) ;
QCC_PR_Expect ( " ] " ) ;
}
2015-06-12 14:44:50 +00:00
else
2023-01-09 05:13:12 +00:00
arraysize = 0 ;
if ( QCC_PR_CheckToken ( " ( " ) )
2021-07-17 15:09:44 +00:00
{
2023-01-09 05:13:12 +00:00
//int fnc(), fld; is valid.
newparm = QCC_PR_ParseFunctionType ( false , basetype ) ;
2021-07-17 15:09:44 +00:00
}
2023-01-09 05:13:12 +00:00
else
newparm = basetype ;
2013-08-21 06:55:54 +00:00
}
2013-06-02 06:03:54 +00:00
2023-01-09 05:13:12 +00:00
if ( newparm - > type = = ev_function )
2014-04-24 01:53:01 +00:00
{
2023-01-09 05:13:12 +00:00
if ( ! strcmp ( classname , parmname ) )
2015-06-04 06:15:14 +00:00
{
2023-01-09 05:13:12 +00:00
if ( isstatic )
QCC_PR_ParseWarning ( WARN_MISSINGMEMBERQUALIFIER , " Constructor %s::%s should not be static. " , classname , pr_token ) ;
if ( ! isvirt )
isnonvirt = true ; //silently promote constructors to static
if ( newparm - > aux_type - > type ! = ev_void )
QCC_PR_ParseWarning ( WARN_MISSINGMEMBERQUALIFIER , " Constructor %s::%s does not return void. " , classname , pr_token ) ;
if ( newparm - > num_parms ! = 0 | | newparm - > vargs )
QCC_PR_ParseWarning ( WARN_MISSINGMEMBERQUALIFIER , " Constructor arguments are not supported at this time %s::%s. Use named fields instead. " , classname , pr_token ) ;
}
else if ( ! isvirt & & ! isnonvirt & & ! isstatic )
{
if ( assumevirtual = = 1 )
isvirt = true ;
else if ( assumevirtual = = - 1 )
isnonvirt = true ;
else
{
QCC_PR_ParseWarning ( WARN_MISSINGMEMBERQUALIFIER , " %s::%s was not qualified. Assuming non-virtual. " , classname , parmname ) ;
isnonvirt = true ;
}
}
else if ( isvirt + isnonvirt + isstatic ! = 1 )
QCC_PR_ParseError ( ERR_INTERNAL , " Multiple conflicting qualifiers on %s::%s. " , classname , pr_token ) ;
if ( isstatic )
{ //static and non-virtual functions differ only in that static should not have a 'this' available. however there's no hiding 'self' for calling in to other functions.
isstatic = false ;
isnonvirt = true ;
// QCC_PR_ParseError(ERR_INTERNAL, "%s::%s static member functions are not supported at this time.", classname, parmname);
2015-06-04 06:15:14 +00:00
}
2014-04-24 01:53:01 +00:00
}
2013-06-02 06:03:54 +00:00
else
2004-08-23 01:38:21 +00:00
{
2023-01-09 05:13:12 +00:00
if ( isvirt | | isnonvirt )
QCC_Error ( ERR_INTERNAL , " virtual keyword on member that is not a function " ) ;
if ( isinline )
QCC_Error ( ERR_INTERNAL , " inline keyword on member that is not a function " ) ;
}
if ( QCC_PR_CheckToken ( " = " ) )
havebody = true ;
else if ( newparm - > type = = ev_function & & QCC_PR_PeekToken ( " { " ) )
havebody = true ;
if ( isinline & & ( ! havebody | | isvirt ) )
QCC_Error ( ERR_INTERNAL , " inline keyword on function prototype or virtual function " ) ;
gdf_flags = 0 ;
if ( ( newparm - > type = = ev_function & & ! arraysize & & ! isvar ) | | isconst )
gdf_flags = GDF_CONST ;
2013-06-02 06:03:54 +00:00
2023-01-09 05:13:12 +00:00
if ( havebody )
{
QCC_def_t * def ;
if ( pr_scope )
QCC_Error ( ERR_INTERNAL , " Nested function declaration " ) ;
isnull = ( QCC_PR_CheckImmediate ( " 0 " ) | | QCC_PR_CheckImmediate ( " 0i " ) ) ;
QC_snprintfz ( membername , sizeof ( membername ) , " %s::%s " , classname , parmname ) ;
if ( isnull )
{
if ( isignored )
def = NULL ;
else
{
def = QCC_PR_GetDef ( newparm , membername , NULL , true , 0 , gdf_flags ) ;
def - > symboldata [ def - > ofs ] . function = 0 ;
def - > initialized = 1 ;
}
}
2014-04-24 01:53:01 +00:00
else
2013-06-13 22:45:15 +00:00
{
2023-01-09 05:13:12 +00:00
if ( isignored )
def = NULL ;
else
def = QCC_PR_GetDef ( newparm , membername , NULL , true , 0 , gdf_flags ) ;
if ( newparm - > type ! = ev_function & & ! isstatic )
QCC_Error ( ERR_INTERNAL , " Can only initialise member functions " ) ;
else
2013-06-13 22:45:15 +00:00
{
2023-01-09 05:13:12 +00:00
if ( autoprototype | | isignored )
2015-06-12 14:44:50 +00:00
{
2023-01-09 05:13:12 +00:00
if ( QCC_PR_CheckToken ( " [ " ) )
2015-06-12 14:44:50 +00:00
{
2023-01-09 05:13:12 +00:00
while ( ! QCC_PR_CheckToken ( " ] " ) )
{
if ( pr_token_type = = tt_eof )
break ;
QCC_PR_Lex ( ) ;
}
2015-06-12 14:44:50 +00:00
}
2023-01-09 05:13:12 +00:00
QCC_PR_Expect ( " { " ) ;
2014-04-24 01:53:01 +00:00
{
2023-01-09 05:13:12 +00:00
int blev = 1 ;
//balance out the { and }
while ( blev )
{
if ( pr_token_type = = tt_eof )
break ;
if ( QCC_PR_CheckToken ( " { " ) )
blev + + ;
else if ( QCC_PR_CheckToken ( " } " ) )
blev - - ;
else
QCC_PR_Lex ( ) ; //ignore it.
}
2014-04-24 01:53:01 +00:00
}
2013-06-13 22:45:15 +00:00
}
2023-01-09 05:13:12 +00:00
else
{
pr_classtype = newt ;
QCC_PR_ParseInitializerDef ( def , 0 ) ;
pr_classtype = NULL ;
/*
f = QCC_PR_ParseImmediateStatements ( def , newparm ) ;
pr_classtype = NULL ;
pr_scope = NULL ;
def - > symboldata [ def - > ofs ] . function = f - functions ;
f - > def = def ;
def - > initialized = 1 ; */
}
2013-06-13 22:45:15 +00:00
}
2013-06-02 06:03:54 +00:00
}
2023-01-09 05:13:12 +00:00
if ( def )
QCC_FreeDef ( def ) ;
2013-06-11 02:06:06 +00:00
2023-01-09 05:13:12 +00:00
if ( ! isvirt & & ! isignored )
2013-06-02 06:03:54 +00:00
{
2023-01-09 05:13:12 +00:00
QCC_def_t * fdef ;
QCC_type_t * pc ;
unsigned int i ;
for ( pc = newt - > parentclass ; pc ; pc = pc - > parentclass )
2013-06-02 06:03:54 +00:00
{
2023-01-09 05:13:12 +00:00
for ( i = 0 ; i < pc - > num_parms ; i + + )
2013-06-02 06:03:54 +00:00
{
2023-01-09 05:13:12 +00:00
if ( ! strcmp ( pc - > params [ i ] . paramname , parmname ) )
{
QCC_PR_ParseWarning ( WARN_DUPLICATEDEFINITION , " %s::%s is virtual inside parent class '%s'. Did you forget the 'virtual' keyword? " , newt - > name , parmname , pc - > name ) ;
break ;
}
2013-06-02 06:03:54 +00:00
}
2023-01-09 05:13:12 +00:00
if ( i < pc - > num_parms )
break ;
2013-06-02 06:03:54 +00:00
}
2023-01-09 05:13:12 +00:00
if ( ! pc )
2016-07-12 00:40:13 +00:00
{
2023-01-09 05:13:12 +00:00
fdef = QCC_PR_GetDef ( NULL , parmname , NULL , false , 0 , GDF_CONST ) ;
if ( fdef & & fdef - > type - > type = = ev_field )
{
QCC_PR_ParseWarning ( WARN_DUPLICATEDEFINITION , " %s::%s is virtual inside parent class 'entity'. Did you forget the 'virtual' keyword? " , newt - > name , parmname ) ;
QCC_PR_ParsePrintDef ( 0 , fdef ) ;
}
else if ( fdef )
{
QCC_PR_ParseWarning ( WARN_DUPLICATEDEFINITION , " %s::%s shadows a global " , newt - > name , parmname ) ;
QCC_PR_ParsePrintDef ( 0 , fdef ) ;
}
if ( fdef )
QCC_FreeDef ( fdef ) ;
2013-06-11 02:06:06 +00:00
}
}
2004-08-23 01:38:21 +00:00
}
2023-01-09 05:13:12 +00:00
if ( ! QCC_PR_CheckToken ( " , " ) )
{
QCC_PR_Expect ( " ; " ) ;
basetype = NULL ;
}
2004-08-23 01:38:21 +00:00
2023-01-09 05:13:12 +00:00
if ( isignored ) //member doesn't really exist
2013-06-02 06:03:54 +00:00
continue ;
2004-08-23 01:38:21 +00:00
2023-01-09 05:13:12 +00:00
//static members are technically just funny-named globals, and do not generate fields.
if ( isnonvirt | | isstatic | | ( newparm - > type = = ev_function & & ! arraysize ) )
2013-09-26 14:36:52 +00:00
{
2023-01-09 05:13:12 +00:00
QC_snprintfz ( membername , sizeof ( membername ) , " %s::%s " , classname , parmname ) ;
QCC_FreeDef ( QCC_PR_GetDef ( newparm , membername , NULL , true , 0 , gdf_flags ) ) ;
if ( isnonvirt | | isstatic )
continue ;
2013-09-26 14:36:52 +00:00
}
2023-01-09 05:13:12 +00:00
fieldtype = QCC_PR_NewType ( parmname , ev_field , false ) ;
fieldtype - > aux_type = newparm ;
fieldtype - > size = newparm - > size ;
parms = realloc ( parms , sizeof ( * parms ) * ( numparms + 1 ) ) ;
parms [ numparms ] . ofs = 0 ;
parms [ numparms ] . out = false ;
parms [ numparms ] . optional = false ;
parms [ numparms ] . isvirtual = isvirt ;
parms [ numparms ] . paramname = parmname ;
parms [ numparms ] . arraysize = arraysize ;
parms [ numparms ] . type = newparm ;
parms [ numparms ] . defltvalue . cast = NULL ;
basicindex = 0 ;
found = false ;
for ( pc = newt ; pc & & ! found ; pc = pc - > parentclass )
2013-09-26 14:36:52 +00:00
{
2023-01-09 05:13:12 +00:00
struct QCC_typeparam_s * pp ;
int numpc ;
int i ;
if ( pc = = newt )
{
pp = parms ;
numpc = numparms ;
}
else
{
pp = pc - > params ;
numpc = pc - > num_parms ;
}
for ( i = 0 ; i < numpc ; i + + )
2013-06-02 06:03:54 +00:00
{
2023-01-09 05:13:12 +00:00
if ( pp [ i ] . type - > type = = newparm - > type )
2013-09-26 14:36:52 +00:00
{
2023-01-09 05:13:12 +00:00
if ( ! strcmp ( pp [ i ] . paramname , parmname ) )
2013-09-26 14:36:52 +00:00
{
2023-01-09 05:13:12 +00:00
if ( typecmp ( pp [ i ] . type , newparm ) )
{
char bufc [ 256 ] ;
char bufp [ 256 ] ;
TypeName ( pp [ i ] . type , bufp , sizeof ( bufp ) ) ;
TypeName ( newparm , bufc , sizeof ( bufc ) ) ;
QCC_PR_ParseError ( 0 , " %s defined as %s in %s, but %s in %s \n " , parmname , bufc , newt - > name , bufp , pc - > name ) ;
}
basicindex = pp [ i ] . ofs ;
found = true ;
break ;
2013-09-26 14:36:52 +00:00
}
2023-01-09 05:13:12 +00:00
if ( ( unsigned int ) basicindex < pp [ i ] . ofs + pp [ i ] . type - > size * ( pp [ i ] . arraysize ? pp [ i ] . arraysize : 1 ) ) //if we found one with the index
basicindex = pp [ i ] . ofs + pp [ i ] . type - > size * ( pp [ i ] . arraysize ? pp [ i ] . arraysize : 1 ) ; //make sure we don't union it.
2013-09-26 14:36:52 +00:00
}
2013-06-02 06:03:54 +00:00
}
}
2023-02-02 19:07:09 +00:00
/* iterate over every parent-class and see if our method already exists in conflicting nonvirtual type form */
if ( isvirt )
{
for ( pc = newt ; pc & & ! found ; pc = pc - > parentclass )
{
struct QCC_typeparam_s * pp ;
int numpc ;
int i ;
found = false ;
if ( pc = = newt )
continue ;
pp = parms ;
numpc = numparms ;
/* iterate over all of the virtual methods */
for ( i = 0 ; i < numpc ; i + + )
{
if ( pp [ i ] . type - > type = = newparm - > type )
{
/* if we found it, abandon this loop - we still have to check the other classes however */
if ( ! strcmp ( pp [ i ] . paramname , parmname ) )
{
found = true ;
break ;
}
}
}
/* we didn't find it as a field... so check if it exists as a nonvirtual method */
if ( found = = false )
{
QC_snprintfz ( membername , sizeof ( membername ) , " %s::%s " , pc - > name , parmname ) ;
/* if we found it, game over */
if ( QCC_PR_GetDef ( NULL , membername , NULL , false , 0 , 0 ) )
QCC_PR_ParseError ( 0 , " %s defined as virtual in %s, but nonvirtual in %s \n " , parmname , newt - > name , pc - > name ) ;
}
}
}
2023-01-09 05:13:12 +00:00
parms [ numparms ] . ofs = basicindex ; //ulp, its new
numparms + + ;
2013-09-26 14:36:52 +00:00
2023-01-09 05:13:12 +00:00
if ( found )
continue ;
2013-09-26 14:36:52 +00:00
2023-01-09 05:13:12 +00:00
if ( ! * basictypes [ newparm - > type ] )
QCC_PR_ParseError ( 0 , " members of type %s are not supported (%s::%s) \n " , basictypenames [ newparm - > type ] , classname , parmname ) ;
2013-09-26 14:36:52 +00:00
2023-01-09 05:13:12 +00:00
//make sure the union is okay
d = QCC_PR_GetDef ( NULL , parmname , NULL , 0 , 0 , GDF_CONST ) ;
if ( d )
basicindex = 0 ;
else
{ //don't go all weird with unioning generic fields
QC_snprintfz ( membername , sizeof ( membername ) , " ::*%s " , basictypenames [ newparm - > type ] ) ;
d = QCC_PR_GetDef ( NULL , membername , NULL , 0 , 0 , GDF_CONST ) ;
if ( ! d )
{
d = QCC_PR_GetDef ( QCC_PR_FieldType ( * basictypes [ newparm - > type ] ) , membername , NULL , 2 , 0 , GDF_CONST | GDF_POSTINIT | GDF_USED ) ;
// for (i = 0; (unsigned int)i < newparm->size*(arraysize?arraysize:1); i++)
// d->symboldata[i]._int = pr.size_fields+i;
// pr.size_fields += i;
2013-09-26 14:36:52 +00:00
2023-01-09 05:13:12 +00:00
d - > used = true ;
d - > referenced = true ; //always referenced, so you can inherit safely.
}
if ( d - > arraysize < basicindex + ( arraysize ? arraysize : 1 ) )
2018-08-04 07:05:20 +00:00
{
2023-01-09 05:13:12 +00:00
if ( d - > symboldata )
QCC_PR_ParseError ( ERR_INTERNAL , " array members are kinda limited, sorry. try rearranging them or adding padding for alignment \n " ) ; //FIXME: add relocs to cope with this all of a type can then be contiguous and thus allow arrays.
else
2018-08-04 07:05:20 +00:00
{
2023-01-09 05:13:12 +00:00
int newsize = basicindex + ( arraysize ? arraysize : 1 ) ;
if ( d - > type - > type = = ev_union | | d - > type - > type = = ev_struct )
d - > arraysize = newsize ;
else while ( d - > arraysize < newsize )
{
QC_snprintfz ( membername , sizeof ( membername ) , " ::%s[%i] " , basictypenames [ newparm - > type ] , d - > arraysize / d - > type - > size ) ;
QCC_PR_DummyDef ( d - > type , membername , d - > scope , 0 , d , d - > arraysize , true , GDF_CONST ) ;
d - > arraysize + = d - > type - > size ;
}
2018-08-04 07:05:20 +00:00
}
}
2018-07-18 13:02:03 +00:00
}
2023-01-09 05:13:12 +00:00
QCC_FreeDef ( d ) ;
2013-09-26 14:36:52 +00:00
2023-01-09 05:13:12 +00:00
//and make sure we can do member::__fname
//actually, that seems pointless.
QC_snprintfz ( membername , sizeof ( membername ) , " %s:: " MEMBERFIELDNAME , classname , parmname ) ;
// externs->Printf("define %s -> %s\n", membername, d->name);
d = QCC_PR_DummyDef ( fieldtype , membername , pr_scope , arraysize , d , basicindex , true , ( isnull ? 0 : GDF_CONST ) | ( opt_classfields ? GDF_STRIP : 0 ) ) ;
d - > referenced = true ; //always referenced, so you can inherit safely.
}
2004-08-23 01:38:21 +00:00
}
2013-06-13 22:45:15 +00:00
if ( redeclaration )
{
int i ;
redeclaration = newt - > num_parms ! = numparms ;
2004-08-23 01:38:21 +00:00
2014-02-13 23:54:57 +00:00
for ( i = 0 ; i < numparms & & ( unsigned int ) i < newt - > num_parms ; i + + )
2013-06-13 22:45:15 +00:00
{
if ( newt - > params [ i ] . arraysize ! = parms [ i ] . arraysize | | typecmp ( newt - > params [ i ] . type , parms [ i ] . type ) | | strcmp ( newt - > params [ i ] . paramname , parms [ i ] . paramname ) )
{
QCC_PR_ParseError ( ERR_REDECLARATION , " Incompatible redeclaration of class %s. %s differs. " , classname , parms [ i ] . paramname ) ;
break ;
}
}
if ( newt - > num_parms ! = numparms )
QCC_PR_ParseError ( ERR_REDECLARATION , " Incompatible redeclaration of class %s. " , classname ) ;
}
else
{
newt - > num_parms = numparms ;
newt - > params = qccHunkAlloc ( sizeof ( * type - > params ) * numparms ) ;
memcpy ( newt - > params , parms , sizeof ( * type - > params ) * numparms ) ;
}
free ( parms ) ;
2013-06-11 02:06:06 +00:00
{
QCC_def_t * d ;
//if there's a constructor, make sure the spawnfunc_ function is defined so that its available to maps.
2015-02-02 08:01:53 +00:00
QC_snprintfz ( membername , sizeof ( membername ) , " spawnfunc_%s " , classname ) ;
2013-06-11 02:06:06 +00:00
d = QCC_PR_GetDef ( type_function , membername , NULL , true , 0 , GDF_CONST ) ;
2015-04-14 12:24:05 +00:00
d - > funccalled = true ;
d - > referenced = true ;
QCC_FreeDef ( d ) ;
2013-06-11 02:06:06 +00:00
}
2004-08-23 01:38:21 +00:00
QCC_PR_Expect ( " ; " ) ;
return NULL ;
}
2013-06-02 06:03:54 +00:00
2018-07-14 18:50:20 +00:00
if ( QCC_PR_CheckKeyword ( keyword_enum , " enum " ) )
{
2020-09-29 07:09:01 +00:00
return QCC_PR_ParseEnum ( false ) ;
2018-07-14 18:50:20 +00:00
}
if ( QCC_PR_CheckKeyword ( keyword_enumflags , " enumflags " ) )
{
2020-09-29 07:09:01 +00:00
return QCC_PR_ParseEnum ( true ) ;
2018-07-14 18:50:20 +00:00
}
2013-06-02 06:03:54 +00:00
structtype = ev_void ;
if ( QCC_PR_CheckKeyword ( keyword_union , " union " ) )
structtype = ev_union ;
else if ( QCC_PR_CheckKeyword ( keyword_struct , " struct " ) )
2023-01-09 05:13:12 +00:00
structtype = ev_struct ; //defaults to public
// else if (QCC_PR_CheckKeyword (keyword_class, "class"))
// structtype = ev_struct; //defaults to private. no other difference.
2013-06-02 06:03:54 +00:00
if ( structtype ! = ev_void )
2004-08-23 01:38:21 +00:00
{
2018-10-11 10:31:23 +00:00
struct QCC_typeparam_s * parms = NULL , * oldparm ;
2013-06-02 06:03:54 +00:00
int numparms = 0 ;
2020-07-19 22:39:10 +00:00
int ofs ;
2013-06-13 22:45:15 +00:00
unsigned int arraysize ;
2013-06-02 06:03:54 +00:00
char * parmname ;
2020-07-15 23:50:30 +00:00
pbool isnonvirt = false ;
pbool isstatic = false ;
pbool isvirt = false ;
2023-01-09 05:13:12 +00:00
pbool definedsomething = false ;
2020-07-15 23:50:30 +00:00
2013-06-02 06:03:54 +00:00
if ( QCC_PR_CheckToken ( " { " ) )
{
//nameless struct
2013-07-26 11:36:23 +00:00
newt = QCC_PR_NewType ( structtype = = ev_union ? " <union> " : " <struct> " , structtype , false ) ;
2013-06-02 06:03:54 +00:00
}
else
{
2018-10-11 10:31:23 +00:00
QCC_type_t * parenttype ;
char * tname = QCC_PR_ParseName ( ) ;
if ( structtype = = ev_struct & & QCC_PR_CheckToken ( " : " ) )
{
char * parentname = QCC_PR_ParseName ( ) ;
parenttype = QCC_TypeForName ( parentname ) ;
if ( ! parenttype )
QCC_PR_ParseError ( ERR_NOTANAME , " Parent type %s was not yet defined " , parentname ) ;
if ( parenttype - > type ! = ev_struct )
QCC_PR_ParseError ( ERR_NOTANAME , " Parent type %s is not a struct " , parentname ) ;
}
else
parenttype = NULL ;
newt = QCC_TypeForName ( tname ) ;
2013-06-02 06:03:54 +00:00
if ( ! newt )
2018-10-11 10:31:23 +00:00
{
newt = QCC_PR_NewType ( tname , ev_struct , true ) ;
newt - > parentclass = parenttype ;
}
2018-10-23 07:09:06 +00:00
else if ( ! newt - > size & & ! newt - > parentclass )
newt - > parentclass = parenttype ;
2018-10-11 10:31:23 +00:00
else if ( parenttype & & newt - > parentclass ! = parenttype )
QCC_PR_ParseError ( ERR_NOTANAME , " Redeclaration of struct with different parent type " , tname , parenttype - > name ) ;
2013-06-02 06:03:54 +00:00
if ( newt - > size )
{
if ( QCC_PR_CheckToken ( " { " ) )
QCC_PR_ParseError ( ERR_NOTANAME , " %s %s is already defined " , structtype = = ev_union ? " union " : " struct " , newt - > name ) ;
return newt ;
}
//struct declaration only, not definition.
2018-10-11 10:31:23 +00:00
if ( parenttype )
QCC_PR_Expect ( " { " ) ;
else if ( ! QCC_PR_CheckToken ( " { " ) )
2013-06-02 06:03:54 +00:00
return newt ;
}
2018-10-11 10:31:23 +00:00
if ( newt - > parentclass )
newt - > size = newt - > parentclass - > size ;
else
newt - > size = 0 ;
2004-08-23 01:38:21 +00:00
type = NULL ;
2004-10-13 07:24:59 +00:00
newparm = NULL ;
2018-10-11 10:31:23 +00:00
for ( ; ; )
2004-08-23 01:38:21 +00:00
{
2018-10-11 10:31:23 +00:00
//in qc, functions are assignable references like anything else, so no modifiers means the qc will need to assign to it somewhere.
//virtual functions are still references, but we initialise them somewhere
//nonvirtual functions and static functions are kinda the same thing
QCC_sref_t defaultval ;
if ( QCC_PR_CheckToken ( " } " ) )
2004-08-23 01:38:21 +00:00
{
2018-10-11 10:31:23 +00:00
if ( newparm )
QCC_PR_ParseError ( ERR_EXPECTED , " missing semi-colon " ) ;
break ;
}
else if ( QCC_PR_CheckToken ( " ; " ) )
{
newparm = NULL ;
continue ;
}
else if ( QCC_PR_CheckToken ( " , " ) )
{ //same as last type, unless initial/after-semicolon
2004-08-23 01:38:21 +00:00
if ( ! newparm )
2018-10-11 10:31:23 +00:00
QCC_PR_ParseError ( ERR_EXPECTED , " element missing type " ) ;
2004-08-23 01:38:21 +00:00
}
else
2018-10-11 10:31:23 +00:00
{ //new type!
if ( newparm )
QCC_PR_ParseError ( ERR_EXPECTED , " missing semi-colon " ) ; //allow a missing semi-colon on functions, for mixed-style functions.
2004-08-23 01:38:21 +00:00
2020-07-15 23:50:30 +00:00
//reset these...
isnonvirt = false ;
isstatic = false ;
isvirt = false ;
//parse field modifiers
2018-10-11 10:31:23 +00:00
if ( QCC_PR_CheckKeyword ( 1 , " public " ) )
2023-01-09 05:13:12 +00:00
{
2018-10-11 10:31:23 +00:00
/*ispublic = true*/ ;
2023-01-09 05:13:12 +00:00
QCC_PR_Expect ( " : " ) ;
continue ;
}
2018-10-11 10:31:23 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " private " ) )
2023-01-09 05:13:12 +00:00
{
2018-10-11 10:31:23 +00:00
/*isprivate = true*/ ;
2023-01-09 05:13:12 +00:00
QCC_PR_Expect ( " : " ) ;
continue ;
}
2018-10-11 10:31:23 +00:00
else if ( QCC_PR_CheckKeyword ( 1 , " protected " ) )
2023-01-09 05:13:12 +00:00
{
2018-10-11 10:31:23 +00:00
/*isprotected = true*/ ;
2023-01-09 05:13:12 +00:00
QCC_PR_Expect ( " : " ) ;
continue ;
}
2018-10-11 10:31:23 +00:00
2023-01-09 05:13:12 +00:00
//if (QCC_PR_CheckKeyword(1, "nonvirtual"))
// isnonvirt = true;
//else
if ( QCC_PR_CheckKeyword ( 1 , " static " ) )
2018-10-11 10:31:23 +00:00
isstatic = true ;
else if ( QCC_PR_CheckKeyword ( 1 , " virtual " ) )
isvirt = true ;
// else if (QCC_PR_CheckKeyword(1, "ignore"))
// isignored = true;
// else if (QCC_PR_CheckKeyword(1, "strip"))
// isignored = true;
2020-07-15 23:50:30 +00:00
//now parse the actual type.
2018-10-11 10:31:23 +00:00
newparm = QCC_PR_ParseType ( false , false ) ;
2023-01-09 05:13:12 +00:00
definedsomething = false ;
2018-10-11 10:31:23 +00:00
}
type = newparm ;
2013-06-02 06:03:54 +00:00
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
while ( QCC_PR_CheckToken ( " * " ) )
2018-10-11 10:31:23 +00:00
type = QCC_PointerTypeTo ( type ) ;
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
2018-10-11 10:31:23 +00:00
arraysize = 0 ;
if ( QCC_PR_CheckToken ( " ; " ) )
{ //annonymous structs do weird scope stuff.
2023-01-09 05:13:12 +00:00
if ( ! definedsomething & & ( type - > type ! = ev_struct & & type - > type ! = ev_union ) )
{
if ( flag_qcfuncs & & type - > type = = ev_function & & type - > aux_type = = newt & & QCC_PR_PeekToken ( " ; " ) )
QCC_PR_ParseWarning ( WARN_POINTLESSSTATEMENT , " constructors are not supported in structs at this time " , newparm - > name ) ;
else
QCC_PR_ParseWarning ( WARN_POINTLESSSTATEMENT , " declaration does not declare anything (%s) " , newparm - > name ) ;
}
2018-10-11 10:31:23 +00:00
newparm = NULL ;
parmname = " " ;
}
else
2004-08-23 01:38:21 +00:00
{
2013-06-02 06:03:54 +00:00
parmname = qccHunkAlloc ( strlen ( pr_token ) + 1 ) ;
strcpy ( parmname , pr_token ) ;
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
2023-01-09 05:13:12 +00:00
definedsomething = true ;
2005-03-20 02:57:11 +00:00
if ( QCC_PR_CheckToken ( " [ " ) )
2004-08-23 01:38:21 +00:00
{
2013-06-02 06:03:54 +00:00
arraysize = QCC_PR_IntConstExpr ( ) ;
2013-06-13 22:45:15 +00:00
if ( ! arraysize )
QCC_PR_ParseError ( ERR_NOTANAME , " cannot cope with 0-sized arrays " ) ;
2004-08-23 01:38:21 +00:00
QCC_PR_Expect ( " ] " ) ;
}
2020-09-29 07:09:01 +00:00
while ( QCC_PR_CheckToken ( " [ " ) )
{
int nsize = QCC_PR_IntConstExpr ( ) ;
if ( ! nsize )
QCC_PR_ParseError ( ERR_NOTANAME , " cannot cope with 0-sized arrays " ) ;
QCC_PR_Expect ( " ] " ) ;
arraysize * = nsize ;
QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " multi-dimensional arrays are not supported. flattening to single array. " ) ;
}
2018-10-11 10:31:23 +00:00
if ( QCC_PR_CheckToken ( " ( " ) )
type = QCC_PR_ParseFunctionType ( false , type ) ;
2004-08-23 01:38:21 +00:00
}
2018-10-11 10:31:23 +00:00
if ( type = = newt | | ( ( type - > type = = ev_struct | | type - > type = = ev_union ) & & ! type - > size ) )
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
{
2018-10-11 10:31:23 +00:00
QCC_PR_ParseWarning ( ERR_NOTANAME , " type %s not fully defined yet " , type - > name ) ;
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
continue ;
}
2020-09-29 07:09:01 +00:00
if ( QCC_PR_CheckToken ( " : " ) )
{
QCC_PR_IntConstExpr ( ) ;
QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " bitfields are not supported " ) ;
}
2018-10-11 10:31:23 +00:00
if ( ( isnonvirt | | isvirt ) & & type - > type ! = ev_function )
QCC_PR_ParseWarning ( ERR_INTERNAL , " [non]virtual members must be functions " , type - > name ) ;
//static members are technically just funny-named globals, and do not generate fields.
if ( isnonvirt | | isstatic | | isvirt )
{ //either way its a regular global. the difference being static has no implicit this/self argument.
QCC_def_t * d ;
char membername [ 2048 ] ;
if ( ! isstatic )
type = QCC_PR_MakeThiscall ( type , newt ) ;
QC_snprintfz ( membername , sizeof ( membername ) , " %s::%s " , newt - > name , parmname ) ;
d = QCC_PR_GetDef ( type , membername , NULL , true , 0 , ( type - > type = = ev_function ) ? GDF_CONST : 0 ) ;
if ( QCC_PR_CheckToken ( " = " ) | | ( type - > type = = ev_function & & QCC_PR_PeekToken ( " { " ) ) )
2018-10-23 07:09:06 +00:00
{
//FIXME: methods cannot be compiled yet, as none of the fields are not actually defined yet.
pr_classtype = newt ;
2018-10-11 10:31:23 +00:00
QCC_PR_ParseInitializerDef ( d , 0 ) ;
2018-10-23 07:09:06 +00:00
pr_classtype = NULL ;
}
2018-10-11 10:31:23 +00:00
QCC_FreeDef ( d ) ;
if ( ! QCC_PR_PeekToken ( " , " ) )
newparm = NULL ;
if ( isvirt )
{
defaultval . ofs = 0 ;
defaultval . cast = d - > type ;
defaultval . sym = d ;
}
else
continue ;
}
else
{
defaultval . cast = NULL ;
if ( QCC_PR_CheckToken ( " = " ) )
{
defaultval = QCC_PR_ParseDefaultInitialiser ( type ) ;
2020-07-13 17:48:16 +00:00
QCC_PR_ParseWarning ( ERR_INTERNAL , " TODO: pre-initialised struct members are not implemented yet " , type - > name ) ;
2018-10-11 10:31:23 +00:00
}
}
2010-12-08 14:42:05 +00:00
2020-07-19 22:39:10 +00:00
parms = realloc ( parms , sizeof ( * parms ) * ( numparms + 4 ) ) ;
oldparm = QCC_PR_FindStructMember ( newt , parmname , & ofs ) ;
2018-10-11 10:31:23 +00:00
if ( oldparm & & oldparm - > arraysize = = arraysize & & ! typecmp_lax ( oldparm - > type , type ) )
{
if ( ! isvirt )
continue ;
}
else if ( structtype = = ev_union )
2004-08-23 01:38:21 +00:00
{
2020-07-19 22:39:10 +00:00
ofs = 0 ;
2018-10-11 10:31:23 +00:00
if ( type - > size * ( arraysize ? arraysize : 1 ) > newt - > size )
newt - > size = type - > size * ( arraysize ? arraysize : 1 ) ;
2004-08-23 01:38:21 +00:00
}
else
{
2020-07-19 22:39:10 +00:00
ofs = newt - > size ;
2018-10-11 10:31:23 +00:00
newt - > size + = type - > size * ( arraysize ? arraysize : 1 ) ;
2004-08-23 01:38:21 +00:00
}
2018-10-11 10:31:23 +00:00
2020-07-19 22:39:10 +00:00
parms [ numparms ] . ofs = ofs ;
2013-06-02 06:03:54 +00:00
parms [ numparms ] . arraysize = arraysize ;
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
parms [ numparms ] . out = false ;
2013-06-02 06:03:54 +00:00
parms [ numparms ] . optional = false ;
2018-10-11 10:31:23 +00:00
parms [ numparms ] . isvirtual = isvirt ;
2013-06-02 06:03:54 +00:00
parms [ numparms ] . paramname = parmname ;
2018-10-11 10:31:23 +00:00
parms [ numparms ] . type = type ;
parms [ numparms ] . defltvalue = defaultval ;
2013-06-02 06:03:54 +00:00
numparms + + ;
2020-07-19 22:39:10 +00:00
2020-08-03 10:34:44 +00:00
/*if (type->type == ev_vector && arraysize == 0)
2020-07-19 22:39:10 +00:00
{ //add in vec_x/y/z members too.
int c ;
for ( c = 0 ; c < 3 ; c + + )
{
parms [ numparms ] . ofs = ofs + c ;
parms [ numparms ] . arraysize = arraysize ;
parms [ numparms ] . out = false ;
parms [ numparms ] . optional = true ;
parms [ numparms ] . isvirtual = isvirt ;
2020-08-03 10:34:44 +00:00
parms [ numparms ] . paramname = qccHunkAlloc ( strlen ( parmname ) + 3 ) ;
2020-07-19 22:39:10 +00:00
sprintf ( parms [ numparms ] . paramname , " %s_%c " , parmname , ' x ' + c ) ;
parms [ numparms ] . type = type_float ;
parms [ numparms ] . defltvalue = nullsref ;
numparms + + ;
}
2020-08-03 10:34:44 +00:00
} */
2004-08-23 01:38:21 +00:00
}
2013-06-02 06:03:54 +00:00
if ( ! numparms )
QCC_PR_ParseError ( ERR_NOTANAME , " %s %s has no members " , structtype = = ev_union ? " union " : " struct " , newt - > name ) ;
newt - > num_parms = numparms ;
newt - > params = qccHunkAlloc ( sizeof ( * type - > params ) * numparms ) ;
memcpy ( newt - > params , parms , sizeof ( * type - > params ) * numparms ) ;
free ( parms ) ;
2004-08-23 01:38:21 +00:00
return newt ;
}
2013-06-02 06:03:54 +00:00
2017-10-31 22:52:58 +00:00
type = QCC_TypeForName ( name ) ;
if ( ! type )
2004-08-23 01:38:21 +00:00
{
2005-02-28 07:16:19 +00:00
if ( ! * name )
2017-08-14 16:38:44 +00:00
{
QCC_PR_ParseError ( ERR_NOTANAME , " type missing name " ) ;
2005-02-28 07:16:19 +00:00
return NULL ;
2017-08-14 16:38:44 +00:00
}
2013-06-02 06:03:54 +00:00
//some reacc types...
2017-10-31 22:52:58 +00:00
if ( flag_acc & & ! stricmp ( " Void " , name ) )
2005-02-09 19:32:30 +00:00
type = type_void ;
2017-10-31 22:52:58 +00:00
else if ( flag_acc & & ! stricmp ( " Real " , name ) )
2005-02-09 19:32:30 +00:00
type = type_float ;
2017-10-31 22:52:58 +00:00
else if ( flag_acc & & ! stricmp ( " Vector " , name ) )
2005-02-09 19:32:30 +00:00
type = type_vector ;
2017-10-31 22:52:58 +00:00
else if ( flag_acc & & ! stricmp ( " Object " , name ) )
2005-02-09 19:32:30 +00:00
type = type_entity ;
2017-10-31 22:52:58 +00:00
else if ( flag_acc & & ! stricmp ( " String " , name ) )
2005-02-09 19:32:30 +00:00
type = type_string ;
2017-10-31 22:52:58 +00:00
else if ( flag_acc & & ! stricmp ( " PFunc " , name ) )
2005-02-09 19:32:30 +00:00
type = type_function ;
else
{
2020-09-29 07:09:01 +00:00
//try and handle C's types, which have weird and obtuse combinations (like long long, long int, short int).
pbool isokay = false ;
pbool issigned = false ;
pbool isunsigned = false ;
pbool islong = false ;
pbool isfloat = false ;
int bits = 0 ;
while ( true )
{
if ( ! isunsigned & & ! issigned & & QCC_PR_CheckKeyword ( keyword_signed , " signed " ) )
issigned = isokay = true ;
else if ( ! issigned & & ! isunsigned & & QCC_PR_CheckKeyword ( keyword_unsigned , " unsigned " ) )
isunsigned = isokay = true ;
else if ( ! bits & & QCC_PR_CheckKeyword ( keyword_long , " long " ) )
{
if ( islong )
bits = 128 ;
islong = isokay = true ;
}
else if ( ( ! bits | | bits = = 16 ) & & ( QCC_PR_CheckKeyword ( keyword_int , " int " ) | | QCC_PR_CheckKeyword ( keyword_integer , " integer " ) ) )
{ //long int, short int, etc are allowed
if ( ! bits )
bits = 32 ;
isokay = true ;
}
else if ( ! bits & & QCC_PR_CheckKeyword ( keyword_short , " short " ) )
bits = 16 , isokay = true ;
else if ( ! bits & & QCC_PR_CheckKeyword ( keyword_char , " char " ) )
bits = 8 , isokay = true ;
2022-06-19 15:18:00 +00:00
else if ( ! bits & & ! issigned & & ! isunsigned & & QCC_PR_CheckKeyword ( true , " _Bool " ) ) //c99
{
if ( keyword_int )
type = type_bint ;
else
type = type_bfloat ;
goto wasctype ;
}
2020-09-29 07:09:01 +00:00
else if ( ! bits & & ! islong & & QCC_PR_CheckKeyword ( keyword_float , " float " ) )
bits = 32 , isfloat = isokay = true ;
else if ( ( ! bits | | islong ) & & QCC_PR_CheckKeyword ( keyword_double , " double " ) )
bits = islong ? 128 : 64 , islong = false , isfloat = isokay = true ;
else
break ;
}
if ( isokay )
{
if ( ! bits )
bits = islong ? 64 : 32 ; //<signed|unsigned|long> [int]
if ( isfloat )
{
if ( isunsigned )
QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " ignoring unsupported unsigned keyword, type will be signed " ) ;
if ( bits > 64 )
type = type_double , QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " long doubles are not supported, using double " ) ; //permitted
else if ( bits = = 64 )
type = type_double ;
else
type = type_float ;
}
else
{
if ( bits > 64 )
type = ( isunsigned ? type_uint64 : type_int64 ) , QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " long longs are not supported, using long " ) ; //permitted
else if ( bits = = 64 )
type = ( isunsigned ? type_uint64 : type_int64 ) ;
else if ( bits = = 16 )
type = ( isunsigned ? type_uint : type_integer ) , QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " shorts are not supported, using int " ) ; //permitted
else if ( bits = = 8 )
type = ( isunsigned ? type_uint : type_integer ) , QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " chars are not supported, using int " ) ; //permitted
else
type = ( isunsigned ? type_uint : type_integer ) ;
}
goto wasctype ;
}
2011-09-03 03:49:43 +00:00
if ( silentfail )
return NULL ;
2005-02-09 19:32:30 +00:00
QCC_PR_ParseError ( ERR_NOTATYPE , " \" %s \" is not a type " , name ) ;
type = type_float ; // shut up compiler warning
}
2004-08-23 01:38:21 +00:00
}
QCC_PR_Lex ( ) ;
2020-09-29 07:09:01 +00:00
wasctype :
2010-12-08 14:42:05 +00:00
2011-09-03 03:49:43 +00:00
while ( QCC_PR_CheckToken ( " * " ) )
2020-09-29 07:09:01 +00:00
{
if ( QCC_PR_CheckKeyword ( keyword_const , " const " ) )
QCC_PR_ParseWarning ( WARN_IGNOREDKEYWORD , " ignoring unsupported const keyword " ) ;
2011-09-03 03:49:43 +00:00
type = QCC_PointerTypeTo ( type ) ;
2020-09-29 07:09:01 +00:00
}
2011-09-03 03:49:43 +00:00
2020-09-29 07:09:01 +00:00
if ( flag_qcfuncs & & QCC_PR_CheckToken ( " ( " ) ) //this is followed by parameters. Must be a function.
2007-04-15 17:35:58 +00:00
{
type_inlinefunction = true ;
2011-09-03 03:49:43 +00:00
type = QCC_PR_ParseFunctionType ( newtype , type ) ;
2007-04-15 17:35:58 +00:00
}
2004-08-23 01:38:21 +00:00
else
{
if ( newtype )
{
2013-06-02 06:03:54 +00:00
type = QCC_PR_DuplicateType ( type , false ) ;
2004-08-23 01:38:21 +00:00
}
}
2011-09-03 03:49:43 +00:00
return type ;
2004-08-23 01:38:21 +00:00
}
2004-09-07 18:27:08 +00:00
# endif
2008-07-27 02:48:59 +00:00