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"
# ifdef QCC
# define print printf
# endif
2005-04-02 18:00:45 +00:00
# include "time.h"
2004-08-23 01:38:21 +00:00
# define MEMBERFIELDNAME "__m%s"
# define STRCMP(s1,s2) (((*s1)!=(*s2)) || strcmp(s1+1,s2+1)) //saves about 2-6 out of 120 - expansion of idea from fastqcc
2014-05-16 01:34:58 +00:00
void QCC_PR_PreProcessor_Define ( pbool append ) ;
2004-08-23 01:38:21 +00:00
pbool QCC_PR_UndefineName ( char * name ) ;
2012-11-27 03:23:19 +00:00
char * QCC_PR_CheckCompConstString ( char * def ) ;
2004-08-23 01:38:21 +00:00
CompilerConstant_t * QCC_PR_CheckCompConstDefined ( char * def ) ;
2014-05-16 01:34:58 +00:00
int QCC_PR_CheckCompConst ( void ) ;
2004-08-23 01:38:21 +00:00
pbool QCC_Include ( char * filename ) ;
char * compilingfile ;
int pr_source_line ;
char * pr_file_p ;
char * pr_line_start ; // start of current source line
int pr_bracelevel ;
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 ;
QCC_eval_t pr_immediate ;
char pr_immediate_string [ 8192 ] ;
int pr_error_count ;
2005-12-16 17:15:43 +00:00
int pr_warning_count ;
2004-08-23 01:38:21 +00:00
CompilerConstant_t * CompilerConstant ;
int numCompilerConstants ;
2008-11-09 22:29:28 +00:00
extern pbool expandedemptymacro ;
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
2013-09-26 14:36:52 +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
//(-) -> &~=
2013-09-26 14:36:52 +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
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
QCC_type_t * type_integer ; //int
QCC_type_t * type_variant ; //__variant
QCC_type_t * type_floatpointer ; //float *
QCC_type_t * type_intpointer ; //int *
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
//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 )
{
currentchunk = NULL ;
}
2008-01-27 01:14:44 +00:00
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 ;
chunk - > currentlinenumber = pr_source_line ;
2008-01-27 01:14:44 +00:00
chunk - > cnst = cnst ;
if ( cnst )
{
cnst - > inside + + ;
}
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 ;
}
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 ;
currentchunk = currentchunk - > prev ;
return true ;
}
/*
= = = = = = = = = = = = = =
PR_PrintNextLine
= = = = = = = = = = = = = =
*/
void QCC_PR_PrintNextLine ( void )
{
char * t ;
printf ( " %3i: " , pr_source_line ) ;
for ( t = pr_line_start ; * t & & * t ! = ' \n ' ; t + + )
printf ( " %c " , * t ) ;
printf ( " \n " ) ;
}
2005-08-27 05:45:45 +00:00
extern char qccmsourcedir [ ] ;
//also meant to include it.
2013-06-13 22:45:15 +00:00
void QCC_FindBestInclude ( char * newfile , char * currentfile , char * rootpath , pbool verbose )
2005-08-27 05:45:45 +00:00
{
2010-07-03 21:49:48 +00:00
char fullname [ 1024 ] ;
2006-03-23 19:22:12 +00:00
int doubledots ;
2005-08-27 05:45:45 +00:00
char * end = fullname ;
if ( ! * newfile )
return ;
2006-03-23 19:22:12 +00:00
doubledots = 0 ;
2011-05-20 04:10:46 +00:00
/*count how far up we need to go*/
2006-03-23 19:22:12 +00:00
while ( ! strncmp ( newfile , " ../ " , 3 ) | | ! strncmp ( newfile , " .. \\ " , 3 ) )
{
newfile + = 3 ;
doubledots + + ;
}
2012-11-27 03:23:19 +00:00
#if 0
2005-09-08 22:52:46 +00:00
currentfile + = strlen ( rootpath ) ; //could this be bad?
2011-05-20 04:10:46 +00:00
strcpy ( fullname , rootpath ) ;
2012-11-27 03:23:19 +00:00
2011-05-20 04:10:46 +00:00
end = fullname + strlen ( end ) ;
if ( * fullname & & end [ - 1 ] ! = ' / ' )
{
strcpy ( end , " / " ) ;
end = end + strlen ( end ) ;
}
strcpy ( end , currentfile ) ;
end = end + strlen ( end ) ;
2012-11-27 03:23:19 +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 ( currentfile )
strcpy ( fullname , currentfile ) ;
else
* fullname = 0 ;
2012-11-27 03:23:19 +00:00
end = fullname + strlen ( fullname ) ;
# endif
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 - - ;
/*stop at the slash, unless we're meant to go further*/
if ( * end = = ' / ' | | * end = = ' \\ ' )
2006-03-23 19:22:12 +00:00
{
2011-05-20 04:10:46 +00:00
if ( ! doubledots )
2006-03-23 19:22:12 +00:00
{
2011-05-20 04:10:46 +00:00
end + + ;
2006-03-23 19:22:12 +00:00
break ;
}
2011-05-20 04:10:46 +00:00
doubledots - - ;
2006-03-23 19:22:12 +00:00
}
2005-08-27 05:45:45 +00:00
}
2011-05-20 04:10:46 +00:00
2005-08-27 05:45:45 +00:00
strcpy ( end , newfile ) ;
2013-06-13 22:45:15 +00:00
if ( verbose )
{
if ( autoprototype )
printf ( " prototyping include %s \n " , fullname ) ;
else
printf ( " including %s \n " , fullname ) ;
}
2005-08-27 05:45:45 +00:00
QCC_Include ( fullname ) ;
}
2010-05-01 22:47:47 +00:00
pbool defaultnoref ;
2009-03-29 23:47:29 +00:00
pbool defaultstatic ;
2004-08-23 01:38:21 +00:00
int ForcedCRC ;
int QCC_PR_LexInteger ( void ) ;
void QCC_AddFile ( char * filename ) ;
void QCC_PR_LexString ( void ) ;
pbool QCC_PR_SimpleGetToken ( 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
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
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
}
}
2005-02-28 07:16:19 +00:00
/*
= = = = = = = = = = = = = =
QCC_PR_Precompiler
= = = = = = = = = = = = = =
Runs precompiler stage
*/
pbool QCC_PR_Precompiler ( void )
2004-08-23 01:38:21 +00:00
{
char msg [ 1024 ] ;
int ifmode ;
int a ;
static int ifs = 0 ;
int level ; //#if level
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 ) ;
------------------------------------------------------------------------
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
level = 1 ;
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
{
while ( 1 )
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
while ( * pr_file_p & & ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' ) )
2004-10-14 11:24:13 +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
if ( ! * 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_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 ' )
2004-10-14 11:24:13 +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
if ( ! strncmp ( pr_file_p , " endif " , 5 ) )
level - - ;
if ( ! strncmp ( pr_file_p , " if " , 2 ) )
level + + ;
if ( ! strncmp ( pr_file_p , " else " , 4 ) & & level = = 1 )
{
ifs + = 1 ;
2013-09-26 14:36:52 +00:00
pr_file_p + = 4 ;
QCC_PR_SkipToEndOfLine ( 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
break ;
2004-10-14 11:24:13 +00:00
}
}
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( 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
if ( level < = 0 )
break ;
pr_file_p + + ; //next line
pr_source_line + + ;
2004-10-14 11:24:13 +00:00
}
}
}
}
else if ( ! strncmp ( directive , " else " , 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
2004-10-14 11:24:13 +00:00
ifs - = 1 ;
level = 1 ;
2005-02-28 07:16:19 +00:00
2013-09-26 14:36:52 +00:00
pr_file_p = directive + 4 ;
QCC_PR_SkipToEndOfLine ( true ) ;
2004-08-23 01:38:21 +00:00
while ( 1 )
{
2004-11-04 04:19:10 +00:00
while ( * pr_file_p & & ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' ) )
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2004-11-04 04:19:10 +00:00
if ( ! * pr_file_p )
{
2005-07-28 15:52:31 +00:00
pr_source_line = originalline ;
2004-11-04 04:19:10 +00:00
QCC_PR_ParseError ( ERR_NOENDIF , " #if with no endif " ) ;
}
2004-10-14 11:24:13 +00:00
if ( * pr_file_p = = ' # ' )
2004-08-23 01:38:21 +00:00
{
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
while ( * pr_file_p = = ' ' | | * pr_file_p = = ' \t ' )
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2004-10-14 11:24:13 +00:00
if ( ! strncmp ( pr_file_p , " endif " , 5 ) )
level - - ;
if ( ! strncmp ( pr_file_p , " if " , 2 ) )
2013-03-12 22:32:25 +00:00
level + + ;
2004-10-14 11:24:13 +00:00
if ( ! strncmp ( pr_file_p , " else " , 4 ) & & level = = 1 )
{
ifs + = 1 ;
2013-09-26 14:36:52 +00:00
pr_file_p + = 4 ;
QCC_PR_SkipToEndOfLine ( true ) ;
2004-10-14 11:24:13 +00:00
break ;
2004-08-23 01:38:21 +00:00
}
}
2013-09-26 14:36:52 +00:00
QCC_PR_SkipToEndOfLine ( false ) ;
2004-08-23 01:38:21 +00:00
if ( level < = 0 )
break ;
2004-10-14 11:24:13 +00:00
pr_file_p + + ; //go off the end
2004-08-23 01:38:21 +00:00
pr_source_line + + ;
}
}
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 ;
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 ] ;
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
2014-04-24 01:53:01 +00:00
QCC_PR_ParseError ( ERR_HASHERROR , " #Error: %s \n " , 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 ;
for ( a = 0 ; a < 1023 & & pr_file_p [ a ] ! = ' \n ' & & pr_file_p [ a ] ! = ' \0 ' ; a + + )
msg [ a ] = pr_file_p [ a ] ;
msg [ a - 1 ] = ' \0 ' ;
2013-10-08 14:28:11 +00:00
QCC_PR_SkipToEndOfLine ( false ) ;
2004-08-23 01:38:21 +00:00
2014-04-24 01:53:01 +00:00
QCC_PR_ParseWarning ( WARN_PRECOMPILERMESSAGE , " #warning: %s \n " , 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 ;
2013-09-26 14:36:52 +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
2013-09-26 14:36:52 +00:00
if ( flag_msvcstyle )
printf ( " %s(%i) : #message: %s \n " , strings + s_file , pr_source_line , msg ) ;
else
printf ( " %s:%i: #message: %s \n " , strings + s_file , pr_source_line , msg ) ;
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 ;
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
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 " ) ;
strncpy ( QCC_copyright , msg , sizeof ( QCC_copyright ) - 1 ) ;
2004-08-23 01:38:21 +00:00
}
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 + + ;
}
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
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
}
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 ) ;
2014-05-16 01:34:58 +00:00
if ( QCC_PR_CheckCompConst ( ) )
{
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
2013-06-13 22:45:15 +00:00
QCC_FindBestInclude ( pr_token , compilingfile , qccmsourcedir , 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 ;
2005-04-16 16:21:27 +00:00
2013-06-13 22:45:15 +00:00
QCC_FindBestInclude ( msg , compilingfile , qccmsourcedir , false ) ;
2004-08-23 01:38:21 +00:00
2004-10-14 11:24:13 +00:00
pr_file_p + + ;
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
2004-10-14 11:24:13 +00:00
QCC_PR_LexString ( ) ;
printf ( " Including datafile: %s \n " , pr_token ) ;
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 ) )
{
extern char destfile [ 1024 ] ;
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
2004-10-14 11:24:13 +00:00
QCC_PR_LexString ( ) ;
strcpy ( destfile , pr_token ) ;
printf ( " Outputfile: %s \n " , destfile ) ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2010-12-08 14:42:05 +00:00
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 ' ;
while ( * pr_file_p ! = ' \n ' & & * pr_file_p ! = ' \0 ' ) //read on until the end of the line
2004-08-23 01:38:21 +00:00
{
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
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 ;
continue ;
}
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 " ) )
{
while ( * pr_file_p )
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 + + ;
if ( * pr_file_p = = ' \n ' )
{
pr_file_p + + ;
2008-11-09 22:29:28 +00:00
QCC_PR_NewLine ( false ) ;
2004-10-14 11:24:13 +00:00
}
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
{
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 " ) ;
strncpy ( QCC_copyright , msg , sizeof ( QCC_copyright ) - 1 ) ;
}
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 ) ;
}
2013-06-13 22:45:15 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " noref " ) )
2010-05-01 22:47:47 +00:00
{
2013-06-13 22:45:15 +00:00
defaultnoref = ! ! atoi ( msg ) ;
2010-05-01 22:47:47 +00:00
}
2013-06-13 22:45:15 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " defaultstatic " ) )
2009-03-29 23:47:29 +00:00
{
2013-06-13 22:45:15 +00:00
defaultstatic = ! ! atoi ( msg ) ;
2009-03-29 23:47:29 +00:00
}
2013-06-13 22:45:15 +00:00
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 ( qcc_nopragmaoptimise )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " pragma %s %s: overriden by commandline " , qcc_token , msg ) ;
else if ( * msg > = ' 0 ' & & * msg < = ' 3 ' )
{
int lev = atoi ( msg ) ;
for ( o = 0 ; optimisations [ o ] . enabled ; o + + )
{
if ( optimisations [ o ] . optimisationlevel < = lev )
* optimisations [ o ] . enabled = true ;
}
}
else
{
if ( ! strnicmp ( msg , " no- " , 3 ) )
{
for ( o = 0 ; optimisations [ o ] . enabled ; o + + )
{
if ( ( * optimisations [ o ] . abbrev & & ! stricmp ( msg + 3 , optimisations [ o ] . abbrev ) ) | | ! stricmp ( msg + 3 , optimisations [ o ] . fullname ) )
{
* optimisations [ o ] . enabled = false ;
break ;
}
}
}
else
{
for ( o = 0 ; optimisations [ o ] . enabled ; o + + )
if ( ( * optimisations [ o ] . abbrev & & ! stricmp ( msg , optimisations [ o ] . abbrev ) ) | | ! stricmp ( msg , optimisations [ o ] . fullname ) )
{
* optimisations [ o ] . enabled = true ;
break ;
}
}
if ( ! optimisations [ o ] . enabled )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " pragma %s: %s unsupported " , qcc_token , msg ) ;
}
}
else if ( ! QC_strcasecmp ( qcc_token , " sourcefile " ) )
2008-11-09 22:29:28 +00:00
{
# define MAXSOURCEFILESLIST 8
extern char sourcefileslist [ MAXSOURCEFILESLIST ] [ 1024 ] ;
2011-05-15 13:23:13 +00:00
//extern int currentsourcefile; // warning: unused variable <20> currentsourcefile<6C>
2008-11-09 22:29:28 +00:00
extern int numsourcefiles ;
int i ;
QCC_COM_Parse ( msg ) ;
for ( i = 0 ; i < numsourcefiles ; i + + )
{
if ( ! strcmp ( sourcefileslist [ i ] , qcc_token ) )
break ;
}
2011-10-03 02:45:44 +00:00
if ( i = = numsourcefiles & & numsourcefiles < MAXSOURCEFILESLIST )
2008-11-09 22:29:28 +00:00
strcpy ( sourcefileslist [ numsourcefiles + + ] , qcc_token ) ;
}
2004-10-14 11:24:13 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " TARGET " ) )
{
------------------------------------------------------------------------
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
int newtype = qcc_targetformat ;
2013-12-07 00:24:06 +00:00
QCC_COM_Parse ( msg ) ;
if ( ! QC_strcasecmp ( qcc_token , " H2 " ) | | ! QC_strcasecmp ( qcc_token , " HEXEN2 " ) )
------------------------------------------------------------------------
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
newtype = QCF_HEXEN2 ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " KK7 " ) )
------------------------------------------------------------------------
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
newtype = QCF_KK7 ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " DP " ) | | ! QC_strcasecmp ( qcc_token , " DARKPLACES " ) )
------------------------------------------------------------------------
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
newtype = QCF_DARKPLACES ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " FTEDEBUG " ) )
------------------------------------------------------------------------
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
newtype = QCF_FTEDEBUG ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " FTE " ) )
------------------------------------------------------------------------
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
newtype = QCF_FTE ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " FTEH2 " ) )
------------------------------------------------------------------------
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
newtype = QCF_FTEH2 ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " STANDARD " ) | | ! QC_strcasecmp ( qcc_token , " ID " ) )
------------------------------------------------------------------------
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
newtype = QCF_STANDARD ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " DEBUG " ) )
------------------------------------------------------------------------
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
newtype = QCF_FTEDEBUG ;
2013-12-07 00:24:06 +00:00
else if ( ! QC_strcasecmp ( qcc_token , " QTEST " ) )
------------------------------------------------------------------------
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
newtype = QCF_QTEST ;
2004-08-23 01:38:21 +00:00
else
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 ) ;
------------------------------------------------------------------------
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 ( numstatements > 1 )
{
if ( ( qcc_targetformat = = QCF_HEXEN2 | | qcc_targetformat = = QCF_FTEH2 ) & & ( newtype ! = QCF_HEXEN2 & & newtype ! = QCF_FTEH2 ) )
2014-05-16 01:34:58 +00:00
QCC_PR_ParseWarning ( WARN_BADTARGET , " Cannot switch from hexen2 target \' %s \' after the first statement. Ignored. " , msg ) ;
------------------------------------------------------------------------
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 ( ( newtype = = QCF_HEXEN2 | | newtype = = QCF_FTEH2 ) & & ( qcc_targetformat ! = QCF_HEXEN2 & & qcc_targetformat ! = QCF_FTEH2 ) )
2014-05-16 01:34:58 +00:00
QCC_PR_ParseWarning ( WARN_BADTARGET , " Cannot switch to hexen2 target \' %s \' after the first statement. Ignored. " , msg ) ;
------------------------------------------------------------------------
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_targetformat = newtype ;
2004-10-14 11:24:13 +00:00
}
else if ( ! QC_strcasecmp ( qcc_token , " PROGS_SRC " ) )
{ //doesn't make sence, 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.
extern char destfile [ 1024 ] ;
2013-06-13 22:45:15 +00:00
char olddest [ 1024 ] ;
2006-04-02 23:47:27 +00:00
# ifndef QCCONLY
extern char qccmfilename [ 1024 ] ;
int p ;
char * s , * s2 ;
# endif
2013-06-13 22:45:15 +00:00
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
# ifndef QCCONLY
p = 0 ;
2010-12-08 14:42:05 +00:00
s2 = qcc_token ;
2006-04-02 23:47:27 +00:00
if ( ! strncmp ( s2 , " ./ " , 2 ) )
s2 + = 2 ;
else
{
while ( ! strncmp ( s2 , " ../ " , 3 ) )
{
s2 + = 3 ;
p + + ;
}
}
strcpy ( qccmfilename , qccmsourcedir ) ;
for ( s = qccmfilename + strlen ( qccmfilename ) ; p & & s > = qccmfilename ; s - - )
{
if ( * s = = ' / ' | | * s = = ' \\ ' )
{
* ( s + 1 ) = ' \0 ' ;
p - - ;
}
}
sprintf ( destfile , " %s " , s2 ) ;
while ( p > 0 )
{
memmove ( destfile + 3 , destfile , strlen ( destfile ) + 1 ) ;
destfile [ 0 ] = ' . ' ;
destfile [ 1 ] = ' . ' ;
destfile [ 2 ] = ' / ' ;
p - - ;
}
# else
2004-10-14 11:24:13 +00:00
strcpy ( destfile , qcc_token ) ;
2006-04-02 23:47:27 +00:00
# endif
2013-06-13 22:45:15 +00:00
if ( strcmp ( destfile , olddest ) )
printf ( " Outputfile: %s \n " , destfile ) ;
2004-10-14 11:24:13 +00:00
}
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 ;
}
if ( st < 0 )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " warning id not recognised " ) ;
else
{
int f ;
s = QCC_COM_Parse ( s ) ;
for ( f = 0 ; compiler_flag [ f ] . enabled ; f + + )
{
if ( ! QC_strcasecmp ( compiler_flag [ f ] . abbrev , qcc_token ) )
{
if ( compiler_flag [ f ] . flags & FLAG_MIDCOMPILE )
* compiler_flag [ f ] . enabled = st ;
else
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " Cannot enable/disable keyword/flag via a pragma " ) ;
break ;
}
}
if ( ! compiler_flag [ f ] . enabled )
2013-09-26 14:36:52 +00:00
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 ;
s = QCC_COM_Parse ( s ) ;
wn = QCC_WarningForName ( qcc_token ) ;
if ( wn < 0 )
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " warning id not recognised " ) ;
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 ( st = = 3 ) //toggle
qccwarningaction [ wn ] = ! ! qccwarningaction [ wn ] ;
2004-11-13 17:18:34 +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
qccwarningaction [ wn ] = st ;
2004-11-13 17:18:34 +00:00
}
}
2004-08-23 01:38:21 +00:00
}
else
2004-10-14 11:24:13 +00:00
QCC_PR_ParseWarning ( WARN_BADPRAGMA , " Unknown pragma \' %s \' " , qcc_token ) ;
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
= = = = = = = = = = = = = =
*/
#if 0
void QCC_PR_LexString ( void )
{
int c ;
int len ;
char tmpbuf [ 2048 ] ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
char * text ;
char * oldf ;
int oldline ;
bool fromfile = true ;
len = 0 ;
text = pr_file_p ;
do
{
QCC_COM_Parse ( text ) ;
// print("Next token is \"%s\"\n", com_token);
if ( * text = = ' \" ' )
{
text + + ;
if ( fromfile ) pr_file_p + + ;
}
do
{
c = * text + + ;
if ( fromfile ) pr_file_p + + ;
if ( ! c )
QCC_PR_ParseError ( " EOF inside quote " ) ;
if ( c = = ' \n ' )
QCC_PR_ParseError ( " newline inside quote " ) ;
if ( c = = ' \\ ' )
{ // escape char
c = * text + + ;
if ( fromfile ) pr_file_p + + ;
if ( ! c )
QCC_PR_ParseError ( " EOF inside quote " ) ;
if ( c = = ' n ' )
c = ' \n ' ;
else if ( c = = ' " ' )
c = ' " ' ;
else if ( c = = ' \\ ' )
c = ' \\ ' ;
else
QCC_PR_ParseError ( " Unknown escape char " ) ;
}
else if ( c = = ' \" ' )
{
if ( fromfile ) pr_file_p + + ;
break ;
}
tmpbuf [ len ] = c ;
len + + ;
} while ( 1 ) ;
tmpbuf [ len ] = 0 ;
// if (fromfile) pr_file_p++;
pr_immediate_type = NULL ;
oldline = pr_source_line ;
oldf = pr_file_p ;
QCC_PR_Lex ( ) ;
if ( pr_immediate_type = = & type_string )
{
// print("Appending \"%s\" to \"%s\"\n", pr_immediate_string, tmpbuf);
strcat ( tmpbuf , pr_immediate_string ) ;
len + = strlen ( pr_immediate_string ) ;
}
else
{
pr_source_line = oldline ;
pr_file_p = oldf - 1 ;
QCC_PR_LexWhitespace ( ) ;
if ( * pr_file_p ! = ' \" ' ) //annother string
2010-12-08 14:42:05 +00:00
break ;
2004-08-23 01:38:21 +00:00
}
QCC_PR_LexWhitespace ( ) ;
2010-12-08 14:42:05 +00:00
text = pr_file_p ;
2004-08-23 01:38:21 +00:00
} while ( 1 ) ;
strcpy ( pr_token , tmpbuf ) ;
pr_token_type = tt_immediate ;
pr_immediate_type = & type_string ;
strcpy ( pr_immediate_string , pr_token ) ;
// print("Found \"%s\"\n", pr_immediate_string);
}
# else
void QCC_PR_LexString ( void )
{
int c ;
2014-02-07 08:38:40 +00:00
int len = 0 ;
2004-08-23 01:38:21 +00:00
char * end , * cnst ;
2014-01-15 02:13:58 +00:00
int raw ;
char rawdelim [ 64 ] ;
2014-05-21 06:21:09 +00:00
int code ;
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
2014-01-15 02:13:58 +00:00
QCC_PR_LexWhitespace ( 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
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 + + ;
}
2014-01-15 02:13:58 +00:00
}
else if ( * pr_file_p = = ' \" ' )
pr_file_p + + ;
else if ( first )
QCC_PR_ParseError ( ERR_BADCHARACTERCODE , " Expected string constant " ) ;
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-05-21 06:21:09 +00:00
if ( ! qccwarningaction [ WARN_NOTUTF8 ] & & c < 0 & & utf8_check ( & pr_token [ c - 1 ] , & code ) )
{
//convert 0xe000 private-use area to quake's charset (if they don't have the utf-8 warning enabled)
//note: this may have a small false-positive risk.
if ( code > = 0xe000 & & code < = 0xe0ff )
pr_file_p + = utf8_check ( & pr_token [ c - 1 ] , & code ) - 1 ;
}
2014-02-07 08:38:40 +00:00
/* //these two conditions are generally part of the C preprocessor.
2014-01-15 02:13:58 +00:00
if ( c = = ' \\ ' & & * pr_file_p = = ' \r ' & & pr_file_p [ 1 ] = = ' \n ' )
{ //dos format
pr_file_p + = 2 ;
2004-08-23 01:38:21 +00:00
pr_source_line + + ;
2014-01-15 02:13:58 +00:00
continue ;
2004-08-23 01:38:21 +00:00
}
2014-01-15 02:13:58 +00:00
if ( c = = ' \\ ' & & ( * pr_file_p = = ' \r ' | | pr_file_p [ 1 ] = = ' \n ' ) )
{ //mac + unix format
pr_file_p + = 1 ;
2004-08-23 01:38:21 +00:00
pr_source_line + + ;
2004-09-21 03:22:55 +00:00
continue ;
}
2014-02-07 08:38:40 +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 ;
}
//make sure line numbers are correct
if ( c = = ' \r ' & & * pr_file_p ! = ' \n ' )
pr_source_line + + ; //mac
if ( c = = ' \n ' ) //dos/unix
pr_source_line + + ;
}
else
{
if ( c = = ' \n ' )
QCC_PR_ParseError ( ERR_INVALIDSTRINGIMMEDIATE , " newline inside quote " ) ;
if ( c = = ' \\ ' )
{ // escape char
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 = = ' " ' )
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 ' )
2013-03-12 22:32:25 +00:00
{
2014-01-15 02:13:58 +00:00
texttype ^ = 128 ;
continue ;
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
//else if (c == 'b')
// c = '\b';
else if ( c = = ' [ ' )
c = 16 ; //quake specific
else if ( c = = ' ] ' )
c = 17 ; //quake specific
else if ( c = = ' { ' )
2013-03-12 22:32:25 +00:00
{
2014-01-15 02:13:58 +00:00
int d ;
c = 0 ;
while ( ( d = * pr_file_p + + ) ! = ' } ' )
2013-03-12 22:32:25 +00:00
{
2014-01-15 02:13:58 +00:00
c = c * 10 + d - ' 0 ' ;
if ( d < ' 0 ' | | d > ' 9 ' | | c > 255 )
QCC_PR_ParseError ( ERR_BADCHARACTERCODE , " Bad character code " ) ;
}
}
else if ( c = = ' . ' )
c = 0x1c | texttype ;
else if ( c = = ' < ' )
c = 29 ;
else if ( c = = ' - ' )
c = 30 ;
else if ( c = = ' > ' )
c = 31 ;
else if ( c = = ' u ' | | c = = ' U ' )
{
//lower case u specifies exactly 4 nibbles.
//upper case U specifies variable length. terminate with a double-doublequote pair, or some other non-hex char.
int count = 0 ;
unsigned long d ;
unsigned long unicode ;
unicode = 0 ;
for ( ; ; )
{
d = ( unsigned char ) * pr_file_p ;
if ( d > = ' 0 ' & & d < = ' 9 ' )
unicode = ( unicode * 16 ) + ( d - ' 0 ' ) ;
else if ( d > = ' A ' & & d < = ' F ' )
unicode = ( unicode * 16 ) + ( d - ' A ' ) + 10 ;
else if ( d > = ' a ' & & d < = ' f ' )
unicode = ( unicode * 16 ) + ( d - ' a ' ) + 10 ;
else
break ;
count + + ;
pr_file_p + + ;
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
if ( ! count | | ( ( c = = ' u ' ) ? ( count ! = 4 ) : ( count > 8 ) ) | | unicode > 0x10FFFFu ) //RFC 3629 imposes the same limit as UTF-16 surrogate pairs.
QCC_PR_ParseWarning ( ERR_BADCHARACTERCODE , " Bad unicode character code " ) ;
//figure out the count of bytes required to encode this char
count = 1 ;
d = 0x7f ;
while ( unicode > d )
{
count + + ;
d = ( d < < 5 ) | 0x1f ;
}
//error if needed
if ( len + count > = sizeof ( pr_token ) )
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %i " , sizeof ( pr_token ) - 1 ) ;
//output it.
if ( count = = 1 )
pr_token [ len + + ] = ( unsigned char ) ( c & 0x7f ) ;
2013-03-12 22:32:25 +00:00
else
2014-01-15 02:13:58 +00:00
{
c = count * 6 ;
pr_token [ len + + ] = ( unsigned char ) ( ( unicode > > c ) & ( 0x0000007f > > count ) ) | ( 0xffffff00 > > count ) ;
do
{
c = c - 6 ;
pr_token [ len + + ] = ( unsigned char ) ( ( unicode > > c ) & 0x3f ) | 0x80 ;
}
while ( c ) ;
}
continue ;
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
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 = 18 + 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 ) ;
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
else if ( c = = ' \" ' )
{
break ;
}
else if ( c = = ' # ' )
{
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 )
cnst = NULL ;
* end = c ;
c = ' # ' ; //undo
if ( cnst )
{
QCC_PR_ParseWarning ( WARN_MACROINSTRING , " Macro expansion in string " ) ;
if ( len + strlen ( cnst ) > = sizeof ( pr_token ) - 1 )
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %i " , sizeof ( pr_token ) - 1 ) ;
strcpy ( pr_token + len , cnst ) ;
len + = strlen ( cnst ) ;
pr_file_p = end ;
continue ;
}
}
else if ( c = = 0x7C & & flag_acc ) //reacc support... reacc is strange.
c = ' \n ' ;
else
c | = texttype ;
2013-03-12 22:32:25 +00:00
}
2014-01-15 02:13:58 +00:00
if ( len > = sizeof ( pr_token ) - 1 )
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %i " , sizeof ( pr_token ) - 1 ) ;
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 )
QCC_Error ( ERR_INVALIDSTRINGIMMEDIATE , " String length exceeds %i " , sizeof ( pr_immediate_string ) - 1 ) ;
pr_token [ len ] = 0 ;
pr_token_type = tt_immediate ;
pr_immediate_type = type_string ;
strcpy ( pr_immediate_string , pr_token ) ;
if ( qccwarningaction [ WARN_NOTUTF8 ] )
{
for ( c = 0 ; pr_token [ c ] ; c + + )
2004-08-23 01:38:21 +00:00
{
2014-05-21 06:21:09 +00:00
len = utf8_check ( & pr_token [ c ] , & code ) ;
if ( ! len )
2004-08-23 01:38:21 +00:00
{
2014-05-21 06:21:09 +00:00
QCC_PR_ParseWarning ( WARN_NOTUTF8 , " String constant is not valid utf-8 " ) ;
break ;
2004-08-23 01:38:21 +00:00
}
}
2014-01-15 02:13:58 +00:00
}
2004-08-23 01:38:21 +00:00
}
# endif
/*
= = = = = = = = = = = = = =
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 ;
if ( pr_file_p [ 0 ] = = ' 0 ' & & pr_file_p [ 1 ] = = ' x ' )
{
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 ) ;
}
void QCC_PR_LexNumber ( void )
{
2009-08-29 16:53:22 +00:00
int tokenlen = 0 ;
2004-08-23 01:38:21 +00:00
int 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
}
2009-08-29 16:53:22 +00:00
if ( pr_file_p [ 0 ] = = ' 0 ' & & 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
}
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
{
2004-08-23 01:38:21 +00:00
if ( c > = ' 0 ' & & c < = ' 9 ' )
{
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 ' ;
}
2009-08-29 17:24:20 +00:00
else if ( c > = ' a ' & & c < = ' f ' & & 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 ;
}
2009-08-29 17:24:20 +00:00
else if ( c > = ' A ' & & c < = ' F ' & & 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 + + ;
pr_immediate_type = type_float ;
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
}
2009-08-29 17:24:20 +00:00
else if ( c = = ' f ' )
{
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 ;
2009-11-04 21:16:50 +00:00
pr_immediate . _float = ( float ) atof ( pr_token ) ;
2004-08-23 01:38:21 +00:00
return ;
}
2012-01-17 07:57:46 +00:00
else if ( c = = ' f ' )
{
pr_token [ tokenlen + + ] = c ;
pr_token [ tokenlen + + ] = 0 ;
pr_file_p + + ;
pr_immediate_type = type_float ;
pr_immediate . _float = num * sign ;
return ;
}
2004-08-23 01:38:21 +00:00
else if ( c = = ' i ' )
{
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 + + ;
pr_immediate_type = type_integer ;
pr_immediate . _int = num * sign ;
return ;
}
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 )
{
if ( flag_assume_integer )
pr_immediate_type = type_integer ;
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 ;
pr_immediate . _int = num * sign ;
}
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 ) ;
2009-08-29 14:56:42 +00:00
}
2004-08-23 01:38:21 +00:00
}
float QCC_PR_LexFloat ( 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 ;
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
= = = = = = = = = = = = = =
*/
void QCC_PR_LexVector ( void )
{
int i ;
2010-12-08 14:42:05 +00:00
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
if ( * pr_file_p = = ' \\ ' )
2008-01-28 13:27:30 +00:00
{ //extended character constant
2004-08-23 01:38:21 +00:00
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
pr_file_p + + ;
switch ( * pr_file_p )
{
case ' n ' :
pr_immediate . _float = ' \n ' ;
break ;
case ' r ' :
pr_immediate . _float = ' \r ' ;
break ;
case ' t ' :
pr_immediate . _float = ' \t ' ;
break ;
case ' \' ' :
pr_immediate . _float = ' \' ' ;
break ;
case ' \" ' :
pr_immediate . _float = ' \" ' ;
break ;
case ' \\ ' :
pr_immediate . _float = ' \\ ' ;
break ;
default :
2008-01-28 13:27:30 +00:00
QCC_PR_ParseError ( ERR_INVALIDVECTORIMMEDIATE , " Bad character constant " ) ;
2004-08-23 01:38:21 +00:00
}
2012-01-24 04:24:14 +00:00
pr_file_p + + ;
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 ;
}
if ( pr_file_p [ 1 ] = = ' \' ' )
{ //character constant
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
pr_immediate . _float = pr_file_p [ 0 ] ;
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 )
QCC_PR_ParseWarning ( WARN_FTE_SPECIFIC , " Bad vector " ) ;
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
= = = = = = = = = = = = = =
*/
void QCC_PR_LexName ( void )
{
int c ;
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 = = ' _ '
2014-05-21 06:21:09 +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
= = = = = = = = = = = = = =
*/
void QCC_PR_LexPunctuation ( void )
{
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
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
2014-05-21 06:21:09 +00:00
if ( ( unsigned char ) * pr_file_p = = ( unsigned char ) 0xa0 )
QCC_PR_ParseWarning ( ERR_UNKNOWNPUCTUATION , " Unknown 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 + + ;
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
{
if ( c = = ' \n ' )
{
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 ] = = ' / ' )
{
while ( * pr_file_p & & * pr_file_p ! = ' \n ' )
pr_file_p + + ;
2008-11-09 22:29:28 +00:00
if ( * pr_file_p = = ' \n ' )
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 + + ;
2004-08-23 01:38:21 +00:00
if ( pr_file_p [ 0 ] = = ' \n ' )
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 ;
}
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 ] ;
2008-01-16 03:43:53 +00:00
char pr_framemacros [ MAX_FRAMES ] [ 64 ] ;
2004-08-23 01:38:21 +00:00
int pr_framemacrovalue [ MAX_FRAMES ] ;
2004-11-15 13:03:32 +00:00
int pr_nummacros , pr_oldmacros ;
2004-08-23 01:38:21 +00:00
int pr_macrovalue ;
int pr_savedmacro ;
------------------------------------------------------------------------
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-11-15 13:03:32 +00:00
pr_oldmacros = pr_nummacros ;
2004-08-23 01:38:21 +00:00
pr_macrovalue = 0 ;
pr_savedmacro = - 1 ;
}
2005-02-28 07:16:19 +00:00
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
{
2005-02-28 07:16:19 +00:00
if ( ! STRCMP ( name , pr_framemacros [ i ] ) )
2004-08-23 01:38:21 +00:00
{
2005-02-28 07:16:19 +00:00
return pr_framemacrovalue [ i ] ;
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
{
2005-02-28 07:16:19 +00:00
if ( ! stricmp ( name , pr_framemacros [ i ] ) )
2004-08-23 01:38:21 +00:00
{
2014-03-30 08:55:06 +00:00
QCC_PR_ParseWarning ( WARN_CASEINSENSITIVEFRAMEMACRO , " Case insensitive frame macro " ) ;
2005-02-28 07:16:19 +00:00
return pr_framemacrovalue [ i ] ;
2004-08-23 01:38:21 +00:00
}
}
2005-02-28 07:16:19 +00:00
return - 1 ;
}
void QCC_PR_ExpandMacro ( void )
{
int i = QCC_PR_FindMacro ( pr_token ) ;
if ( i < 0 )
QCC_PR_ParseError ( ERR_BADFRAMEMACRO , " Unknown frame macro $%s " , pr_token ) ;
sprintf ( pr_token , " %d " , i ) ;
pr_token_type = tt_immediate ;
pr_immediate_type = type_float ;
pr_immediate . _float = ( float ) i ;
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
}
2008-10-30 11:10:58 +00:00
pbool QCC_PR_LexMacroName ( void )
{
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 ;
}
2005-02-28 07:16:19 +00:00
void QCC_PR_MacroFrame ( char * name , int value )
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
{
2005-02-28 07:16:19 +00:00
if ( ! STRCMP ( name , pr_framemacros [ i ] ) )
2004-11-15 13:03:32 +00:00
{
2005-02-28 07:16:19 +00:00
pr_framemacrovalue [ i ] = value ;
if ( i > = pr_oldmacros )
QCC_PR_ParseWarning ( WARN_DUPLICATEMACRO , " Duplicate macro defined (%s) " , pr_token ) ;
//else it's from an old file, and shouldn't be mentioned.
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
2008-01-16 03:43:53 +00:00
if ( strlen ( name ) + 1 > sizeof ( pr_framemacros [ 0 ] ) )
QCC_PR_ParseWarning ( ERR_TOOMANYFRAMEMACROS , " Name for frame macro %s is too long " , name ) ;
else
{
strcpy ( pr_framemacros [ pr_nummacros ] , name ) ;
pr_framemacrovalue [ pr_nummacros ] = value ;
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
2005-02-28 07:16:19 +00:00
void QCC_PR_ParseFrame ( void )
{
2008-10-30 11:10:58 +00:00
while ( QCC_PR_LexMacroName ( ) )
2005-02-28 07:16:19 +00:00
{
QCC_PR_MacroFrame ( pr_token , pr_macrovalue + + ) ;
2004-08-23 01:38:21 +00:00
}
}
/*
= = = = = = = = = = = = = =
PR_LexGrab
Deals with counting sequence numbers and replacing frame macros
= = = = = = = = = = = = = =
*/
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 ( ) ;
}
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 )
QCC_PR_MacroFrame ( pr_framemodelname , pr_macrovalue ) ;
strncpy ( pr_framemodelname , pr_token , sizeof ( pr_framemodelname ) - 1 ) ;
pr_framemodelname [ sizeof ( pr_framemodelname ) - 1 ] = ' \0 ' ;
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
pbool QCC_PR_UndefineName ( char * name )
{
// 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 ;
}
CompilerConstant_t * QCC_PR_DefineName ( char * name )
{
int i ;
CompilerConstant_t * cnst ;
// if (numCompilerConstants >= MAX_CONSTANTS)
// QCC_PR_ParseError("Too many compiler constants - %i >= %i", numCompilerConstants, MAX_CONSTANTS);
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 ;
cnst - > numparams = 0 ;
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 ;
}
void QCC_PR_Undefine ( void )
{
QCC_PR_SimpleGetToken ( ) ;
QCC_PR_UndefineName ( pr_token ) ;
// QCC_PR_ParseError("%s was not defined.", pr_token);
}
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 = = ' ( ' )
{
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 ' ;
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 + + = ' ' ;
}
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 ;
2008-01-26 18:32:41 +00:00
s + + ;
2009-03-20 01:12:01 +00:00
QCC_PR_NewLine ( false ) ;
2013-06-23 02:17:02 +00:00
s + + ;
2008-01-26 18:32:41 +00:00
if ( s [ - 1 ] = = ' \r ' & & s [ 0 ] = = ' \n ' )
{
2013-06-23 02:17:02 +00:00
s + + ;
}
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 .
*/
2013-06-23 02:17:02 +00:00
for ( exploitcheck = s ; * exploitcheck & & qcc_iswhite ( * exploitcheck ) ; exploitcheck + + )
;
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 ;
}
else if ( preprocessorhack )
{
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 ;
}
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 ) )
2005-10-17 17:17:20 +00:00
QCC_PR_ParseWarning ( WARN_DUPLICATEPRECOMPILER , " Alternate precompiler definition of %s " , pr_token ) ;
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 ;
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*/
}
2012-11-27 03:23:19 +00:00
int QCC_PR_CheckCompConst ( void )
2004-08-23 01:38:21 +00:00
{
char * oldpr_file_p = pr_file_p ;
2004-10-27 23:51:52 +00:00
int whitestart ;
2004-08-23 01:38:21 +00:00
CompilerConstant_t * c ;
char * end ;
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 ;
}
strncpy ( pr_token , pr_file_p , end - pr_file_p ) ;
pr_token [ end - pr_file_p ] = ' \0 ' ;
2005-02-28 07:16:19 +00:00
2004-08-23 01:38:21 +00:00
// 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
2005-12-21 03:07:33 +00:00
if ( c & & ! c - > inside )
2004-08-23 01:38:21 +00:00
{
pr_file_p = oldpr_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 = = ' ( ' )
{
int p ;
char * start ;
2011-11-08 06:00:35 +00:00
char * starttok ;
char * buffer ;
2014-02-13 23:54:57 +00:00
size_t buffermax ;
size_t bufferlen ;
2004-08-23 01:38:21 +00:00
char * paramoffset [ MAXCONSTANTPARAMS + 1 ] ;
int param = 0 ;
2004-12-27 18:47:32 +00:00
int plevel = 0 ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
2013-12-29 22:48:28 +00:00
QCC_PR_LexWhitespace ( false ) ;
2004-08-23 01:38:21 +00:00
start = pr_file_p ;
while ( 1 )
{
2008-01-23 00:37:56 +00:00
// 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 ' ) ;
}
2004-12-27 18:47:32 +00:00
if ( * pr_file_p = = ' ( ' )
plevel + + ;
else if ( ! plevel & & ( * pr_file_p = = ' , ' | | * pr_file_p = = ' ) ' ) )
2004-08-23 01:38:21 +00:00
{
2013-12-29 22:48:28 +00:00
if ( * pr_file_p = = ' , ' & & c - > varg & & param > = c - > numparams )
; //skip extra trailing , arguments if we're varging.
else
2004-08-23 01:38:21 +00:00
{
2013-12-29 22:48:28 +00:00
paramoffset [ param + + ] = start ;
start = pr_file_p + 1 ;
if ( * pr_file_p = = ' ) ' )
{
* pr_file_p = ' \0 ' ;
pr_file_p + + ;
break ;
}
2004-08-23 01:38:21 +00:00
* pr_file_p = ' \0 ' ;
pr_file_p + + ;
2013-12-29 22:48:28 +00:00
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 " ) ;
2004-08-23 01:38:21 +00:00
}
2004-12-27 18:47:32 +00:00
} else if ( * pr_file_p = = ' ) ' )
plevel - - ;
2009-03-20 01:12:01 +00:00
else if ( * pr_file_p = = ' \n ' )
QCC_PR_NewLine ( false ) ;
2004-12-27 18:47:32 +00:00
2008-07-27 02:48:59 +00:00
// see that *pr_file_p = '\0' up there? Must ++ BEFORE checking for !*pr_file_p
pr_file_p + + ;
2004-08-23 01:38:21 +00:00
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 ;
2011-11-08 06:00:35 +00:00
buffer = NULL ;
bufferlen = 0 ;
buffermax = 0 ;
2004-08-23 01:38:21 +00:00
oldpr_file_p = pr_file_p ;
pr_file_p = c - > value ;
2004-10-27 23:51:52 +00:00
for ( ; ; )
2004-08-23 01:38:21 +00:00
{
2011-11-08 06:00:35 +00:00
whitestart = bufferlen ;
starttok = pr_file_p ;
2013-12-29 22:48:28 +00:00
/*while(qcc_iswhite(*pr_file_p)) //copy across whitespace
2004-10-19 16:10:14 +00:00
{
if ( ! * pr_file_p )
break ;
2011-11-08 06:00:35 +00:00
pr_file_p + + ;
2013-12-29 22:48:28 +00:00
} */
QCC_PR_LexWhitespace ( true ) ;
2011-11-08 06:00:35 +00:00
if ( starttok ! = pr_file_p )
{
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , starttok , pr_file_p - starttok ) ;
2004-10-19 16:10:14 +00:00
}
2008-07-27 02:48:59 +00:00
if ( * pr_file_p = = ' \" ' )
{
2011-11-08 06:00:35 +00:00
starttok = pr_file_p ;
2008-07-27 02:48:59 +00:00
do
{
2011-11-08 06:00:35 +00:00
pr_file_p + + ;
2008-07-27 02:48:59 +00:00
} while ( ( pr_file_p [ - 1 ] = = ' \\ ' | | pr_file_p [ 0 ] ! = ' \" ' ) & & * pr_file_p & & * pr_file_p ! = ' \n ' ) ;
2011-11-08 06:00:35 +00:00
if ( * pr_file_p = = ' \" ' )
pr_file_p + + ;
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , starttok , pr_file_p - starttok ) ;
2008-07-27 02:48:59 +00:00
continue ;
}
else if ( * pr_file_p = = ' # ' ) //if you ask for #a##b you will be shot. use #a #b instead, or chain macros.
2004-10-27 23:51:52 +00:00
{
if ( pr_file_p [ 1 ] = = ' # ' )
2011-11-08 06:00:35 +00:00
{ //concatinate (strip out whitespace before the token)
bufferlen = whitestart ;
2004-10-27 23:51:52 +00:00
pr_file_p + = 2 ;
}
else
{ //stringify
pr_file_p + + ;
2004-11-13 17:18:34 +00:00
pr_file_p = QCC_COM_Parse2 ( pr_file_p ) ;
2004-10-27 23:51:52 +00:00
if ( ! pr_file_p )
break ;
for ( p = 0 ; p < param ; p + + )
{
if ( ! STRCMP ( qcc_token , c - > params [ p ] ) )
{
2011-11-08 06:00:35 +00:00
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , " \" " , 1 ) ;
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , paramoffset [ p ] , strlen ( paramoffset [ p ] ) ) ;
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , " \" " , 1 ) ;
2004-10-27 23:51:52 +00:00
break ;
}
}
if ( p = = param )
{
2011-11-08 06:00:35 +00:00
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , " # " , 1 ) ;
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , qcc_token , strlen ( qcc_token ) ) ;
2013-12-29 22:48:28 +00:00
if ( ! c - > evil )
QCC_PR_ParseWarning ( 0 , " '#' is not followed by a macro parameter in %s " , c - > name ) ;
2004-10-27 23:51:52 +00:00
}
continue ; //already did this one
}
}
2004-11-13 17:18:34 +00:00
pr_file_p = QCC_COM_Parse2 ( pr_file_p ) ;
2004-08-23 01:38:21 +00:00
if ( ! pr_file_p )
break ;
2013-12-29 22:48:28 +00:00
for ( p = 0 ; p < c - > numparams ; p + + )
2004-08-23 01:38:21 +00:00
{
if ( ! STRCMP ( qcc_token , c - > params [ p ] ) )
{
2011-11-08 06:00:35 +00:00
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , paramoffset [ p ] , strlen ( paramoffset [ p ] ) ) ;
2004-08-23 01:38:21 +00:00
break ;
}
}
2013-12-29 22:48:28 +00:00
if ( c - > varg & & ! STRCMP ( qcc_token , " __VA_ARGS__ " ) )
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , paramoffset [ c - > numparams ] , strlen ( paramoffset [ c - > numparams ] ) ) ;
else if ( p = = c - > numparams )
2011-11-08 06:00:35 +00:00
QCC_PR_ExpandStrCat ( & buffer , & bufferlen , & buffermax , qcc_token , strlen ( qcc_token ) ) ;
2004-10-27 23:51:52 +00:00
}
2004-08-23 01:38:21 +00:00
for ( p = 0 ; p < param - 1 ; p + + )
paramoffset [ p ] [ strlen ( paramoffset [ p ] ) ] = ' , ' ;
paramoffset [ p ] [ strlen ( paramoffset [ p ] ) ] = ' ) ' ;
pr_file_p = oldpr_file_p ;
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 ) ;
}
free ( buffer ) ;
2013-09-26 14:36:52 +00:00
if ( flag_debugmacros )
{
if ( flag_msvcstyle )
printf ( " %s(%i) : macro %s: %s \n " , strings + s_file , pr_source_line , c - > name , pr_file_p ) ;
else
printf ( " %s:%i: macro %s: %s \n " , strings + s_file , pr_source_line , c - > name , pr_file_p ) ;
}
2004-08-23 01:38:21 +00:00
}
else
2011-11-08 06:00:35 +00:00
QCC_PR_ParseError ( ERR_TOOFEWPARAMS , " Macro without argument list " ) ;
2004-08-23 01:38:21 +00:00
}
else
2008-11-09 22:29:28 +00:00
{
if ( ! * c - > value )
expandedemptymacro = true ;
2008-01-27 01:14:44 +00:00
QCC_PR_IncludeChunkEx ( c - > value , false , NULL , c ) ;
2008-11-09 22:29:28 +00:00
}
2004-08-23 01:38:21 +00:00
return true ;
}
if ( ! strncmp ( pr_file_p , " __TIME__ " , 8 ) )
{
2014-05-16 01:34:58 +00:00
char retbuf [ 128 ] ;
2005-04-02 18:00:45 +00:00
time_t long_time ;
time ( & long_time ) ;
strftime ( retbuf , sizeof ( retbuf ) ,
2005-06-04 04:20:20 +00:00
" \" %H:%M \" " , localtime ( & long_time ) ) ;
2005-04-02 18:00:45 +00:00
2014-08-03 14:47:47 +00:00
pr_file_p + = 8 ;
2014-05-16 01:34:58 +00:00
QCC_PR_IncludeChunkEx ( retbuf , true , NULL , NULL ) ;
2004-08-23 01:38:21 +00:00
return true ;
}
if ( ! strncmp ( pr_file_p , " __DATE__ " , 8 ) )
{
2014-05-16 01:34:58 +00:00
char retbuf [ 128 ] ;
2005-04-02 18:00:45 +00:00
time_t long_time ;
time ( & long_time ) ;
strftime ( retbuf , sizeof ( retbuf ) ,
2005-04-02 18:39:22 +00:00
" \" %a %d %b %Y \" " , localtime ( & long_time ) ) ;
2005-04-02 18:00:45 +00:00
2014-05-16 01:34:58 +00:00
pr_file_p + = 8 ;
QCC_PR_IncludeChunkEx ( retbuf , true , NULL , NULL ) ;
2004-08-23 01:38:21 +00:00
return true ;
}
2014-08-03 14:47:47 +00:00
if ( ! strncmp ( pr_file_p , " __RAND__ " , 8 ) )
2014-05-21 06:21:09 +00:00
{
char retbuf [ 128 ] ;
2014-08-03 14:47:47 +00:00
QC_snprintfz ( retbuf , sizeof ( retbuf ) , " %i " , rand ( ) ) ;
2014-05-21 06:21:09 +00:00
2014-08-03 14:47:47 +00:00
pr_file_p + = 8 ;
QCC_PR_IncludeChunkEx ( retbuf , true , NULL , NULL ) ;
return true ;
}
if ( ! strncmp ( pr_file_p , " __QCCVER__ " , 8 ) )
{
2014-05-21 06:21:09 +00:00
pr_file_p + = 10 ;
QCC_PR_IncludeChunkEx ( " FTEQCC " __DATE__ " , " __TIME__ " " , true , NULL , NULL ) ;
return true ;
}
2004-08-23 01:38:21 +00:00
if ( ! strncmp ( pr_file_p , " __FILE__ " , 8 ) )
2010-12-08 14:42:05 +00:00
{
2014-05-16 01:34:58 +00:00
char retbuf [ 256 ] ;
2014-08-03 14:47:47 +00:00
QC_snprintfz ( retbuf , sizeof ( retbuf ) , " \" %s \" " , strings + s_file ) ;
2004-08-23 01:38:21 +00:00
2014-05-16 01:34:58 +00:00
pr_file_p + = 8 ;
QCC_PR_IncludeChunkEx ( retbuf , true , NULL , NULL ) ;
2004-08-23 01:38:21 +00:00
return true ;
}
if ( ! strncmp ( pr_file_p , " __LINE__ " , 8 ) )
{
2014-05-16 01:34:58 +00:00
char retbuf [ 256 ] ;
2014-08-03 14:47:47 +00:00
QC_snprintfz ( retbuf , sizeof ( retbuf ) , " \" %i \" " , pr_source_line ) ;
2014-05-16 01:34:58 +00:00
pr_file_p + = 8 ;
QCC_PR_IncludeChunkEx ( retbuf , true , NULL , NULL ) ;
2004-08-23 01:38:21 +00:00
return true ;
}
if ( ! strncmp ( pr_file_p , " __FUNC__ " , 8 ) )
2010-12-08 14:42:05 +00:00
{
2014-05-16 01:34:58 +00:00
char retbuf [ 256 ] ;
2014-08-03 14:47:47 +00:00
QC_snprintfz ( retbuf , sizeof ( retbuf ) , " \" %s \" " , pr_scope ? pr_scope - > name : " <NO FUNCTION> " ) ;
2014-05-16 01:34:58 +00:00
pr_file_p + = 8 ;
QCC_PR_IncludeChunkEx ( retbuf , true , NULL , NULL ) ;
2004-08-23 01:38:21 +00:00
return true ;
}
if ( ! strncmp ( pr_file_p , " __NULL__ " , 8 ) )
{
2014-05-16 01:34:58 +00:00
pr_file_p + = 8 ;
QCC_PR_IncludeChunkEx ( " 0i " , false , NULL , NULL ) ;
2004-08-23 01:38:21 +00:00
return true ;
}
return false ;
}
2012-11-27 03:23:19 +00:00
char * QCC_PR_CheckCompConstString ( char * def )
2004-08-23 01:38:21 +00:00
{
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 ;
}
CompilerConstant_t * QCC_PR_CheckCompConstDefined ( char * def )
{
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 ;
}
2013-12-29 22:48:28 +00:00
QCC_PR_LexWhitespace ( false ) ;
2004-08-23 01:38:21 +00:00
2012-11-27 03:23:19 +00:00
pr_token_line_last = pr_token_line ;
pr_token_line = pr_source_line ;
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
2014-01-15 02:13:58 +00:00
if ( c = = ' \" ' | | ( c = = ' R ' & & pr_file_p [ 1 ] = = ' \" ' ) )
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
2014-06-12 23:08:42 +00:00
if ( ( c = = ' % ' ) & & pr_file_p [ 1 ] > = ' 0 ' & & pr_file_p [ 1 ] < = ' 9 ' ) //let's see which one we make into an operator first... possibly both...
2004-08-23 01:38:21 +00:00
{
2014-06-12 23:08:42 +00:00
QCC_PR_ParseWarning ( 0 , " %% prefixes to denote integers are deprecated. Please use a postfix of 'i' " ) ;
2004-08-23 01:38:21 +00:00
pr_file_p + + ;
pr_token_type = tt_immediate ;
pr_immediate_type = type_integer ;
pr_immediate . _int = QCC_PR_LexInteger ( ) ;
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 ;
}
if ( c = = ' # ' & & ! ( pr_file_p [ 1 ] = = ' - ' | | ( pr_file_p [ 1 ] > = ' 0 ' & & pr_file_p [ 1 ] < = ' 9 ' ) ) ) //hash and not number
{
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 ;
if ( def - > s_file )
2009-11-04 21:16:50 +00:00
{
2013-12-29 22:48:28 +00:00
char tybuffer [ 512 ] ;
char tmbuffer [ 512 ] ;
if ( QCC_Temp_Describe ( def , tmbuffer , sizeof ( tmbuffer ) ) )
{
printf ( " %s:%i: (%s)(%s) \n " , strings + def - > s_file , def - > s_line , TypeName ( def - > type , tybuffer , sizeof ( tybuffer ) ) , tmbuffer ) ;
}
2009-11-04 21:16:50 +00:00
else
2013-12-29 22:48:28 +00:00
{
if ( flag_msvcstyle )
printf ( " %s(%i) : %s %s is defined here \n " , strings + def - > s_file , def - > s_line , TypeName ( def - > type , tybuffer , sizeof ( tybuffer ) ) , def - > name ) ;
else
printf ( " %s:%i: %s %s is defined here \n " , strings + def - > s_file , def - > s_line , TypeName ( def - > type , tybuffer , sizeof ( tybuffer ) ) , def - > name ) ;
}
2009-11-04 21:16:50 +00:00
}
2004-08-23 01:38:21 +00:00
}
2006-01-14 03:37:22 +00:00
void * errorscope ;
void QCC_PR_PrintScope ( void )
{
if ( pr_scope )
{
if ( errorscope ! = pr_scope )
2006-05-07 20:57:30 +00:00
printf ( " in function %s (line %i), \n " , pr_scope - > name , pr_scope - > s_line ) ;
2006-01-14 03:37:22 +00:00
errorscope = pr_scope ;
}
else
{
if ( errorscope )
2006-05-07 20:57:30 +00:00
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
void editbadfile ( char * file , int line ) ;
# 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.
2004-08-23 01:38:21 +00:00
void VARGS QCC_PR_ParseError ( int errortype , char * error , . . . )
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
# ifndef QCC
editbadfile ( strings + s_file , pr_source_line ) ;
# endif
2006-01-14 03:37:22 +00:00
QCC_PR_PrintScope ( ) ;
2009-11-04 21:16:50 +00:00
if ( flag_msvcstyle )
printf ( " %s(%i) : error: %s \n " , strings + s_file , pr_source_line , string ) ;
else
printf ( " %s:%i: error: %s \n " , strings + s_file , pr_source_line , 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.
2004-08-23 01:38:21 +00:00
void VARGS QCC_PR_ParseErrorPrintDef ( int errortype , QCC_def_t * def , char * error , . . . )
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , error ) ;
QC_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
# ifndef QCC
editbadfile ( strings + s_file , pr_source_line ) ;
# endif
2006-01-14 03:37:22 +00:00
QCC_PR_PrintScope ( ) ;
2009-11-04 21:16:50 +00:00
if ( flag_msvcstyle )
printf ( " %s(%i) : error: %s \n " , strings + s_file , pr_source_line , string ) ;
else
printf ( " %s:%i: error: %s \n " , strings + s_file , pr_source_line , 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 ) ;
}
------------------------------------------------------------------------
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
pbool VARGS QCC_PR_PrintWarning ( int type , char * file , int line , char * string )
{
char * wnam = QCC_NameForWarning ( type ) ;
if ( ! wnam )
wnam = " " ;
2004-08-23 01:38:21 +00:00
2006-01-14 03:37:22 +00:00
QCC_PR_PrintScope ( ) ;
2004-09-02 12:58:49 +00:00
if ( type > = ERR_PARSEERRORS )
{
------------------------------------------------------------------------
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 )
printf ( " error%s: %s \n " , wnam , string ) ;
else if ( flag_msvcstyle )
printf ( " %s(%i) : error%s: %s \n " , file , line , wnam , string ) ;
else
printf ( " %s:%i: error%s: %s \n " , file , line , wnam , string ) ;
pr_error_count + + ;
}
else if ( qccwarningaction [ type ] = = 2 )
{ //-werror
if ( ! file )
printf ( " werror%s: %s \n " , wnam , string ) ;
else if ( flag_msvcstyle )
printf ( " %s(%i) : werror%s: %s \n " , file , line , wnam , string ) ;
2009-11-04 21:16:50 +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
printf ( " %s:%i: werror%s: %s \n " , file , line , wnam , string ) ;
2004-09-02 12:58:49 +00:00
pr_error_count + + ;
}
else
2005-12-16 17:15:43 +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 ( ! file )
printf ( " warning%s: %s \n " , wnam , string ) ;
else if ( flag_msvcstyle )
printf ( " %s(%i) : warning%s: %s \n " , file , line , wnam , string ) ;
2009-11-04 21:16:50 +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
printf ( " %s:%i: warning%s: %s \n " , file , line , wnam , 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
}
------------------------------------------------------------------------
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
pbool VARGS QCC_PR_Warning ( int type , char * file , int line , 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
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.
pbool VARGS QCC_PR_ParseWarning ( int type , 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 ) ;
------------------------------------------------------------------------
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 , strings + s_file , pr_source_line , string ) ;
}
void VARGS QCC_PR_Note ( int type , char * file , int line , char * error , . . . )
{
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 )
printf ( " note: %s \n " , string ) ;
else if ( flag_msvcstyle )
printf ( " %s(%i) : note: %s \n " , file , line , string ) ;
2004-08-23 01:38:21 +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
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
void QCC_PR_Expect ( char * string )
{
if ( STRCMP ( string , pr_token ) )
QCC_PR_ParseError ( ERR_EXPECTED , " expected %s, found %s " , string , pr_token ) ;
QCC_PR_Lex ( ) ;
}
# endif
2013-03-12 23:15:32 +00:00
pbool QCC_PR_CheckTokenComment ( char * string , char * * comment )
{
char c ;
char * start ;
int nl ;
char * old ;
int oldlen ;
pbool replace = true ;
pbool nextcomment = true ;
if ( pr_token_type ! = tt_punct )
return false ;
if ( STRCMP ( string , pr_token ) )
return false ;
if ( comment )
{
// skip whitespace
nl = false ;
while ( nextcomment )
{
nextcomment = false ;
while ( ( c = * pr_file_p ) & & qcc_iswhite ( c ) )
{
if ( c = = ' \n ' ) //allow new lines, but only if there's whitespace before any tokens, and no double newlines.
{
if ( nl )
{
pr_file_p + + ;
2013-03-12 23:21:36 +00:00
QCC_PR_NewLine ( false ) ;
2013-03-12 23:15:32 +00:00
break ;
}
nl = true ;
}
else
{
pr_file_p + + ;
nl = false ;
}
}
if ( nl )
break ;
// 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 + + ;
if ( * pr_file_p = = ' \n ' )
{
pr_file_p + + ;
2013-05-03 04:10:48 +00:00
QCC_PR_NewLine ( false ) ;
2013-03-12 23:15:32 +00:00
}
old = replace ? NULL : * comment ;
replace = false ;
oldlen = old ? strlen ( old ) + 1 : 0 ;
* comment = qccHunkAlloc ( oldlen + ( pr_file_p - start ) + 1 ) ;
if ( oldlen )
{
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 )
{
2014-01-13 02:33:11 +00:00
pr_file_p + = 1 ;
start = pr_file_p + 1 ;
2013-03-12 23:15:32 +00:00
do
{
2014-01-13 02:33:11 +00:00
pr_file_p + + ;
2013-03-12 23:15:32 +00:00
if ( pr_file_p [ 0 ] = = ' \n ' )
2013-03-12 23:21:36 +00:00
{
2013-03-12 23:15:32 +00:00
QCC_PR_NewLine ( true ) ;
2013-03-12 23:21:36 +00:00
}
else if ( pr_file_p [ 1 ] = = 0 )
2013-03-12 23:15:32 +00:00
{
QCC_PR_ParseError ( 0 , " EOF inside comment \n " ) ;
break ;
}
} while ( pr_file_p [ 0 ] ! = ' * ' | | pr_file_p [ 1 ] ! = ' / ' ) ;
2014-01-13 02:33:11 +00:00
if ( pr_file_p [ 1 ] = = 0 )
break ;
2013-03-12 23:15:32 +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 ;
2004-08-23 01:38:21 +00:00
2013-03-12 23:15:32 +00:00
pr_file_p + = 2 ;
}
}
}
//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
2005-03-20 02:57:11 +00:00
pbool QCC_PR_CheckToken ( 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 ;
}
pbool QCC_PR_CheckImmediate ( char * string )
{
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 ;
}
2005-03-20 02:57:11 +00:00
pbool QCC_PR_CheckName ( 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 ;
}
pbool QCC_PR_CheckKeyword ( int keywordenabled , char * string )
{
if ( ! keywordenabled )
2005-02-09 19:32:30 +00:00
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 ;
}
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 )
{
static char ident [ MAX_NAME ] ;
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 ) ;
else
QCC_PR_ParseError ( ERR_NOTANAME , " \" %s \" - not a name " , pr_token ) ;
}
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 .
= = = = = = = = = = = =
*/
//0 if same
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 ;
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 ;
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 )
{
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 ;
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 ;
//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 ;
}
}
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 ) ;
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 ;
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 ;
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 ;
}
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
{
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
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))
QCC_type_t * QCC_PR_FindType ( QCC_type_t * type )
{
int t ;
for ( t = 0 ; t < numtypeinfos ; t + + )
{
// check = &qcc_typeinfo[t];
if ( typecmp ( & qcc_typeinfo [ t ] , type ) )
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 ] ;
}
}
QCC_Error ( ERR_INTERNAL , " Error with type " ) ;
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 ;
}
*/
QCC_type_t * QCC_TypeForName ( char * name )
{
int i ;
for ( i = 0 ; i < numtypeinfos ; i + + )
{
2013-06-02 06:03:54 +00:00
if ( qcc_typeinfo [ i ] . typedefed & & ! STRCMP ( qcc_typeinfo [ i ] . name , name ) )
2004-08-23 01:38:21 +00:00
{
return & qcc_typeinfo [ i ] ;
}
}
return NULL ;
}
/*
= = = = = = = = = = = =
PR_SkipToSemicolon
For error recovery , also pops out of nested braces
= = = = = = = = = = = =
*/
void QCC_PR_SkipToSemicolon ( void )
{
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
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 )
{
2013-06-23 03:59:48 +00:00
QCC_type_t * ftype ;
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 optional = 0 ;
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
{
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 ( " ... " ) )
{
ftype - > vargs = true ;
break ;
}
2004-08-23 01:38:21 +00:00
2013-06-02 06:03:54 +00:00
if ( QCC_PR_CheckKeyword ( keyword_optional , " optional " ) )
{
paramlist [ numparms ] . optional = true ;
optional = true ;
}
else
{
if ( optional )
2011-11-08 06:00:35 +00:00
{
QCC_PR_ParseWarning ( WARN_MISSINGOPTIONAL , " optional not specified on all optional args \n " ) ;
2013-06-02 06:03:54 +00:00
paramlist [ numparms ] . optional = true ;
2004-08-23 01:38:21 +00:00
}
else
2013-06-02 06:03:54 +00:00
paramlist [ numparms ] . optional = false ;
}
2004-08-23 01:38:21 +00:00
2013-06-02 06:03:54 +00:00
paramlist [ numparms ] . ofs = 0 ;
paramlist [ numparms ] . arraysize = 0 ;
paramlist [ numparms ] . type = QCC_PR_ParseType ( false , false ) ;
2004-08-23 01:38:21 +00:00
2013-06-02 06:03:54 +00:00
if ( paramlist [ numparms ] . type - > type = = ev_void )
break ;
// type->name = "FUNC PARAMETER";
paramlist [ numparms ] . paramname = " " ;
if ( STRCMP ( pr_token , " , " ) & & STRCMP ( pr_token , " ) " ) )
{
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 ) ;
}
else if ( definenames )
strcpy ( pr_parm_names [ numparms ] , " " ) ;
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 - - ;
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
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
2014-03-01 11:38:53 +00:00
paramlist [ numparms ] . optional = false ;
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 )
{
2011-09-03 03:49:43 +00:00
QCC_type_t * ptype , * e ;
2012-02-05 01:38:51 +00:00
ptype = QCC_PR_NewType ( " ptr " , ev_pointer , false ) ;
2004-11-04 04:19:10 +00:00
ptype - > aux_type = pointsto ;
2011-09-03 03:49:43 +00:00
e = QCC_PR_FindType ( ptype ) ;
if ( e = = ptype )
{
char name [ 128 ] ;
2013-09-26 14:36:52 +00:00
QC_snprintfz ( name , sizeof ( name ) , " ptr to %s " , pointsto - > name ) ;
e - > name = qccHunkAlloc ( strlen ( name ) + 1 ) ;
strcpy ( e - > name , name ) ;
2011-09-03 03:49:43 +00:00
}
return e ;
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 ] ;
2013-09-26 14:36:52 +00:00
QC_snprintfz ( name , sizeof ( name ) , " FIELD_TYPE(%s) " , pointsto - > name ) ;
2012-02-05 01:38:51 +00:00
ptype = QCC_PR_NewType ( name , ev_field , false ) ;
2005-02-09 19:32:30 +00:00
ptype - > aux_type = pointsto ;
ptype - > size = ptype - > aux_type - > size ;
return QCC_PR_FindType ( ptype ) ;
}
2004-11-04 04:19:10 +00:00
2013-09-26 14:36:52 +00:00
extern char * basictypenames [ ] ;
extern QCC_type_t * * basictypes [ ] ;
QCC_def_t * QCC_PR_DummyDef ( QCC_type_t * type , char * name , QCC_def_t * scope , int arraysize , unsigned int ofs , int referable , unsigned int flags ) ;
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 ;
int i ;
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;
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-11 02:06:06 +00:00
newt = QCC_PR_NewType ( " FIELD_TYPE " , ev_field , false ) ;
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.
if ( QCC_PR_CheckToken ( " * " ) )
{
newt - > aux_type = QCC_PR_NewType ( " POINTER TYPE " , ev_pointer , false ) ;
newt - > aux_type - > aux_type = QCC_PR_ParseType ( false , false ) ;
2004-08-23 01:38:21 +00:00
2013-06-26 03:35:29 +00:00
newt - > aux_type - > size = newt - > aux_type - > aux_type - > size ;
}
else
newt - > aux_type = QCC_PR_ParseType ( false , false ) ;
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
2012-11-27 03:23:19 +00:00
name = QCC_PR_CheckCompConstString ( pr_token ) ;
2004-08-23 01:38:21 +00:00
2005-03-20 02:57:11 +00:00
if ( 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 ;
pbool found = false ;
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 ) ;
forwarddeclaration = false ;
QCC_PR_Expect ( " { " ) ;
}
else
{
fieldtype = type_entity ;
forwarddeclaration = ! QCC_PR_CheckToken ( " { " ) ;
}
2006-09-28 02:46:42 +00:00
/* Look to see if this type is already defined */
for ( i = 0 ; i < numtypeinfos ; i + + )
{
2012-02-05 01:38:51 +00:00
if ( ! qcc_typeinfo [ i ] . typedefed )
continue ;
2006-09-28 02:46:42 +00:00
if ( STRCMP ( qcc_typeinfo [ i ] . name , classname ) = = 0 )
{
newt = & qcc_typeinfo [ i ] ;
break ;
2010-12-08 14:42:05 +00:00
}
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
{
2012-02-05 01:38:51 +00:00
newt = QCC_PR_NewType ( classname , ev_entity , 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 )
QCC_PR_ParseError ( ERR_REDECLARATION , " Declaration of class %s within function " , classname ) ;
if ( redeclaration & & fieldtype ! = newt - > parentclass )
QCC_PR_ParseError ( ERR_REDECLARATION , " Parent class changed on redeclaration of %s " , classname ) ;
newt - > parentclass = fieldtype ;
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
{
2013-06-13 22:45:15 +00:00
pbool havebody = false ;
2014-04-24 01:53:01 +00:00
pbool isnull = false ;
2013-08-21 06:55:54 +00:00
pbool isvirt = false ;
pbool isnonvirt = false ;
pbool isstatic = false ;
while ( 1 )
{
if ( QCC_PR_CheckKeyword ( 1 , " nonvirtual " ) )
isnonvirt = true ;
else if ( QCC_PR_CheckKeyword ( 1 , " static " ) )
isstatic = true ;
else if ( QCC_PR_CheckKeyword ( 1 , " virtual " ) )
isvirt = true ;
else
break ;
}
2013-06-02 06:03:54 +00:00
newparm = QCC_PR_ParseType ( false , false ) ;
2004-08-23 01:38:21 +00:00
2013-06-11 02:06:06 +00:00
if ( ! newparm )
QCC_PR_ParseError ( ERR_INTERNAL , " In class %s, expected type, found %s " , classname , pr_token ) ;
2004-08-23 01:38:21 +00:00
if ( newparm - > type = = ev_struct | | newparm - > type = = ev_union ) //we wouldn't be able to handle it.
QCC_PR_ParseError ( ERR_INTERNAL , " Struct or union in class %s " , classname ) ;
2013-08-21 06:55:54 +00:00
parmname = QCC_PR_ParseName ( ) ;
2013-06-02 06:03:54 +00:00
if ( QCC_PR_CheckToken ( " [ " ) )
2004-08-23 01:38:21 +00:00
{
2013-06-13 22:45:15 +00:00
arraysize = QCC_PR_IntConstExpr ( ) ;
2013-06-02 06:03:54 +00:00
QCC_PR_Expect ( " ] " ) ;
}
2013-06-13 22:45:15 +00:00
else
arraysize = 0 ;
2013-06-02 06:03:54 +00:00
2013-08-21 06:55:54 +00:00
if ( newparm - > type = = ev_function )
{
if ( isstatic )
2013-12-02 14:30:30 +00:00
{
isstatic = false ;
isnonvirt = true ;
// QCC_PR_ParseError(ERR_INTERNAL, "%s::%s static member functions are not supported at this time.", classname, parmname);
}
2013-08-21 06:55:54 +00:00
if ( ! strcmp ( classname , parmname ) )
{
if ( isstatic )
QCC_PR_ParseError ( ERR_INTERNAL , " Constructor %s::%s may not be static. " , classname , pr_token ) ;
if ( ! isvirt )
2013-12-02 14:30:30 +00:00
isnonvirt = true ; //silently promote constructors to static
2013-08-21 06:55:54 +00:00
}
else if ( ! isvirt & & ! isnonvirt & & ! isstatic )
{
QCC_PR_ParseWarning ( WARN_MISSINGMEMBERQUALIFIER , " %s::%s was not qualified. Assuming non-virtual. " , classname , parmname ) ;
isnonvirt = true ;
}
if ( isvirt + isnonvirt + isstatic ! = 1 )
QCC_PR_ParseError ( ERR_INTERNAL , " Multiple conflicting qualifiers on %s::%s. " , classname , pr_token ) ;
}
else
2013-06-02 06:03:54 +00:00
{
2013-08-21 06:55:54 +00:00
if ( isvirt | isnonvirt )
QCC_Error ( ERR_INTERNAL , " virtual keyword on member that is not a function " ) ;
2013-06-02 06:03:54 +00:00
}
2013-06-13 22:45:15 +00:00
if ( newparm - > type = = ev_function )
{
if ( QCC_PR_CheckToken ( " = " ) )
{
havebody = true ;
}
else if ( pr_token [ 0 ] = = ' { ' )
havebody = true ;
}
if ( havebody )
2013-06-02 06:03:54 +00:00
{
QCC_def_t * def ;
QCC_function_t * f ;
QCC_dfunction_t * df ;
if ( pr_scope )
QCC_Error ( ERR_INTERNAL , " Nested function declaration " ) ;
2014-04-24 01:53:01 +00:00
isnull = ( QCC_PR_CheckImmediate ( " 0 " ) | | QCC_PR_CheckImmediate ( " 0i " ) ) ;
2013-06-02 06:03:54 +00:00
sprintf ( membername , " %s::%s " , classname , parmname ) ;
2014-04-24 01:53:01 +00:00
if ( isnull )
{
def = QCC_PR_GetDef ( newparm , membername , NULL , true , 0 , 0 ) ;
G_FUNCTION ( def - > ofs ) = 0 ;
def - > initialized = 1 ;
}
2013-06-02 06:03:54 +00:00
else
2004-08-23 01:38:21 +00:00
{
2014-04-24 01:53:01 +00:00
def = QCC_PR_GetDef ( newparm , membername , NULL , true , 0 , GDF_CONST ) ;
2013-06-02 06:03:54 +00:00
2014-04-24 01:53:01 +00:00
if ( newparm - > type ! = ev_function )
QCC_Error ( ERR_INTERNAL , " Can only initialise member functions " ) ;
else
2013-06-13 22:45:15 +00:00
{
2014-04-24 01:53:01 +00:00
extern unsigned int locals_end , locals_start ;
extern QCC_type_t * pr_classtype ;
QCC_function_t * QCC_PR_ParseImmediateStatements ( QCC_type_t * type ) ;
2013-06-02 06:03:54 +00:00
2014-04-24 01:53:01 +00:00
if ( autoprototype )
2013-06-13 22:45:15 +00:00
{
2014-04-24 01:53:01 +00:00
QCC_PR_Expect ( " { " ) ;
2013-06-13 22:45:15 +00:00
{
2014-04-24 01:53:01 +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.
}
2013-06-13 22:45:15 +00:00
}
}
else
{
2014-04-24 01:53:01 +00:00
pr_scope = def ;
pr_classtype = newt ;
f = QCC_PR_ParseImmediateStatements ( newparm ) ;
pr_classtype = NULL ;
pr_scope = NULL ;
G_FUNCTION ( def - > ofs ) = numfunctions ;
f - > def = def ;
def - > initialized = 1 ;
if ( numfunctions > = MAX_FUNCTIONS )
QCC_Error ( ERR_INTERNAL , " Too many function defs " ) ;
// fill in the dfunction
df = & functions [ numfunctions ] ;
numfunctions + + ;
if ( f - > builtin )
df - > first_statement = - f - > builtin ;
else
df - > first_statement = f - > code ;
if ( f - > builtin & & opt_function_names )
optres_function_names + = strlen ( f - > def - > name ) ;
else
df - > s_name = QCC_CopyString ( f - > def - > name ) ;
df - > s_file = s_file ;
df - > numparms = f - > def - > type - > num_parms ;
df - > locals = locals_end - locals_start ;
df - > parm_start = locals_start ;
for ( i = 0 ; i < df - > numparms ; i + + )
{
df - > parm_size [ i ] = newparm - > params [ i ] . type - > size ;
}
2013-06-13 22:45:15 +00:00
}
2013-06-02 06:03:54 +00:00
}
}
2013-08-21 06:55:54 +00:00
if ( ! isvirt )
2013-06-02 06:03:54 +00:00
{
2013-06-11 02:06:06 +00:00
QCC_def_t * fdef ;
2013-06-02 06:03:54 +00:00
QCC_type_t * pc ;
unsigned int i ;
2013-06-11 02:06:06 +00:00
2013-06-02 06:03:54 +00:00
for ( pc = newt - > parentclass ; pc ; pc = pc - > parentclass )
{
for ( i = 0 ; i < pc - > num_parms ; i + + )
{
if ( ! strcmp ( pc - > params [ i ] . paramname , parmname ) )
{
2013-06-11 02:06:06 +00:00
QCC_PR_ParseWarning ( WARN_DUPLICATEDEFINITION , " %s::%s is virtual inside parent class '%s'. Did you forget the 'virtual' keyword? " , newt - > name , parmname , pc - > name ) ;
2013-06-02 06:03:54 +00:00
break ;
}
}
if ( i < pc - > num_parms )
break ;
}
2013-06-11 02:06:06 +00:00
if ( ! pc )
{
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 ) ;
}
}
2004-08-23 01:38:21 +00:00
}
}
2013-06-02 06:03:54 +00:00
QCC_PR_Expect ( " ; " ) ;
2004-08-23 01:38:21 +00:00
2014-04-14 09:16:41 +00:00
//static members are technically just funny-named globals, and do not generate fields.
if ( isnonvirt | | isstatic | | ( newparm - > type = = ev_function & & ! arraysize ) )
2013-06-02 06:03:54 +00:00
{
sprintf ( membername , " %s::%s " , classname , parmname ) ;
2013-06-23 03:59:48 +00:00
QCC_PR_GetDef ( newparm , membername , NULL , true , 0 , GDF_CONST ) ;
2004-08-23 01:38:21 +00:00
2014-04-14 09:16:41 +00:00
if ( isnonvirt | | isstatic )
2013-06-02 06:03:54 +00:00
continue ;
}
2004-08-23 01:38:21 +00:00
2013-06-02 06:03:54 +00:00
2013-09-26 14:36:52 +00:00
fieldtype = QCC_PR_NewType ( parmname , ev_field , false ) ;
fieldtype - > aux_type = newparm ;
fieldtype - > size = newparm - > size ;
2013-06-02 06:03:54 +00:00
parms = realloc ( parms , sizeof ( * parms ) * ( numparms + 1 ) ) ;
parms [ numparms ] . ofs = 0 ;
parms [ numparms ] . optional = false ;
parms [ numparms ] . paramname = parmname ;
parms [ numparms ] . arraysize = arraysize ;
parms [ numparms ] . type = newparm ;
2004-08-23 01:38:21 +00:00
2013-09-26 14:36:52 +00:00
basicindex = 0 ;
found = false ;
for ( pc = newt ; pc & & ! found ; pc = pc - > parentclass )
2013-06-02 06:03:54 +00:00
{
2013-09-26 14:36:52 +00:00
struct QCC_typeparam_s * pp ;
int numpc ;
int i ;
if ( pc = = newt )
2013-06-02 06:03:54 +00:00
{
2013-09-26 14:36:52 +00:00
pp = parms ;
numpc = numparms ;
}
else
{
pp = pc - > params ;
numpc = pc - > num_parms ;
}
for ( i = 0 ; i < numpc ; i + + )
{
if ( pp [ i ] . type - > type = = newparm - > type )
2013-06-02 06:03:54 +00:00
{
2013-09-26 14:36:52 +00:00
if ( ! strcmp ( pp [ i ] . paramname , parmname ) )
{
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 ;
}
2014-02-13 23:54:57 +00:00
if ( ( unsigned int ) basicindex < pp [ i ] . ofs + 1 ) //if we found one with the index
2013-09-26 14:36:52 +00:00
basicindex = pp [ i ] . ofs + 1 ; //make sure we don't union it.
2013-06-02 06:03:54 +00:00
}
}
}
2013-09-26 14:36:52 +00:00
parms [ numparms ] . ofs = basicindex ; //ulp, its new
numparms + + ;
if ( found )
continue ;
if ( ! * basictypes [ newparm - > type ] )
QCC_PR_ParseError ( 0 , " members of type %s are not supported (%s::%s) \n " , basictypenames [ newparm - > type ] , classname , parmname ) ;
//make sure the union is okay
d = QCC_PR_GetDef ( NULL , parmname , NULL , 0 , 0 , GDF_CONST ) ;
if ( ! d )
{ //don't go all weird with unioning generic fields
sprintf ( membername , " ::%s%i " , basictypenames [ newparm - > type ] , basicindex + 1 ) ;
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 ) ;
2014-02-13 23:54:57 +00:00
for ( i = 0 ; ( unsigned int ) i < newparm - > size ; i + + )
2013-09-26 14:36:52 +00:00
( ( int * ) qcc_pr_globals ) [ i + d - > ofs ] = pr . size_fields + i ;
pr . size_fields + = i ;
d - > references + + ; //always referenced, so you can inherit safely.
}
}
//and make sure we can do member::__fname
//actually, that seems pointless.
2013-06-02 06:03:54 +00:00
sprintf ( membername , " %s:: " MEMBERFIELDNAME , classname , parmname ) ;
2013-09-26 14:36:52 +00:00
// printf("define %s -> %s\n", membername, d->name);
2014-05-30 03:57:30 +00:00
d = QCC_PR_DummyDef ( fieldtype , membername , pr_scope , 0 , d - > ofs , true , ( isnull ? 0 : GDF_CONST ) | ( opt_classfields ? GDF_STRIP : 0 ) ) ;
2013-09-26 14:36:52 +00:00
d - > references + + ; //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.
sprintf ( membername , " spawnfunc_%s " , classname ) ;
d = QCC_PR_GetDef ( type_function , membername , NULL , true , 0 , GDF_CONST ) ;
d - > timescalled + + ;
d - > references + + ;
}
2004-08-23 01:38:21 +00:00
QCC_PR_Expect ( " ; " ) ;
return NULL ;
}
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 " ) )
structtype = ev_struct ;
if ( structtype ! = ev_void )
2004-08-23 01:38:21 +00:00
{
2013-06-02 06:03:54 +00:00
struct QCC_typeparam_s * parms = NULL ;
int numparms = 0 ;
2013-06-13 22:45:15 +00:00
unsigned int arraysize ;
2013-06-02 06:03:54 +00:00
char * parmname ;
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
{
newt = QCC_TypeForName ( pr_token ) ;
if ( ! newt )
newt = QCC_PR_NewType ( QCC_CopyString ( pr_token ) + strings , ev_struct , true ) ;
QCC_PR_Lex ( ) ;
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.
if ( ! QCC_PR_CheckToken ( " { " ) )
return newt ;
}
2004-08-23 01:38:21 +00:00
newt - > size = 0 ;
type = NULL ;
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 , " element missing name " ) ;
2004-10-13 07:24:59 +00:00
newparm = NULL ;
2005-03-20 02:57:11 +00:00
while ( ! QCC_PR_CheckToken ( " } " ) )
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
{
if ( ! newparm )
QCC_PR_ParseError ( ERR_NOTANAME , " element missing type " ) ;
2012-02-05 01:38:51 +00:00
newparm = QCC_PR_NewType ( newparm - > name , newparm - > type , false ) ;
2004-08-23 01:38:21 +00:00
}
else
2011-09-03 03:49:43 +00:00
newparm = QCC_PR_ParseType ( true , false ) ;
2004-08-23 01:38:21 +00:00
2013-06-13 22:45:15 +00:00
arraysize = 0 ;
2013-06-02 06:03:54 +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
parmname = qccHunkAlloc ( strlen ( pr_token ) + 1 ) ;
strcpy ( parmname , pr_token ) ;
2004-08-23 01:38:21 +00:00
QCC_PR_Lex ( ) ;
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 ( " ] " ) ;
}
2005-03-20 02:57:11 +00:00
QCC_PR_CheckToken ( " ; " ) ;
2004-08-23 01:38:21 +00:00
}
else
2013-06-02 06:03:54 +00:00
parmname = " " ;
2004-08-23 01:38:21 +00:00
2010-12-08 14:42:05 +00:00
2013-06-02 06:03:54 +00:00
parms = realloc ( parms , sizeof ( * parms ) * ( numparms + 1 ) ) ;
if ( structtype = = ev_union )
2004-08-23 01:38:21 +00:00
{
2013-06-02 06:03:54 +00:00
parms [ numparms ] . ofs = 0 ;
2013-06-13 22:45:15 +00:00
if ( newparm - > size * ( arraysize ? arraysize : 1 ) > newt - > size )
newt - > size = newparm - > size * ( arraysize ? arraysize : 1 ) ;
2004-08-23 01:38:21 +00:00
}
else
{
2013-06-02 06:03:54 +00:00
parms [ numparms ] . ofs = newt - > size ;
2013-06-13 22:45:15 +00:00
newt - > size + = newparm - > size * ( arraysize ? arraysize : 1 ) ;
2004-08-23 01:38:21 +00:00
}
2013-06-02 06:03:54 +00:00
parms [ numparms ] . arraysize = arraysize ;
parms [ numparms ] . optional = false ;
parms [ numparms ] . paramname = parmname ;
parms [ numparms ] . type = newparm ;
numparms + + ;
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
2004-08-23 01:38:21 +00:00
type = NULL ;
for ( i = 0 ; i < numtypeinfos ; i + + )
{
2012-02-05 01:38:51 +00:00
if ( ! qcc_typeinfo [ i ] . typedefed )
continue ;
2004-08-23 01:38:21 +00:00
if ( ! STRCMP ( qcc_typeinfo [ i ] . name , name ) )
{
type = & qcc_typeinfo [ i ] ;
break ;
}
}
if ( i = = numtypeinfos )
{
2005-02-28 07:16:19 +00:00
if ( ! * name )
return NULL ;
2013-06-02 06:03:54 +00:00
//some reacc types...
2005-02-09 19:32:30 +00:00
if ( ! stricmp ( " Void " , name ) )
type = type_void ;
else if ( ! stricmp ( " Real " , name ) )
type = type_float ;
else if ( ! stricmp ( " Vector " , name ) )
type = type_vector ;
else if ( ! stricmp ( " Object " , name ) )
type = type_entity ;
else if ( ! stricmp ( " String " , name ) )
type = type_string ;
else if ( ! stricmp ( " PFunc " , name ) )
type = type_function ;
else
{
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 ( ) ;
2010-12-08 14:42:05 +00:00
2011-09-03 03:49:43 +00:00
while ( QCC_PR_CheckToken ( " * " ) )
type = QCC_PointerTypeTo ( type ) ;
2005-03-20 02:57:11 +00:00
if ( 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