2004-09-07 18:16:59 +00:00
# define PROGSUSED
# include "progsint.h"
//#include "editor.h"
2014-03-31 17:06:41 +00:00
# if __STDC_VERSION__ >= 199901L
# define fte_restrict restrict
2016-08-25 00:12:14 +00:00
# elif defined(_MSC_VER) && _MSC_VER >= 1400
2014-03-31 17:06:41 +00:00
# define fte_restrict __restrict
# else
# define fte_restrict
# endif
2018-08-04 15:12:51 +00:00
# if defined(_WIN32) || defined(__DJGPP__)
# include <malloc.h>
# elif !defined(alloca) //alloca.h isn't present on bsd (stdlib.h should define it to __builtin_alloca, and we can check for that here).
# include <alloca.h>
# endif
2004-09-07 18:16:59 +00:00
# define HunkAlloc BADGDFG sdfhhsf FHS
# define Host_Error Sys_Error
2010-12-08 14:42:05 +00:00
// I put the following here to resolve "undefined reference to `__imp__vsnprintf'" with MinGW64 ~ Moodles
2013-09-26 14:36:52 +00:00
#if 0 //def _WIN32
2010-12-08 14:42:05 +00:00
# if (_MSC_VER >= 1400)
//with MSVC 8, use MS extensions
# define snprintf linuxlike_snprintf_vc8
2021-08-04 21:17:31 +00:00
void VARGS linuxlike_snprintf_vc8 ( char * buffer , int size , const char * format , . . . ) LIKEPRINTF ( 3 ) ;
# define vsnprintf(a, b, c, d) (void)(vsnprintf_s(a, b, _TRUNCATE, c, d))
2010-12-08 14:42:05 +00:00
# else
//msvc crap
# define snprintf linuxlike_snprintf
2021-08-04 21:17:31 +00:00
void VARGS linuxlike_snprintf ( char * buffer , int size , const char * format , . . . ) LIKEPRINTF ( 3 ) ;
2010-12-08 14:42:05 +00:00
# define vsnprintf linuxlike_vsnprintf
2021-08-04 21:17:31 +00:00
void VARGS linuxlike_vsnprintf ( char * buffer , int size , const char * format , va_list argptr ) ;
2010-12-08 14:42:05 +00:00
# endif
# endif
2016-07-12 00:40:13 +00:00
//cpu clock stuff (glorified rdtsc), for profile timing only
# if !defined(Sys_GetClock) && defined(_WIN32)
//windows has some specific functions for this (traditionally wrapping rdtsc)
//note: on some systems, you may need to force cpu affinity to a single core via task manager
2016-08-25 00:12:14 +00:00
static prclocks_t Sys_GetClock ( void )
2016-07-12 00:40:13 +00:00
{
LARGE_INTEGER li ;
QueryPerformanceCounter ( & li ) ;
return li . QuadPart ;
}
2016-08-25 00:12:14 +00:00
prclocks_t Sys_GetClockRate ( void )
2016-07-12 00:40:13 +00:00
{
LARGE_INTEGER li ;
QueryPerformanceFrequency ( & li ) ;
return li . QuadPart ;
}
# define Sys_GetClock Sys_GetClock
# endif
#if 0 //!defined(Sys_GetClock) && defined(__unix__)
//linux/unix has some annoying abstraction and shows time in nanoseconds rather than cycles. lets hope we don't waste too much time reading it.
# include <unistd.h>
# if defined(_POSIX_TIMERS) && _POSIX_TIMERS >= 0
# include <time.h>
# ifdef CLOCK_PROCESS_CPUTIME_ID
2016-08-25 00:12:14 +00:00
static prclocks_t Sys_GetClock ( void )
2016-07-12 00:40:13 +00:00
{
struct timespec c ;
clock_gettime ( CLOCK_PROCESS_CPUTIME_ID , & c ) ;
return ( c . tv_sec * 1000000000ull ) + c . tv_nsec ;
}
# define Sys_GetClock Sys_GetClock
2016-08-25 00:12:14 +00:00
prclocks_t Sys_GetClockRate ( void )
2016-07-12 00:40:13 +00:00
{
return 1000000000ull ;
}
# endif
# endif
# endif
# if !defined(Sys_GetClock) && defined(__unix__)
# include <time.h>
# define Sys_GetClock() clock()
2016-08-25 00:12:14 +00:00
prclocks_t Sys_GetClockRate ( void ) { return CLOCKS_PER_SEC ; }
2016-07-12 00:40:13 +00:00
# endif
# ifndef Sys_GetClock
//other systems have no choice but to omit this feature in some way. this is just for profiling, so we can get away with stubs.
# define Sys_GetClock() 0
2016-08-25 00:12:14 +00:00
prclocks_t Sys_GetClockRate ( void ) { return 1 ; }
2016-07-12 00:40:13 +00:00
# endif
2004-09-07 18:16:59 +00:00
//=============================================================================
/*
= = = = = = = = = = = = = = = = =
PR_PrintStatement
= = = = = = = = = = = = = = = = =
*/
2012-07-05 19:42:36 +00:00
static void PR_PrintStatement ( progfuncs_t * progfuncs , int statementnum )
2004-09-07 18:16:59 +00:00
{
2012-07-05 19:42:36 +00:00
unsigned int op ;
unsigned int arg [ 3 ] ;
switch ( current_progstate - > structtype )
{
2013-08-21 08:06:35 +00:00
default :
2012-07-05 19:42:36 +00:00
case PST_DEFAULT :
case PST_QTEST :
op = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > op ;
arg [ 0 ] = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > a ;
arg [ 1 ] = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > b ;
arg [ 2 ] = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > c ;
break ;
case PST_KKQWSV :
case PST_FTE32 :
op = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > op ;
arg [ 0 ] = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > a ;
arg [ 1 ] = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > b ;
arg [ 2 ] = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > c ;
break ;
}
2013-04-02 05:18:17 +00:00
# if !defined(MINIMAL) && !defined(OMIT_QCC)
2020-04-29 10:43:22 +00:00
# define TYPEHINT(a) (pr_opcodes[op].type_##a)
2012-07-05 19:42:36 +00:00
if ( ( unsigned ) op < OP_NUMOPS )
2004-09-07 18:16:59 +00:00
{
2012-11-27 06:06:25 +00:00
int i ;
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s " , pr_opcodes [ op ] . name ) ;
2012-07-05 19:42:36 +00:00
i = strlen ( pr_opcodes [ op ] . name ) ;
2004-09-07 18:16:59 +00:00
for ( ; i < 10 ; i + + )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " " ) ;
2004-09-07 18:16:59 +00:00
}
2012-07-05 19:42:36 +00:00
else
# endif
2018-10-11 10:31:23 +00:00
externs - > Printf ( " op%3i " , op ) ;
2010-12-08 14:42:05 +00:00
2020-04-29 10:43:22 +00:00
# ifndef TYPEHINT
# define TYPEHINT(a) NULL
# endif
2012-07-05 19:42:36 +00:00
if ( op = = OP_IF_F | | op = = OP_IFNOT_F )
2020-04-29 10:43:22 +00:00
externs - > Printf ( " %sbranch %i " , PR_GlobalString ( progfuncs , arg [ 0 ] , TYPEHINT ( a ) ) , arg [ 1 ] ) ;
2012-07-05 19:42:36 +00:00
else if ( op = = OP_GOTO )
2004-09-07 18:16:59 +00:00
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " branch %i " , arg [ 0 ] ) ;
2004-09-07 18:16:59 +00:00
}
2012-07-05 19:42:36 +00:00
else if ( ( unsigned ) ( op - OP_STORE_F ) < 6 )
2004-09-07 18:16:59 +00:00
{
2020-04-29 10:43:22 +00:00
externs - > Printf ( " %s " , PR_GlobalString ( progfuncs , arg [ 0 ] , TYPEHINT ( a ) ) ) ;
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s " , PR_GlobalStringNoContents ( progfuncs , arg [ 1 ] ) ) ;
2004-09-07 18:16:59 +00:00
}
else
{
2012-07-05 19:42:36 +00:00
if ( arg [ 0 ] )
2020-04-29 10:43:22 +00:00
externs - > Printf ( " %s " , PR_GlobalString ( progfuncs , arg [ 0 ] , TYPEHINT ( a ) ) ) ;
2012-07-05 19:42:36 +00:00
if ( arg [ 1 ] )
2020-04-29 10:43:22 +00:00
externs - > Printf ( " %s " , PR_GlobalString ( progfuncs , arg [ 1 ] , TYPEHINT ( b ) ) ) ;
2012-07-05 19:42:36 +00:00
if ( arg [ 2 ] )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s " , PR_GlobalStringNoContents ( progfuncs , arg [ 2 ] ) ) ;
2004-09-07 18:16:59 +00:00
}
2018-10-11 10:31:23 +00:00
externs - > Printf ( " \n " ) ;
2004-09-07 18:16:59 +00:00
}
2012-11-27 03:23:19 +00:00
# ifdef _WIN32
static void VARGS QC_snprintfz ( char * dest , size_t size , const char * fmt , . . . )
{
va_list args ;
va_start ( args , fmt ) ;
2016-08-25 00:12:14 +00:00
_vsnprintf ( dest , size - 1 , fmt , args ) ;
2012-11-27 03:23:19 +00:00
va_end ( args ) ;
//make sure its terminated.
dest [ size - 1 ] = 0 ;
}
# else
# define QC_snprintfz snprintf
# 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
void PDECL PR_GenerateStatementString ( pubprogfuncs_t * ppf , int statementnum , char * out , int outlen )
2012-11-27 03:23: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
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2012-11-27 03:23:19 +00:00
unsigned int op ;
unsigned int arg [ 3 ] ;
* out = 0 ;
outlen - - ;
2019-01-29 07:18:07 +00:00
if ( ( unsigned ) statementnum > = current_progstate - > progs - > numstatements )
return ;
2012-11-27 03:23:19 +00:00
switch ( current_progstate - > structtype )
{
case PST_DEFAULT :
case PST_QTEST :
op = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > op ;
arg [ 0 ] = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > a ;
arg [ 1 ] = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > b ;
arg [ 2 ] = ( ( dstatement16_t * ) current_progstate - > statements + statementnum ) - > c ;
break ;
case PST_KKQWSV :
case PST_FTE32 :
op = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > op ;
arg [ 0 ] = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > a ;
arg [ 1 ] = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > b ;
arg [ 2 ] = ( ( dstatement32_t * ) current_progstate - > statements + statementnum ) - > c ;
break ;
2013-03-12 22:47:42 +00:00
default :
return ;
2012-11-27 03:23:19 +00:00
}
2015-04-14 12:24:05 +00:00
op = op & ~ 0x8000 ; //break points.
2012-11-27 03:23:19 +00:00
if ( current_progstate - > linenums )
{
QC_snprintfz ( out , outlen , " %3i: " , current_progstate - > linenums [ statementnum ] ) ;
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
else
{
QC_snprintfz ( out , outlen , " %3i: " , statementnum ) ;
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
2013-04-02 05:18:17 +00:00
# if !defined(MINIMAL) && !defined(OMIT_QCC)
2012-11-27 03:23:19 +00:00
if ( ( unsigned ) op < OP_NUMOPS )
{
2013-09-26 14:36:52 +00:00
QC_snprintfz ( out , outlen , " %-12s " , pr_opcodes [ op ] . opname ) ;
2012-11-27 03:23:19 +00:00
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
else
# endif
{
QC_snprintfz ( out , outlen , " op%3i " , op ) ;
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
2013-09-26 14:36:52 +00:00
if ( op = = OP_IF_F | | op = = OP_IFNOT_F | | op = = OP_IF_I | | op = = OP_IFNOT_I | | op = = OP_IF_S | | op = = OP_IFNOT_S )
2012-11-27 03:23:19 +00:00
{
2020-04-29 10:43:22 +00:00
QC_snprintfz ( out , outlen , " %sbranch %i(%+i) " , PR_GlobalString ( progfuncs , arg [ 0 ] , TYPEHINT ( a ) ) , ( short ) arg [ 1 ] , statementnum + ( short ) arg [ 0 ] ) ;
2012-11-27 03:23:19 +00:00
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
else if ( op = = OP_GOTO )
{
2020-04-29 10:43:22 +00:00
QC_snprintfz ( out , outlen , " branch %i(%+i) " , ( short ) arg [ 0 ] , statementnum + ( short ) arg [ 0 ] ) ;
2012-11-27 03:23:19 +00:00
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
else if ( ( unsigned ) ( op - OP_STORE_F ) < 6 )
{
2020-04-29 10:43:22 +00:00
QC_snprintfz ( out , outlen , " %s " , PR_GlobalString ( progfuncs , arg [ 0 ] , TYPEHINT ( a ) ) ) ;
2012-11-27 03:23:19 +00:00
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
QC_snprintfz ( out , outlen , " %s " , PR_GlobalStringNoContents ( progfuncs , arg [ 1 ] ) ) ;
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
else
{
if ( arg [ 0 ] )
{
2020-04-29 10:43:22 +00:00
QC_snprintfz ( out , outlen , " %s " , PR_GlobalString ( progfuncs , arg [ 0 ] , TYPEHINT ( a ) ) ) ;
2012-11-27 03:23:19 +00:00
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
if ( arg [ 1 ] )
{
2020-04-29 10:43:22 +00:00
QC_snprintfz ( out , outlen , " %s " , PR_GlobalString ( progfuncs , arg [ 1 ] , TYPEHINT ( b ) ) ) ;
2012-11-27 03:23:19 +00:00
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
if ( arg [ 2 ] )
{
QC_snprintfz ( out , outlen , " %s " , PR_GlobalStringNoContents ( progfuncs , arg [ 2 ] ) ) ;
outlen - = strlen ( out ) ;
out + = strlen ( out ) ;
}
}
QC_snprintfz ( out , outlen , " \n " ) ;
outlen - = 1 ;
out + = 1 ;
}
2004-09-07 18:16:59 +00:00
/*
= = = = = = = = = = = =
PR_StackTrace
= = = = = = = = = = = =
*/
2014-05-30 03:57:30 +00:00
static void PDECL PR_PrintRelevantLocals ( progfuncs_t * progfuncs )
{
//scan for op_address/op_load instructions within the function
int st , st2 ;
int op ;
dstatement16_t * st16 = current_progstate - > statements ;
int line ;
if ( ! current_progstate - > linenums | | current_progstate - > structtype ! = PST_DEFAULT )
return ;
2019-12-10 14:50:47 +00:00
line = current_progstate - > linenums [ prinst . pr_xstatement ] ;
2020-01-09 15:35:40 +00:00
for ( st = prinst . pr_xfunction - > first_statement ; st16 [ st ] . op ! = OP_DONE ; st + + )
2014-05-30 03:57:30 +00:00
{
if ( current_progstate - > linenums [ st ] < line - 2 | | current_progstate - > linenums [ st ] > line + 2 )
continue ; //don't go crazy with this.
op = st16 [ st ] . op & ~ 0x8000 ;
if ( op = = OP_ADDRESS | | ( op > = OP_LOAD_F & & op < = OP_LOAD_FNC ) | | op = = OP_LOAD_I | | op = = OP_LOAD_P )
{
ddef16_t * ent = ED_GlobalAtOfs16 ( progfuncs , st16 [ st ] . a ) ;
ddef16_t * fld = ED_GlobalAtOfs16 ( progfuncs , st16 [ st ] . b ) ;
pbool skip = false ;
edictrun_t * ed ;
2015-04-14 12:24:05 +00:00
unsigned int entnum ;
2014-05-30 03:57:30 +00:00
eval_t * ptr ;
fdef_t * fdef ;
fdef_t * cnfd ;
2014-08-15 02:20:41 +00:00
const char * classname ;
2014-05-30 03:57:30 +00:00
if ( ! ent | | ! fld )
continue ;
//all this extra code to avoid printing dupes...
2020-01-09 15:35:40 +00:00
for ( st2 = st - 1 ; st2 > = prinst . pr_xfunction - > first_statement ; st2 - - )
2014-05-30 03:57:30 +00:00
{
if ( current_progstate - > linenums [ st2 ] < line - 2 | | current_progstate - > linenums [ st2 ] > line + 2 )
continue ;
op = st16 [ st2 ] . op & ~ 0x8000 ;
if ( op = = OP_ADDRESS | | ( op > = OP_LOAD_F & & op < = OP_LOAD_FNC ) | | op = = OP_LOAD_I | | op = = OP_LOAD_P )
if ( st16 [ st ] . a = = st16 [ st2 ] . a & & st16 [ st ] . b = = st16 [ st2 ] . b )
{
skip = true ;
break ;
}
}
if ( skip )
continue ;
2015-04-14 12:24:05 +00:00
entnum = ( ( eval_t * ) & pr_globals [ st16 [ st ] . a ] ) - > edict ;
if ( entnum > = sv_num_edicts )
2014-05-30 03:57:30 +00:00
{
2015-04-14 12:24:05 +00:00
classname = " INVALID " ;
2016-07-12 00:40:13 +00:00
continue ;
2014-05-30 03:57:30 +00:00
}
else
2015-04-14 12:24:05 +00:00
{
2018-04-06 17:21:15 +00:00
ed = PROG_TO_EDICT_PB ( progfuncs , entnum ) ;
2016-07-12 00:40:13 +00:00
if ( ( unsigned int ) ( ( eval_t * ) & pr_globals [ st16 [ st ] . b ] ) - > _int * 4u > = ed - > fieldsize )
continue ;
else
ptr = ( eval_t * ) ( ( ( int * ) edvars ( ed ) ) + ( ( eval_t * ) & pr_globals [ st16 [ st ] . b ] ) - > _int + progfuncs - > funcs . fieldadjust ) ;
2015-04-14 12:24:05 +00:00
cnfd = ED_FindField ( progfuncs , " classname " ) ;
if ( cnfd )
{
string_t * v = ( string_t * ) ( ( char * ) edvars ( ed ) + cnfd - > ofs * 4 ) ;
classname = PR_StringToNative ( & progfuncs - > funcs , * v ) ;
}
else
classname = " " ;
}
2014-05-30 03:57:30 +00:00
if ( * classname )
fdef = ED_ClassFieldAtOfs ( progfuncs , ( ( eval_t * ) & pr_globals [ st16 [ st ] . b ] ) - > _int , classname ) ;
else
fdef = ED_FieldAtOfs ( progfuncs , ( ( eval_t * ) & pr_globals [ st16 [ st ] . b ] ) - > _int ) ;
if ( fdef )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s.%s: %s \n " , PR_StringToNative ( & progfuncs - > funcs , ent - > s_name ) , PR_StringToNative ( & progfuncs - > funcs , fld - > s_name ) , PR_ValueString ( progfuncs , fdef - > type , ptr , false ) ) ;
2014-05-30 03:57:30 +00:00
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %s.%s: BAD FIELD DEF - %#x \n " , PR_StringToNative ( & progfuncs - > funcs , ent - > s_name ) , PR_StringToNative ( & progfuncs - > funcs , fld - > s_name ) , ptr - > _int ) ;
2014-05-30 03:57:30 +00:00
}
}
}
void PDECL PR_StackTrace ( pubprogfuncs_t * ppf , int showlocals )
2004-09-07 18:16:59 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2014-08-03 14:47:47 +00:00
const mfunction_t * f ;
2018-08-04 15:12:51 +00:00
int prnum ;
int i , st ;
2004-09-07 18:16:59 +00:00
int progs ;
2017-08-14 16:38:44 +00:00
int ofs ;
2004-09-07 18:16:59 +00:00
int * globalbase ;
2015-04-14 12:24:05 +00:00
int tracing = progfuncs - > funcs . debug_trace ;
2004-09-07 18:16:59 +00:00
progs = - 1 ;
2010-12-08 14:42:05 +00:00
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth = = 0 )
2004-09-07 18:16:59 +00:00
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " <NO STACK> \n " ) ;
2004-09-07 18:16:59 +00:00
return ;
}
2010-12-08 14:42:05 +00:00
2019-03-12 05:04:27 +00:00
progfuncs - > funcs . debug_trace = - 10 ; //PR_StringToNative(+via PR_ValueString) has various error conditions that we want to mute instead of causing recursive errors.
2015-04-14 12:24:05 +00:00
2014-05-30 03:57:30 +00:00
//point this to the function's locals
2020-01-09 15:35:40 +00:00
globalbase = ( int * ) pr_globals + prinst . pr_xfunction - > parm_start + prinst . pr_xfunction - > locals ;
2004-09-07 18:16:59 +00:00
2019-12-10 14:50:47 +00:00
for ( i = prinst . pr_depth ; i > 0 ; i - - )
2004-09-07 18:16:59 +00:00
{
2019-12-10 14:50:47 +00:00
if ( i = = prinst . pr_depth )
2018-08-04 15:12:51 +00:00
{
2020-01-09 15:35:40 +00:00
f = prinst . pr_xfunction ;
2019-12-10 14:50:47 +00:00
st = prinst . pr_xstatement ;
2018-08-04 15:12:51 +00:00
prnum = prinst . pr_typecurrent ;
}
else
{
2019-12-10 14:50:47 +00:00
f = prinst . pr_stack [ i ] . f ;
st = prinst . pr_stack [ i ] . s ;
prnum = prinst . pr_stack [ i ] . progsnum ;
2018-08-04 15:12:51 +00:00
}
2010-12-08 14:42:05 +00:00
2004-09-07 18:16:59 +00:00
if ( ! f )
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " <NO FUNCTION> \n " ) ;
2004-09-07 18:16:59 +00:00
}
else
{
2014-05-30 03:57:30 +00:00
globalbase - = f - > locals ;
2018-08-04 15:12:51 +00:00
if ( prnum ! = progs )
2004-09-07 18:16:59 +00:00
{
2018-08-04 15:12:51 +00:00
progs = prnum ;
2004-09-07 18:16:59 +00:00
2019-03-12 05:04:27 +00:00
externs - > DPrintf ( " <%s> \n " , pr_progstate [ progs ] . filename ) ;
2004-09-07 18:16:59 +00:00
}
2005-05-15 18:49:04 +00:00
if ( ! f - > s_file )
2019-03-12 05:04:27 +00:00
externs - > Printf ( " unknown-file : %s \n " , PR_StringToNative ( ppf , f - > s_name ) ) ;
2004-09-07 18:16:59 +00:00
else
2008-12-06 02:08:07 +00:00
{
if ( pr_progstate [ progs ] . linenums )
2018-10-11 10:31:23 +00:00
externs - > Printf ( " %12s:%i: %s \n " , PR_StringToNative ( ppf , f - > s_file ) , pr_progstate [ progs ] . linenums [ st ] , PR_StringToNative ( ppf , f - > s_name ) ) ;
2008-12-06 02:08:07 +00:00
else
2019-03-12 05:04:27 +00:00
externs - > Printf ( " %12s : %s+%i \n " , PR_StringToNative ( ppf , f - > s_file ) , PR_StringToNative ( ppf , f - > s_name ) , st - f - > first_statement ) ;
2008-12-06 02:08:07 +00:00
}
2004-09-07 18:16:59 +00:00
2014-05-30 03:57:30 +00:00
//locals:0 = no locals
//locals:1 = top only
//locals:2 = ALL locals.
2019-12-10 14:50:47 +00:00
if ( ( i = = prinst . pr_depth & & showlocals = = 1 ) | | showlocals > = 2 )
2004-09-07 18:16:59 +00:00
{
2017-08-14 16:38:44 +00:00
for ( ofs = 0 ; ofs < f - > locals ; ofs + + )
2004-09-07 18:16:59 +00:00
{
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
ddef16_t * local ;
2017-08-14 16:38:44 +00:00
local = ED_GlobalAtOfs16 ( progfuncs , f - > parm_start + ofs ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( ! local )
{
2017-08-14 16:38:44 +00:00
int arg , aofs ;
for ( arg = 0 , aofs = 0 ; arg < f - > numparms ; arg + + )
{
if ( ofs > = aofs & & ofs < aofs + f - > parm_size [ arg ] )
break ;
aofs + = f - > parm_size [ arg ] ;
}
if ( arg < f - > numparms )
{
if ( f - > parm_size [ arg ] = = 3 )
{ //looks like a vector. print it as such
2018-10-11 10:31:23 +00:00
externs - > Printf ( " arg%i(%i): [%g, %g, %g] \n " , arg , f - > parm_start + ofs , * ( float * ) ( globalbase + ofs ) , * ( float * ) ( globalbase + ofs + 1 ) , * ( float * ) ( globalbase + ofs + 2 ) ) ;
2017-08-14 16:38:44 +00:00
ofs + = 2 ;
}
else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " arg%i(%i): %g===%i \n " , arg , f - > parm_start + ofs , * ( float * ) ( globalbase + ofs ) , * ( int * ) ( globalbase + ofs ) ) ;
2017-08-14 16:38:44 +00:00
}
else
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " unk(%i): %g===%i \n " , f - > parm_start + ofs , * ( float * ) ( globalbase + ofs ) , * ( int * ) ( globalbase + ofs ) ) ;
2017-08-14 16:38:44 +00:00
}
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
else
{
2019-03-12 05:04:27 +00:00
externs - > Printf ( " %s: %s \n " , PR_StringToNative ( ppf , local - > s_name ) , PR_ValueString ( progfuncs , local - > type , ( eval_t * ) ( globalbase + ofs ) , false ) ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( local - > type = = ev_vector )
2017-08-14 16:38:44 +00:00
ofs + = 2 ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
2004-09-07 18:16:59 +00:00
}
}
2019-12-10 14:50:47 +00:00
if ( i = = prinst . pr_depth )
2014-05-30 03:57:30 +00:00
{ //scan for op_address/op_load instructions within the function
PR_PrintRelevantLocals ( progfuncs ) ;
}
2004-09-07 18:16:59 +00:00
2019-12-10 14:50:47 +00:00
if ( i = = prinst . pr_depth )
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
globalbase = prinst . localstack + prinst . localstack_used ;
2004-09-07 18:16:59 +00:00
}
}
2015-04-14 12:24:05 +00:00
progfuncs - > funcs . debug_trace = tracing ;
2004-09-07 18:16:59 +00:00
}
/*
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
PR_ExecuteProgram
The interpretation main loop
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
*/
/*
= = = = = = = = = = = = = = = = = = = =
PR_EnterFunction
Returns the new program statement counter
= = = = = = = = = = = = = = = = = = = =
*/
2020-10-26 06:30:35 +00:00
static int ASMCALL PR_EnterFunction ( progfuncs_t * progfuncs , mfunction_t * f , int progsnum )
2004-09-07 18:16:59 +00:00
{
int i , j , c , o ;
2018-01-22 19:18:04 +00:00
prstack_t * st ;
2004-09-07 18:16:59 +00:00
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth = = MAX_STACK_DEPTH )
2004-09-07 18:16:59 +00:00
{
2014-05-30 03:57:30 +00:00
PR_StackTrace ( & progfuncs - > funcs , false ) ;
2004-12-08 04:14:52 +00:00
2019-12-10 14:50:47 +00:00
externs - > Printf ( " stack overflow on call to %s (depth %i) \n " , progfuncs - > funcs . stringtable + f - > s_name , prinst . pr_depth ) ;
2004-12-08 04:14:52 +00:00
//comment this out if you want the progs to try to continue anyway (could cause infinate loops)
------------------------------------------------------------------------
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_AbortStack ( & progfuncs - > funcs ) ;
externs - > Abort ( " Stack Overflow in %s \n " , progfuncs - > funcs . stringtable + f - > s_name ) ;
2019-12-10 14:50:47 +00:00
return prinst . pr_xstatement ;
2004-09-07 18:16:59 +00:00
}
2019-12-10 14:50:47 +00:00
st = & prinst . pr_stack [ prinst . pr_depth + + ] ;
st - > s = prinst . pr_xstatement ;
2020-01-09 15:35:40 +00:00
st - > f = prinst . pr_xfunction ;
2018-01-22 19:18:04 +00:00
st - > progsnum = progsnum ;
st - > pushed = prinst . spushed ;
st - > stepping = progfuncs - > funcs . debug_trace ;
if ( progfuncs - > funcs . debug_trace = = DEBUG_TRACE_OVER )
progfuncs - > funcs . debug_trace = DEBUG_TRACE_OFF ;
if ( prinst . profiling )
{
st - > timestamp = Sys_GetClock ( ) ;
}
2004-09-07 18:16:59 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
prinst . localstack_used + = prinst . spushed ; //make sure the call doesn't hurt pushed pointers
2005-02-28 07:16:19 +00:00
2004-09-07 18:16:59 +00:00
// save off any locals that the new function steps on (to a side place, fromwhere they are restored on exit)
c = f - > locals ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( prinst . localstack_used + c > LOCALSTACK_SIZE )
2005-06-14 04:52:10 +00:00
{
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
prinst . localstack_used - = prinst . spushed ;
2019-12-10 14:50:47 +00:00
prinst . pr_depth - - ;
------------------------------------------------------------------------
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_RunError ( & progfuncs - > funcs , " PR_ExecuteProgram: locals stack overflow \n " ) ;
2005-06-14 04:52:10 +00:00
}
2004-09-07 18:16:59 +00:00
for ( i = 0 ; i < c ; i + + )
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
prinst . localstack [ prinst . localstack_used + i ] = ( ( int * ) pr_globals ) [ f - > parm_start + i ] ;
prinst . localstack_used + = c ;
2004-09-07 18:16:59 +00:00
// copy parameters (set initial values)
o = f - > parm_start ;
for ( i = 0 ; i < f - > numparms ; i + + )
{
for ( j = 0 ; j < f - > parm_size [ i ] ; j + + )
{
( ( int * ) pr_globals ) [ o ] = ( ( int * ) pr_globals ) [ OFS_PARM0 + i * 3 + j ] ;
o + + ;
}
}
2020-01-09 15:35:40 +00:00
prinst . pr_xfunction = f ;
2004-09-07 18:16:59 +00:00
return f - > first_statement - 1 ; // offset the s++
}
/*
= = = = = = = = = = = = = = = = = = = =
PR_LeaveFunction
= = = = = = = = = = = = = = = = = = = =
*/
2020-10-26 06:30:35 +00:00
static int ASMCALL PR_LeaveFunction ( progfuncs_t * progfuncs )
2004-09-07 18:16:59 +00:00
{
int i , c ;
2018-01-22 19:18:04 +00:00
prstack_t * st ;
2004-09-07 18:16:59 +00:00
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth < = 0 )
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " prog stack underflow " ) ;
2004-09-07 18:16:59 +00:00
2018-01-22 19:18:04 +00:00
// up stack
2019-12-10 14:50:47 +00:00
st = & prinst . pr_stack [ - - prinst . pr_depth ] ;
2018-01-22 19:18:04 +00:00
2004-09-07 18:16:59 +00:00
// restore locals from the stack
2020-01-09 15:35:40 +00:00
c = prinst . pr_xfunction - > locals ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
prinst . localstack_used - = c ;
if ( prinst . localstack_used < 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_RunError ( & progfuncs - > funcs , " PR_ExecuteProgram: locals stack underflow \n " ) ;
2004-09-07 18:16:59 +00:00
for ( i = 0 ; i < c ; i + + )
2020-01-09 15:35:40 +00:00
( ( int * ) pr_globals ) [ prinst . pr_xfunction - > parm_start + i ] = prinst . localstack [ prinst . localstack_used + i ] ;
2004-09-07 18:16:59 +00:00
2018-01-22 19:18:04 +00:00
PR_SwitchProgsParms ( progfuncs , st - > progsnum ) ;
prinst . spushed = st - > pushed ;
2005-02-28 07:16:19 +00:00
2015-02-02 08:01:53 +00:00
if ( ! progfuncs - > funcs . debug_trace )
2018-01-22 19:18:04 +00:00
progfuncs - > funcs . debug_trace = st - > stepping ;
2015-02-02 08:01:53 +00:00
2014-08-03 14:47:47 +00:00
if ( prinst . profiling )
{
2016-08-25 00:12:14 +00:00
prclocks_t cycles ;
2018-01-22 19:18:04 +00:00
cycles = Sys_GetClock ( ) - st - > timestamp ;
2016-07-12 00:40:13 +00:00
if ( cycles > prinst . profilingalert )
2020-01-09 15:35:40 +00:00
externs - > Printf ( " QC call to %s took over a second \n " , PR_StringToNative ( & progfuncs - > funcs , prinst . pr_xfunction - > s_name ) ) ;
prinst . pr_xfunction - > profiletime + = cycles ;
prinst . pr_xfunction = st - > f ;
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth )
2020-01-09 15:35:40 +00:00
prinst . pr_xfunction - > profilechildtime + = cycles ;
2014-08-03 14:47:47 +00:00
}
else
2020-01-09 15:35:40 +00:00
prinst . pr_xfunction = st - > f ;
2014-08-03 14:47:47 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
prinst . localstack_used - = prinst . spushed ;
2018-01-22 19:18:04 +00:00
return st - > s ;
2004-09-07 18:16:59 +00:00
}
2018-10-11 10:31:23 +00:00
ddef32_t * ED_FindLocalOrGlobal ( progfuncs_t * progfuncs , const char * name , eval_t * * val )
2004-09-07 18:16:59 +00:00
{
static ddef32_t def ;
ddef32_t * def32 ;
ddef16_t * def16 ;
int i ;
2018-10-11 10:31:23 +00:00
progstate_t * cp = current_progstate ;
2004-09-07 18:16:59 +00:00
2018-10-11 10:31:23 +00:00
if ( ! cp )
2011-12-05 15:23:40 +00:00
return NULL ;
2018-10-11 10:31:23 +00:00
switch ( cp - > structtype )
2004-09-07 18:16:59 +00:00
{
2011-03-04 13:59:06 +00:00
case PST_DEFAULT :
case PST_KKQWSV :
2004-09-07 18:16:59 +00:00
//this gets parms fine, but not locals
2020-01-09 15:35:40 +00:00
if ( prinst . pr_xfunction )
for ( i = 0 ; i < prinst . pr_xfunction - > locals ; i + + )
2004-09-07 18:16:59 +00:00
{
2020-01-09 15:35:40 +00:00
def16 = ED_GlobalAtOfs16 ( progfuncs , prinst . pr_xfunction - > parm_start + i ) ;
2004-09-07 18:16:59 +00:00
if ( ! def16 )
continue ;
------------------------------------------------------------------------
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 ( ! strcmp ( def16 - > s_name + progfuncs - > funcs . stringtable , name ) )
2004-09-07 18:16:59 +00:00
{
2020-01-09 15:35:40 +00:00
* val = ( eval_t * ) & cp - > globals [ prinst . pr_xfunction - > parm_start + i ] ;
2004-09-07 18:16:59 +00:00
//we need something like this for functions that are not the top layer
// *val = (eval_t *)&localstack[localstack_used-pr_xfunction->numparms*4];
def . ofs = def16 - > ofs ;
def . s_name = def16 - > s_name ;
def . type = def16 - > type ;
return & def ;
}
}
def16 = ED_FindGlobal16 ( progfuncs , name ) ;
if ( ! def16 )
return NULL ;
def . ofs = def16 - > ofs ;
def . type = def16 - > type ;
def . s_name = def16 - > s_name ;
def32 = & def ;
break ;
2011-03-04 13:59:06 +00:00
case PST_QTEST :
case PST_FTE32 :
2004-09-07 18:16:59 +00:00
//this gets parms fine, but not locals
2020-01-09 15:35:40 +00:00
if ( prinst . pr_xfunction )
for ( i = 0 ; i < prinst . pr_xfunction - > numparms ; i + + )
2004-09-07 18:16:59 +00:00
{
2020-01-09 15:35:40 +00:00
def32 = ED_GlobalAtOfs32 ( progfuncs , prinst . pr_xfunction - > parm_start + i ) ;
2004-09-07 18:16:59 +00:00
if ( ! def32 )
continue ;
------------------------------------------------------------------------
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 ( ! strcmp ( def32 - > s_name + progfuncs - > funcs . stringtable , name ) )
2004-09-07 18:16:59 +00:00
{
2020-01-09 15:35:40 +00:00
* val = ( eval_t * ) & cp - > globals [ prinst . pr_xfunction - > parm_start + i ] ;
2004-09-07 18:16:59 +00:00
//we need something like this for functions that are not the top layer
// *val = (eval_t *)&localstack[localstack_used-pr_xfunction->numparms*4];
return def32 ;
}
}
def32 = ED_FindGlobal32 ( progfuncs , name ) ;
if ( ! def32 )
return NULL ;
break ;
default :
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " Bad struct type in ED_FindLocalOrGlobal " ) ;
2004-09-07 18:16:59 +00:00
def32 = NULL ;
}
2010-12-08 14:42:05 +00:00
2018-10-11 10:31:23 +00:00
* val = ( eval_t * ) & cp - > globals [ def32 - > ofs ] ;
2004-09-07 18:16:59 +00:00
return & def ;
}
2023-01-09 05:14:57 +00:00
static char * TrimString ( const char * str , char * buffer , int buffersize )
2004-09-07 18:16:59 +00:00
{
int i ;
while ( * str < = ' ' & & * str > ' \0 ' )
str + + ;
2014-10-05 20:04:11 +00:00
for ( i = 0 ; i < buffersize - 1 ; i + + )
2004-09-07 18:16:59 +00:00
{
if ( * str < = ' ' )
break ;
buffer [ i ] = * str + + ;
}
buffer [ i ] = ' \0 ' ;
return buffer ;
}
2018-10-11 10:31:23 +00:00
pbool LocateDebugTerm ( progfuncs_t * progfuncs , const char * key , eval_t * * result , etype_t * rettype , eval_t * store )
2012-11-27 03:23:19 +00:00
{
ddef32_t * def ;
fdef_t * fdef ;
2013-07-29 17:34:19 +00:00
int fofs ;
eval_t * val = NULL , * fval = NULL ;
2012-11-27 03:23:19 +00:00
char * c , * c2 ;
etype_t type = ev_void ;
struct edictrun_s * ed ;
2016-02-15 06:01:17 +00:00
// etype_t ptrtype = ev_void;
2012-11-27 03:23:19 +00:00
c = strchr ( key , ' . ' ) ;
if ( c ) * c = ' \0 ' ;
def = ED_FindLocalOrGlobal ( progfuncs , key , & val ) ;
if ( ! def )
{
if ( * key = = ' \' ' )
{
type = ev_vector ;
val = store ;
val - > _vector [ 0 ] = 0 ;
val - > _vector [ 1 ] = 0 ;
val - > _vector [ 2 ] = 0 ;
}
else if ( * key = = ' \" ' )
{
type = ev_string ;
val = store ;
val - > string = 0 ;
}
else if ( atoi ( key ) )
{
type = ev_entity ;
val = store ;
val - > edict = atoi ( key ) ;
}
}
else
type = def - > type ;
if ( c ) * c = ' . ' ;
if ( ! val )
{
return false ;
}
//go through ent vars
c = strchr ( key , ' . ' ) ;
while ( c )
{
c2 = c + 1 ;
c = strchr ( c2 , ' . ' ) ;
type = type & ~ DEF_SAVEGLOBAL ;
if ( current_progstate & & current_progstate - > types )
type = current_progstate - > types [ type ] . type ;
if ( type ! = ev_entity )
return false ;
if ( c ) * c = ' \0 ' ;
2013-07-29 17:34:19 +00:00
2013-10-08 14:28:11 +00:00
fdef = ED_FindField ( progfuncs , c2 ) ;
if ( ! fdef )
2013-07-29 17:34:19 +00:00
{
2014-10-05 20:04:11 +00:00
char trimmed [ 256 ] ;
2023-01-09 05:14:57 +00:00
c2 = TrimString ( c2 , trimmed , sizeof ( trimmed ) ) ;
2013-10-08 14:28:11 +00:00
def = ED_FindLocalOrGlobal ( progfuncs , c2 , & fval ) ;
if ( def & & def - > type = = ev_field )
{
fofs = fval - > _int + progfuncs - > funcs . fieldadjust ;
fdef = ED_FieldAtOfs ( progfuncs , fofs ) ;
}
2013-07-29 17:34:19 +00:00
}
2013-08-21 06:55:54 +00:00
if ( c ) * c = ' . ' ;
if ( ! fdef )
return false ;
fofs = fdef - > ofs ;
type = fdef - > type ;
2018-04-06 17:21:15 +00:00
if ( ( unsigned int ) val - > _int > = prinst . maxedicts )
ed = NULL ;
else
ed = PROG_TO_EDICT_PB ( progfuncs , val - > _int ) ;
2012-11-27 03:23:19 +00:00
if ( ! ed )
return false ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( fofs < 0 | | fofs > = ( int ) prinst . max_fields_size )
2013-07-29 17:34:19 +00:00
return false ;
val = ( eval_t * ) ( ( ( char * ) ed - > fields ) + fofs * 4 ) ;
2012-11-27 03:23:19 +00:00
}
* rettype = type ;
* result = val ;
return true ;
}
2018-10-11 10:31:23 +00:00
pbool PDECL PR_SetWatchPoint ( pubprogfuncs_t * ppf , const char * key )
2012-11-27 03:23: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
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2012-11-27 03:23:19 +00:00
eval_t * val ;
eval_t fakeval ;
etype_t type ;
if ( ! key )
{
------------------------------------------------------------------------
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
free ( prinst . watch_name ) ;
prinst . watch_name = NULL ;
prinst . watch_ptr = NULL ;
prinst . watch_type = ev_void ;
2012-11-27 03:23:19 +00:00
return false ;
}
if ( ! LocateDebugTerm ( progfuncs , key , & val , & type , & fakeval ) )
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Unable to evaluate watch term \" %s \" \n " , key ) ;
2012-11-27 03:23:19 +00:00
return false ;
}
if ( val = = & fakeval )
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Do you like watching paint dry? \n " ) ;
2012-11-27 03:23:19 +00:00
return false ;
}
if ( type = = ev_vector )
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Unable to watch vectors. Watching the x field instead. \n " ) ;
2012-11-27 03:23:19 +00:00
type = ev_float ;
}
------------------------------------------------------------------------
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
free ( prinst . watch_name ) ;
prinst . watch_name = strdup ( key ) ;
prinst . watch_ptr = val ;
prinst . watch_old = * prinst . watch_ptr ;
2017-08-14 16:38:44 +00:00
prinst . watch_type = type & ~ DEF_SAVEGLOBAL ;
2012-11-27 03:23:19 +00:00
return true ;
}
2018-10-11 10:31:23 +00:00
static const char * PR_ParseCast ( const char * key , etype_t * t , pbool * isptr )
2015-07-30 16:26:15 +00:00
{
extern char * basictypenames [ ] ;
int type ;
* t = ev_void ;
* isptr = false ;
while ( * key = = ' ' )
key + + ;
if ( * key = = ' ( ' )
{
key + + ;
2020-09-08 04:44:07 +00:00
for ( type = 0 ; type < = ev_variant ; type + + )
2015-07-30 16:26:15 +00:00
{
if ( ! strncmp ( key , basictypenames [ type ] , strlen ( basictypenames [ type ] ) ) )
{
key + = strlen ( basictypenames [ type ] ) ;
while ( * key = = ' ' )
key + + ;
if ( * key = = ' * ' )
{
* isptr = true ;
key + + ;
}
* t = type ;
break ;
}
}
2020-09-08 04:44:07 +00:00
if ( type > ev_variant )
2015-07-30 16:26:15 +00:00
return NULL ;
while ( * key = = ' ' )
key + + ;
if ( * key + + ! = ' ) ' )
return NULL ;
}
return key ;
}
2018-10-11 10:31:23 +00:00
char * PDECL PR_EvaluateDebugString ( pubprogfuncs_t * ppf , const char * key )
2004-09-07 18:16:59 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2013-09-26 14:36:52 +00:00
static char buf [ 8192 ] ;
2004-09-07 18:16:59 +00:00
fdef_t * fdef ;
eval_t * val ;
char * assignment ;
2012-11-27 03:23:19 +00:00
etype_t type ;
2007-06-19 23:55:04 +00:00
eval_t fakeval ;
2015-07-30 16:26:15 +00:00
extern char * basictypenames [ ] ;
2004-09-07 18:16:59 +00:00
2015-07-30 16:26:15 +00:00
if ( * key = = ' * ' )
{
int ptr ;
eval_t v ;
etype_t cast ;
pbool isptr ;
type = ev_void ;
key = PR_ParseCast ( key + 1 , & cast , & isptr ) ;
if ( ! key | | ! isptr )
return " (unable to evaluate) " ;
if ( * key = = ' & ' )
{
if ( ! LocateDebugTerm ( progfuncs , key + 1 , & val , & type , & fakeval ) & & val ! = & fakeval )
return " (unable to evaluate) " ;
v . _int = ( char * ) val - progfuncs - > funcs . stringtable ;
val = & v ;
type = ev_pointer ;
}
else
{
if ( ! LocateDebugTerm ( progfuncs , key , & val , & type , & fakeval ) & & val ! = & fakeval )
return " (unable to evaluate) " ;
}
if ( type = = ev_integer | | type = = ev_string | | type = = ev_pointer )
ptr = val - > _int ;
else if ( type = = ev_float )
ptr = val - > _float ;
else
return " (unable to evaluate) " ;
return PR_ValueString ( progfuncs , cast , ( eval_t * ) ( progfuncs - > funcs . stringtable + ptr ) , true ) ;
}
2015-04-14 12:24:05 +00:00
if ( * key = = ' & ' )
{
if ( ! LocateDebugTerm ( progfuncs , key + 1 , & val , & type , & fakeval ) & & val ! = & fakeval )
return " (unable to evaluate) " ;
2016-02-15 06:01:17 +00:00
QC_snprintfz ( buf , sizeof ( buf ) , " (%s*)%#x " , ( ( type > = 10 ) ? " ??? " : basictypenames [ type ] ) , ( unsigned int ) ( ( char * ) val - progfuncs - > funcs . stringtable ) ) ;
2015-04-14 12:24:05 +00:00
return buf ;
}
2004-09-07 18:16:59 +00:00
assignment = strchr ( key , ' = ' ) ;
if ( assignment )
* assignment = ' \0 ' ;
2012-11-27 03:23:19 +00:00
if ( ! LocateDebugTerm ( progfuncs , key , & val , & type , & fakeval ) )
return " (unable to evaluate) " ;
/*
2004-09-07 18:16:59 +00:00
c = strchr ( key , ' . ' ) ;
if ( c ) * c = ' \0 ' ;
2010-12-08 14:42:05 +00:00
def = ED_FindLocalOrGlobal ( progfuncs , key , & val ) ;
2007-06-19 23:55:04 +00:00
if ( ! def )
{
if ( atoi ( key ) )
{
def = & fakedef ;
def - > ofs = 0 ;
def - > type = ev_entity ;
val = & fakeval ;
val - > edict = atoi ( key ) ;
}
}
2004-09-07 18:16:59 +00:00
if ( c ) * c = ' . ' ;
if ( ! def )
2010-12-08 14:42:05 +00:00
{
2004-09-07 18:16:59 +00:00
return " (Bad string) " ;
2010-12-08 14:42:05 +00:00
}
2007-06-19 23:55:04 +00:00
type = def - > type ;
2004-09-07 18:16:59 +00:00
2007-06-19 23:55:04 +00:00
//go through ent vars
2010-12-08 14:42:05 +00:00
c = strchr ( key , ' . ' ) ;
2004-09-07 18:16:59 +00:00
while ( c )
{
c2 = c + 1 ;
c = strchr ( c2 , ' . ' ) ;
2007-06-19 23:55:04 +00:00
type = type & ~ DEF_SAVEGLOBAL ;
2011-12-05 15:23:40 +00:00
if ( current_progstate & & current_progstate - > types )
2004-09-07 18:16:59 +00:00
type = current_progstate - > types [ type ] . type ;
if ( type ! = ev_entity )
return " '.' without entity " ;
if ( c ) * c = ' \0 ' ;
2023-01-09 05:14:57 +00:00
fdef = ED_FindField ( progfuncs , TrimString ( c2 ) ) ;
2004-09-07 18:16:59 +00:00
if ( c ) * c = ' . ' ;
if ( ! fdef )
return " (Bad string) " ;
2011-07-30 14:14:56 +00:00
ed = PROG_TO_EDICT ( progfuncs , val - > _int ) ;
if ( ! ed )
return " (Invalid Entity) " ;
val = ( eval_t * ) ( ( ( char * ) ed - > fields ) + fdef - > ofs * 4 ) ;
2007-06-19 23:55:04 +00:00
type = fdef - > type ;
2004-09-07 18:16:59 +00:00
}
2012-11-27 03:23:19 +00:00
*/
2004-09-07 18:16:59 +00:00
if ( assignment )
{
2015-02-02 08:01:53 +00:00
char * str = assignment + 1 ;
while ( * str = = ' ' )
str + + ;
2007-06-19 23:55:04 +00:00
switch ( type & ~ DEF_SAVEGLOBAL )
2004-09-07 18:16:59 +00:00
{
case ev_string :
2015-01-21 18:18:37 +00:00
# ifdef QCGC
2015-02-02 08:01:53 +00:00
* ( string_t * ) val = PR_AllocTempString ( & progfuncs - > funcs , str ) ;
2015-01-21 18:18:37 +00:00
# else
2013-11-21 23:02:28 +00:00
* ( string_t * ) val = PR_StringToProgs ( & progfuncs - > funcs , ED_NewString ( & progfuncs - > funcs , assignment , 0 , true ) ) ;
2015-01-21 18:18:37 +00:00
# endif
2004-09-07 18:16:59 +00:00
break ;
2010-12-08 14:42:05 +00:00
2004-09-07 18:16:59 +00:00
case ev_float :
2015-02-02 08:01:53 +00:00
if ( str [ 0 ] = = ' 0 ' & & ( str [ 1 ] = = ' x ' | | str [ 1 ] = = ' X ' ) )
* ( float * ) val = strtoul ( str , NULL , 0 ) ;
2012-01-17 07:57:46 +00:00
else
2015-02-02 08:01:53 +00:00
* ( float * ) val = ( float ) atof ( str ) ;
2004-09-07 18:16:59 +00:00
break ;
case ev_integer :
2015-02-02 08:01:53 +00:00
* ( int * ) val = atoi ( str ) ;
2004-09-07 18:16:59 +00:00
break ;
2010-12-08 14:42:05 +00:00
2015-02-02 08:01:53 +00:00
case ev_vector :
2004-09-07 18:16:59 +00:00
{
2015-02-02 08:01:53 +00:00
int i ;
if ( * str = = ' \' ' )
str + + ;
for ( i = 0 ; i < 3 ; i + + )
{
while ( * str = = ' ' | | * str = = ' \t ' )
str + + ;
( ( float * ) val ) [ i ] = strtod ( str , & str ) ;
}
while ( * str = = ' ' | | * str = = ' \t ' )
str + + ;
if ( * str = = ' \' ' )
str + + ;
2004-09-07 18:16:59 +00:00
}
break ;
2015-02-02 08:01:53 +00:00
2004-09-07 18:16:59 +00:00
case ev_entity :
2015-02-02 08:01:53 +00:00
if ( ! EDICT_NUM ( progfuncs , atoi ( str ) ) )
2013-06-23 02:17:02 +00:00
return " (invalid entity) " ;
2015-02-02 08:01:53 +00:00
* ( int * ) val = EDICT_TO_PROG ( progfuncs , EDICT_NUM ( progfuncs , atoi ( str ) ) ) ;
2004-09-07 18:16:59 +00:00
break ;
case ev_field :
2015-02-02 08:01:53 +00:00
fdef = ED_FindField ( progfuncs , str ) ;
2004-09-07 18:16:59 +00:00
if ( ! fdef )
{
2015-02-02 08:01:53 +00:00
size_t l , nl = strlen ( str ) ;
* assignment = ' = ' ;
2009-08-29 14:56:42 +00:00
strcpy ( buf , " Can't find field " ) ;
l = strlen ( buf ) ;
if ( nl > sizeof ( buf ) - l - 2 )
nl = sizeof ( buf ) - l - 2 ;
2015-02-02 08:01:53 +00:00
memcpy ( buf + l , str , nl ) ;
buf [ l + nl + 1 ] = 0 ;
2004-09-07 18:16:59 +00:00
return buf ;
}
* ( int * ) val = G_INT ( fdef - > ofs ) ;
break ;
2006-09-18 22:58:42 +00:00
2004-09-07 18:16:59 +00:00
case ev_function :
{
2014-08-03 14:47:47 +00:00
mfunction_t * func ;
2020-06-27 19:32:49 +00:00
progsnum_t i ;
progsnum_t progsnum = - 1 ;
2015-02-02 08:01:53 +00:00
if ( str [ 0 ] & & str [ 1 ] = = ' : ' )
2006-09-18 22:58:42 +00:00
{
2015-02-02 08:01:53 +00:00
progsnum = atoi ( str ) ;
str + = 2 ;
2006-09-18 22:58:42 +00:00
}
2015-02-02 08:01:53 +00:00
else if ( str [ 0 ] & & str [ 1 ] & & str [ 2 ] = = ' : ' )
2006-09-18 22:58:42 +00:00
{
2015-02-02 08:01:53 +00:00
progsnum = atoi ( str ) ;
str + = 3 ;
2006-09-18 22:58:42 +00:00
}
2015-02-02 08:01:53 +00:00
func = ED_FindFunction ( progfuncs , str , & i , progsnum ) ;
2006-09-18 22:58:42 +00:00
if ( ! func )
{
2015-02-02 08:01:53 +00:00
size_t l , nl = strlen ( str ) ;
2009-08-29 14:56:42 +00:00
2015-02-02 08:01:53 +00:00
* assignment = ' = ' ;
2009-08-29 14:56:42 +00:00
strcpy ( buf , " Can't find field " ) ;
l = strlen ( buf ) ;
if ( nl > sizeof ( buf ) - l - 2 )
nl = sizeof ( buf ) - l - 2 ;
2015-02-02 08:01:53 +00:00
memcpy ( buf + l , str , nl ) ;
buf [ l + nl + 1 ] = 0 ;
2006-11-02 03:00:50 +00:00
return buf ;
2006-09-18 22:58:42 +00:00
}
* ( func_t * ) val = ( func - pr_progstate [ i ] . functions ) | ( i < < 24 ) ;
2004-09-07 18:16:59 +00:00
}
break ;
2006-09-18 22:58:42 +00:00
2004-09-07 18:16:59 +00:00
default :
break ;
}
2015-02-02 08:01:53 +00:00
* assignment = ' = ' ;
2004-09-07 18:16:59 +00:00
}
2013-08-21 06:55:54 +00:00
QC_snprintfz ( buf , sizeof ( buf ) , " %s " , PR_ValueString ( progfuncs , type , val , true ) ) ;
2004-09-07 18:16:59 +00:00
return buf ;
}
//int EditorHighlightLine(window_t *wnd, int line);
void SetExecutionToLine ( progfuncs_t * progfuncs , int linenum )
{
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
int pn = prinst . pr_typecurrent ;
2004-09-07 18:16:59 +00:00
int snum ;
2020-01-09 15:35:40 +00:00
const mfunction_t * f = prinst . pr_xfunction ;
2004-09-07 18:16:59 +00:00
2011-03-04 13:59:06 +00:00
switch ( current_progstate - > structtype )
2004-09-07 18:16:59 +00:00
{
2011-03-04 13:59:06 +00:00
case PST_DEFAULT :
2011-03-04 15:35:16 +00:00
case PST_QTEST :
2010-12-08 14:42:05 +00:00
for ( snum = f - > first_statement ; pr_progstate [ pn ] . linenums [ snum ] < linenum ; snum + + )
2004-09-07 18:16:59 +00:00
{
if ( pr_statements16 [ snum ] . op = = OP_DONE )
return ;
}
break ;
2011-03-04 13:59:06 +00:00
case PST_KKQWSV :
case PST_FTE32 :
2010-12-08 14:42:05 +00:00
for ( snum = f - > first_statement ; pr_progstate [ pn ] . linenums [ snum ] < linenum ; snum + + )
2004-09-07 18:16:59 +00:00
{
if ( pr_statements32 [ snum ] . op = = OP_DONE )
return ;
}
break ;
default :
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " Bad struct type " ) ;
2004-09-07 18:16:59 +00:00
snum = 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
prinst . debugstatement = snum ;
2004-09-07 18:16:59 +00:00
// EditorHighlightLine(editwnd, pr_progstate[pn].linenums[snum]);
}
2018-08-04 15:12:51 +00:00
struct sortedfunc_s
{
int firststatement ;
int firstline ;
} ;
int PDECL PR_SortBreakFunctions ( const void * va , const void * vb )
{
const struct sortedfunc_s * a = va ;
const struct sortedfunc_s * b = vb ;
if ( a - > firstline = = b - > firstline )
return 0 ;
return a - > firstline > b - > firstline ;
}
2004-09-07 18:16:59 +00:00
//0 clear. 1 set, 2 toggle, 3 check
2018-10-11 10:31:23 +00:00
int PDECL PR_ToggleBreakpoint ( pubprogfuncs_t * ppf , const char * filename , int linenum , int flag ) //write alternate route to work by function name.
2004-09-07 18:16:59 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2004-09-07 18:16:59 +00:00
int ret = 0 ;
2018-08-04 15:12:51 +00:00
unsigned int fl , stline ;
2018-10-11 10:31:23 +00:00
unsigned int i , j ;
progstate_t * cp ;
2014-08-03 14:47:47 +00:00
mfunction_t * f ;
2011-05-15 13:23:13 +00:00
int op = 0 ; //warning about not being initialized before use
2004-09-07 18:16:59 +00:00
2018-10-11 10:31:23 +00:00
if ( ! pr_progstate )
return ret ;
for ( j = 0 ; j < prinst . maxprogs ; j + + )
2004-09-07 18:16:59 +00:00
{
2018-10-11 10:31:23 +00:00
cp = & pr_progstate [ j ] ;
if ( ! cp - > progs )
2004-09-07 18:16:59 +00:00
continue ;
if ( linenum ) //linenum is set means to set the breakpoint on a file and line
{
2018-08-04 15:12:51 +00:00
struct sortedfunc_s * sortedstatements ;
int numfilefunctions = 0 ;
2018-10-11 10:31:23 +00:00
if ( ! cp - > linenums )
2004-09-07 18:16:59 +00:00
continue ;
2018-10-11 10:31:23 +00:00
sortedstatements = alloca ( cp - > progs - > numfunctions * sizeof ( * sortedstatements ) ) ;
2004-09-07 18:16:59 +00:00
2013-10-08 14:28:11 +00:00
//we need to use the function table in order to set breakpoints in the right file.
2018-10-11 10:31:23 +00:00
for ( f = cp - > functions , fl = 0 ; fl < cp - > progs - > numfunctions ; f + + , fl + + )
2004-09-07 18:16:59 +00:00
{
2017-08-29 02:29:06 +00:00
const char * fncfile = f - > s_file + progfuncs - > funcs . stringtable ;
if ( fncfile [ 0 ] = = ' . ' & & fncfile [ 1 ] = = ' / ' )
fncfile + = 2 ;
if ( ! stricmp ( fncfile , filename ) )
2004-09-07 18:16:59 +00:00
{
2018-08-04 15:12:51 +00:00
sortedstatements [ numfilefunctions ] . firststatement = f - > first_statement ;
2018-10-11 10:31:23 +00:00
if ( f - > first_statement < 0 | | f - > first_statement > = ( int ) cp - > progs - > numstatements )
2018-08-04 15:12:51 +00:00
sortedstatements [ numfilefunctions ] . firstline = 0 ;
else
2018-10-11 10:31:23 +00:00
sortedstatements [ numfilefunctions ] . firstline = cp - > linenums [ f - > first_statement ] ;
2018-08-04 15:12:51 +00:00
numfilefunctions + + ;
}
}
f = NULL ;
qsort ( sortedstatements , numfilefunctions , sizeof ( * sortedstatements ) , PR_SortBreakFunctions ) ;
//our functions are now in terms of ascending line numbers.
for ( fl = 0 ; fl < numfilefunctions ; fl + + )
{
2018-10-11 10:31:23 +00:00
for ( i = sortedstatements [ fl ] . firststatement ; i < cp - > progs - > numstatements ; i + + )
2018-08-04 15:12:51 +00:00
{
2018-10-11 10:31:23 +00:00
if ( cp - > linenums [ i ] > = linenum )
2004-09-07 18:16:59 +00:00
{
2018-10-11 10:31:23 +00:00
stline = cp - > linenums [ i ] ;
2018-08-04 15:12:51 +00:00
for ( ; ; i + + )
2004-09-07 18:16:59 +00:00
{
2018-10-11 10:31:23 +00:00
if ( ( unsigned int ) cp - > linenums [ i ] ! = stline )
2018-08-04 15:12:51 +00:00
break ;
2004-09-07 18:16:59 +00:00
2018-10-11 10:31:23 +00:00
switch ( cp - > structtype )
2018-08-04 15:12:51 +00:00
{
case PST_DEFAULT :
case PST_QTEST :
2018-10-11 10:31:23 +00:00
op = ( ( dstatement16_t * ) cp - > statements + i ) - > op ;
2018-08-04 15:12:51 +00:00
break ;
case PST_KKQWSV :
case PST_FTE32 :
2020-07-01 05:32:21 +00:00
case PST_UHEXEN2 :
2018-10-11 10:31:23 +00:00
op = ( ( dstatement32_t * ) cp - > statements + i ) - > op ;
2018-08-04 15:12:51 +00:00
break ;
default :
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " Bad structtype " ) ;
2018-08-04 15:12:51 +00:00
op = 0 ;
}
switch ( flag )
{
default :
if ( op & OP_BIT_BREAKPOINT )
2004-09-07 18:16:59 +00:00
{
2018-08-04 15:12:51 +00:00
op & = ~ OP_BIT_BREAKPOINT ;
2004-09-07 18:16:59 +00:00
ret = false ;
2018-08-04 15:12:51 +00:00
flag = 0 ;
2004-09-07 18:16:59 +00:00
}
2018-08-04 15:12:51 +00:00
else
2004-09-07 18:16:59 +00:00
{
2018-08-04 15:12:51 +00:00
op | = OP_BIT_BREAKPOINT ;
ret = true ;
flag = 1 ;
2010-12-08 14:42:05 +00:00
}
2018-08-04 15:12:51 +00:00
break ;
case 0 :
op & = ~ OP_BIT_BREAKPOINT ;
ret = false ;
break ;
case 1 :
op | = OP_BIT_BREAKPOINT ;
ret = true ;
break ;
case 3 :
if ( op & OP_BIT_BREAKPOINT )
2015-02-02 08:01:53 +00:00
return true ;
2004-09-07 18:16:59 +00:00
}
2018-10-11 10:31:23 +00:00
switch ( cp - > structtype )
2018-08-04 15:12:51 +00:00
{
case PST_DEFAULT :
case PST_QTEST :
2018-10-11 10:31:23 +00:00
( ( dstatement16_t * ) cp - > statements + i ) - > op = op ;
2018-08-04 15:12:51 +00:00
break ;
case PST_KKQWSV :
case PST_FTE32 :
2020-07-01 05:32:21 +00:00
case PST_UHEXEN2 :
2018-10-11 10:31:23 +00:00
( ( dstatement32_t * ) cp - > statements + i ) - > op = op ;
2018-08-04 15:12:51 +00:00
break ;
default :
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " Bad structtype " ) ;
2018-08-04 15:12:51 +00:00
op = 0 ;
}
if ( ret ) //if its set, only set one breakpoint statement, not all of them.
2018-10-11 10:31:23 +00:00
break ;
if ( ( op & ~ OP_BIT_BREAKPOINT ) = = OP_DONE )
break ; //give up when we see the function's done.
2004-09-07 18:16:59 +00:00
}
2018-10-11 10:31:23 +00:00
goto cont ; //next progs
2004-09-07 18:16:59 +00:00
}
}
}
}
else //set the breakpoint on the first statement of the function specified.
{
2018-10-11 10:31:23 +00:00
for ( f = cp - > functions , fl = 0 ; fl < cp - > progs - > numfunctions ; f + + , fl + + )
2004-09-07 18:16:59 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
if ( ! strcmp ( f - > s_name + progfuncs - > funcs . stringtable , filename ) )
2004-09-07 18:16:59 +00:00
{
i = f - > first_statement ;
2018-10-11 10:31:23 +00:00
switch ( cp - > structtype )
2004-09-07 18:16:59 +00:00
{
2011-03-04 13:59:06 +00:00
case PST_DEFAULT :
case PST_QTEST :
2018-10-11 10:31:23 +00:00
op = ( ( dstatement16_t * ) cp - > statements + i ) - > op ;
2004-09-07 18:16:59 +00:00
break ;
2011-03-04 13:59:06 +00:00
case PST_KKQWSV :
case PST_FTE32 :
2020-07-01 05:32:21 +00:00
case PST_UHEXEN2 :
2018-10-11 10:31:23 +00:00
op = ( ( dstatement32_t * ) cp - > statements + i ) - > op ;
2004-09-07 18:16:59 +00:00
break ;
default :
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " Bad structtype " ) ;
2004-09-07 18:16:59 +00:00
}
switch ( flag )
{
default :
if ( op & 0x8000 )
{
op & = ~ 0x8000 ;
ret = false ;
flag = 0 ;
}
else
{
op | = 0x8000 ;
ret = true ;
flag = 1 ;
}
break ;
case 0 :
op & = ~ 0x8000 ;
ret = false ;
break ;
case 1 :
op | = 0x8000 ;
ret = true ;
break ;
case 3 :
if ( op & 0x8000 )
return true ;
}
2018-10-11 10:31:23 +00:00
switch ( cp - > structtype )
2004-09-07 18:16:59 +00:00
{
2011-03-04 13:59:06 +00:00
case PST_DEFAULT :
case PST_QTEST :
2018-10-11 10:31:23 +00:00
( ( dstatement16_t * ) cp - > statements + i ) - > op = op ;
2004-09-07 18:16:59 +00:00
break ;
2011-03-04 13:59:06 +00:00
case PST_KKQWSV :
case PST_FTE32 :
2020-07-01 05:32:21 +00:00
case PST_UHEXEN2 :
2018-10-11 10:31:23 +00:00
( ( dstatement32_t * ) cp - > statements + i ) - > op = op ;
2004-09-07 18:16:59 +00:00
break ;
default :
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " Bad structtype " ) ;
2004-09-07 18:16:59 +00:00
}
break ;
}
}
}
cont :
continue ;
}
return ret ;
}
2015-09-06 03:30:28 +00:00
int ShowStep ( progfuncs_t * progfuncs , int statement , char * fault , pbool fatal )
2004-09-07 18:16:59 +00:00
{
2018-10-11 10:31:23 +00:00
//FIXME: statics are evil, but at least the lastfile pointer check _should_ isolate different vms.
2016-07-12 00:40:13 +00:00
static unsigned int lastline = 0 ;
2018-10-11 10:31:23 +00:00
static unsigned int ignorestatement = 0 ;
static const char * lastfile = NULL ;
const char * file = NULL ;
2004-09-07 18:16:59 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
int pn = prinst . pr_typecurrent ;
2004-09-07 18:16:59 +00:00
int i ;
2020-01-09 15:35:40 +00:00
const mfunction_t * f = prinst . pr_xfunction ;
2015-02-02 08:01:53 +00:00
int faultline ;
int debugaction ;
2019-12-10 14:50:47 +00:00
prinst . pr_xstatement = statement ;
2004-09-07 18:16:59 +00:00
2012-07-05 19:42:36 +00:00
if ( ! externs - > useeditor )
{
PR_PrintStatement ( progfuncs , statement ) ;
2015-09-06 03:30:28 +00:00
if ( fatal )
2020-01-09 15:35:40 +00:00
progfuncs - > funcs . debug_trace = DEBUG_TRACE_ABORTERROR ;
2012-07-05 19:42:36 +00:00
return statement ;
}
2018-10-11 10:31:23 +00:00
if ( f )
2004-09-07 18:16:59 +00:00
{
2015-02-02 08:01:53 +00:00
for ( ; ; ) //for DEBUG_TRACE_NORESUME handling
2012-11-27 03:23:19 +00:00
{
2018-10-11 10:31:23 +00:00
file = PR_StringToNative ( & progfuncs - > funcs , f - > s_file ) ;
2015-02-02 08:01:53 +00:00
if ( pr_progstate [ pn ] . linenums )
{
2018-10-11 10:31:23 +00:00
if ( lastline = = pr_progstate [ pn ] . linenums [ statement ] & & lastfile = = file & & statement = = ignorestatement & & ! fault )
2015-02-02 08:01:53 +00:00
{
ignorestatement + + ;
return statement ; //no info/same line as last time
}
2004-09-07 18:16:59 +00:00
2015-02-02 08:01:53 +00:00
lastline = pr_progstate [ pn ] . linenums [ statement ] ;
}
else
lastline = - 1 ;
2018-10-11 10:31:23 +00:00
lastfile = file ;
2004-09-07 18:16:59 +00:00
2015-02-02 08:01:53 +00:00
faultline = lastline ;
2019-01-29 07:18:07 +00:00
debugaction = externs - > useeditor ( & progfuncs - > funcs , lastfile , ( ( lastline ! = - 1 ) ? & lastline : NULL ) , & statement , f - > first_statement , fault , fatal ) ;
2004-09-07 18:16:59 +00:00
2018-10-11 10:31:23 +00:00
// if (pn != prinst.pr_typecurrent)
2015-02-02 08:01:53 +00:00
//if they changed the line to execute, we need to find a statement that is on that line
if ( lastline & & faultline ! = lastline )
2018-10-11 10:31:23 +00:00
if ( pr_progstate [ pn ] . linenums )
2004-09-07 18:16:59 +00:00
{
2015-02-02 08:01:53 +00:00
switch ( pr_progstate [ pn ] . structtype )
2004-09-07 18:16:59 +00:00
{
2020-07-01 05:32:21 +00:00
case PST_UHEXEN2 :
2015-02-02 08:01:53 +00:00
case PST_FTE32 :
case PST_KKQWSV :
{
dstatement32_t * st = pr_progstate [ pn ] . statements ;
unsigned int * lnos = pr_progstate [ pn ] . linenums ;
for ( i = f - > first_statement ; ; i + + )
{
if ( lastline = = lnos [ i ] )
{
statement = i ;
break ;
}
else if ( lastline < = lnos [ i ] )
break ;
else if ( st [ i ] . op = = OP_DONE )
break ;
}
}
break ;
case PST_DEFAULT :
case PST_QTEST :
{
dstatement16_t * st = pr_progstate [ pn ] . statements ;
unsigned int * lnos = pr_progstate [ pn ] . linenums ;
for ( i = f - > first_statement ; ; i + + )
{
if ( lastline = = lnos [ i ] )
{
statement = i ;
break ;
}
else if ( lastline < = lnos [ i ] )
break ;
else if ( st [ i ] . op = = OP_DONE )
break ;
}
}
2004-09-07 18:16:59 +00:00
}
}
2015-02-02 08:01:53 +00:00
if ( debugaction = = DEBUG_TRACE_NORESUME )
continue ;
2020-01-09 15:35:40 +00:00
else if ( debugaction = = DEBUG_TRACE_ABORTERROR )
2017-12-09 22:10:51 +00:00
progfuncs - > funcs . parms - > Abort ( " %s " , fault ? fault : " Debugger Abort " ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
else if ( debugaction = = DEBUG_TRACE_OFF )
{
//if we're resuming, don't hit any lingering step-over triggers
progfuncs - > funcs . debug_trace = DEBUG_TRACE_OFF ;
2019-12-10 14:50:47 +00:00
for ( i = 0 ; i < prinst . pr_depth ; i + + )
prinst . pr_stack [ prinst . pr_depth - 1 ] . stepping = DEBUG_TRACE_OFF ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
}
2015-02-02 08:01:53 +00:00
else if ( debugaction = = DEBUG_TRACE_OUT )
{
//clear tracing for now, but ensure that it'll be reactivated once we reach the caller (if from qc)
progfuncs - > funcs . debug_trace = DEBUG_TRACE_OFF ;
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth )
prinst . pr_stack [ prinst . pr_depth - 1 ] . stepping = DEBUG_TRACE_INTO ;
2015-02-02 08:01:53 +00:00
}
else //some other debug action. maybe resume.
progfuncs - > funcs . debug_trace = debugaction ;
break ;
2004-09-07 18:16:59 +00:00
}
}
2010-12-08 14:42:05 +00:00
2015-02-02 08:01:53 +00:00
ignorestatement = statement + 1 ;
2004-09-07 18:16:59 +00:00
return statement ;
}
2015-02-02 08:01:53 +00:00
//called by the qcvm when executing some statement that cannot be execed.
int PR_HandleFault ( pubprogfuncs_t * ppf , char * error , . . . )
{
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
va_list argptr ;
char string [ 1024 ] ;
int resumestatement ;
va_start ( argptr , error ) ;
Q_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
PR_StackTrace ( ppf , true ) ;
ppf - > parms - > Printf ( " %s \n " , string ) ;
2019-12-10 14:50:47 +00:00
resumestatement = ShowStep ( progfuncs , prinst . pr_xstatement , string , true ) ;
2015-02-02 08:01:53 +00:00
if ( resumestatement = = 0 )
{
PR_AbortStack ( ppf ) ;
2020-01-09 15:35:40 +00:00
return - 1 ;
2015-02-02 08:01:53 +00:00
// ppf->parms->Abort ("%s", string);
}
return resumestatement ;
}
/*
= = = = = = = = = = = =
PR_RunError
Aborts the currently executing function
= = = = = = = = = = = =
*/
2018-10-11 10:31:23 +00:00
void VARGS PR_RunError ( pubprogfuncs_t * progfuncs , const char * error , . . . )
2015-02-02 08:01:53 +00:00
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , error ) ;
Q_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
// PR_PrintStatement (pr_statements + pr_xstatement);
PR_StackTrace ( progfuncs , true ) ;
progfuncs - > parms - > Printf ( " \n " ) ;
//editbadfile(pr_strings + pr_xfunction->s_file, -1);
progfuncs - > parms - > Abort ( " %s " , string ) ;
}
pbool PR_RunWarning ( pubprogfuncs_t * ppf , char * error , . . . )
{
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , error ) ;
Q_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
progfuncs - > funcs . parms - > Printf ( " %s " , string ) ;
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth ! = 0 )
2015-02-02 08:01:53 +00:00
PR_StackTrace ( ppf , false ) ;
if ( progfuncs - > funcs . debug_trace = = 0 )
{
progfuncs - > funcs . debug_trace = DEBUG_TRACE_INTO ;
return true ;
}
return false ;
}
2015-09-06 03:30:28 +00:00
static pbool PR_ExecRunWarning ( pubprogfuncs_t * ppf , int xstatement , char * error , . . . )
{
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
va_list argptr ;
char string [ 1024 ] ;
2019-12-10 14:50:47 +00:00
prinst . pr_xstatement = xstatement ;
2015-09-06 03:30:28 +00:00
va_start ( argptr , error ) ;
Q_vsnprintf ( string , sizeof ( string ) - 1 , error , argptr ) ;
va_end ( argptr ) ;
progfuncs - > funcs . parms - > Printf ( " %s " , string ) ;
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth ! = 0 )
2015-09-06 03:30:28 +00:00
PR_StackTrace ( ppf , false ) ;
2021-05-27 11:33:26 +00:00
if ( progfuncs - > funcs . debug_trace = = DEBUG_TRACE_OFF )
2015-09-06 03:30:28 +00:00
{
2019-12-10 14:50:47 +00:00
prinst . pr_xstatement = ShowStep ( progfuncs , xstatement , string , false ) ;
2021-05-27 11:33:26 +00:00
if ( progfuncs - > funcs . debug_trace ! = DEBUG_TRACE_OFF )
return true ;
2015-09-06 03:30:28 +00:00
}
return false ;
}
2015-02-02 08:01:53 +00:00
2015-04-14 12:24:05 +00:00
//For debugging. Assumes classname field exists.
2016-07-12 00:40:13 +00:00
const char * PR_GetEdictClassname ( progfuncs_t * progfuncs , unsigned int edict )
2015-04-14 12:24:05 +00:00
{
fdef_t * cnfd = ED_FindField ( progfuncs , " classname " ) ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( cnfd & & edict < prinst . maxedicts )
2015-04-14 12:24:05 +00:00
{
2018-04-06 17:21:15 +00:00
string_t * v = ( string_t * ) ( ( char * ) edvars ( PROG_TO_EDICT_PB ( progfuncs , edict ) ) + cnfd - > ofs * 4 ) ;
2015-04-14 12:24:05 +00:00
return PR_StringToNative ( & progfuncs - > funcs , * v ) ;
}
return " " ;
}
2015-02-02 08:01:53 +00:00
2014-09-17 03:04:08 +00:00
static pbool casecmp_f ( progfuncs_t * progfuncs , eval_t * ref , eval_t * val ) { return ref - > _float = = val - > _float ; }
static pbool casecmp_i ( progfuncs_t * progfuncs , eval_t * ref , eval_t * val ) { return ref - > _int = = val - > _int ; }
static pbool casecmp_v ( progfuncs_t * progfuncs , eval_t * ref , eval_t * val ) { return ref - > _vector [ 0 ] = = val - > _vector [ 0 ] & &
ref - > _vector [ 1 ] = = val - > _vector [ 1 ] & &
ref - > _vector [ 2 ] = = val - > _vector [ 2 ] ; }
static pbool casecmp_s ( progfuncs_t * progfuncs , eval_t * ref , eval_t * val ) { const char * refs = PR_StringToNative ( & progfuncs - > funcs , ref - > string ) ;
const char * vals = PR_StringToNative ( & progfuncs - > funcs , val - > string ) ;
return ! strcmp ( refs , vals ) ; }
static pbool casecmprange_f ( progfuncs_t * progfuncs , eval_t * ref , eval_t * min , eval_t * max ) { return ref - > _float > = min - > _float & & ref - > _float < = max - > _float ; }
static pbool casecmprange_i ( progfuncs_t * progfuncs , eval_t * ref , eval_t * min , eval_t * max ) { return ref - > _int > = min - > _int & & ref - > _int < = max - > _int ; }
static pbool casecmprange_v ( progfuncs_t * progfuncs , eval_t * ref , eval_t * min , eval_t * max ) { return ref - > _vector [ 0 ] > = min - > _vector [ 0 ] & & ref - > _vector [ 0 ] < = max - > _vector [ 0 ] & &
ref - > _vector [ 1 ] > = min - > _vector [ 1 ] & & ref - > _vector [ 1 ] < = max - > _vector [ 1 ] & &
ref - > _vector [ 2 ] > = min - > _vector [ 2 ] & & ref - > _vector [ 2 ] < = max - > _vector [ 2 ] ; }
static pbool casecmprange_bad ( progfuncs_t * progfuncs , eval_t * ref , eval_t * min , eval_t * max ) { PR_RunError ( & progfuncs - > funcs , " OP_CASERANGE type not supported " ) ; //BUG: pr_xstatement will not be correct.
return false ; }
typedef pbool ( * casecmp_t ) ( progfuncs_t * progfuncs , eval_t * ref , eval_t * val ) ;
typedef pbool ( * casecmprange_t ) ( progfuncs_t * progfuncs , eval_t * ref , eval_t * min , eval_t * max ) ;
static casecmp_t casecmp [ ] =
{
casecmp_f , //float
casecmp_v , //vector
casecmp_s , //string
casecmp_i , //ent
casecmp_i //func
//pointer, field, int, etc are emulated with func or something. I dunno
} ;
static casecmprange_t casecmprange [ ] =
{
casecmprange_f , //float
casecmprange_v , //vector - I'm using a bbox, not really sure what it should be
casecmprange_bad , //string - should it use stof? string ranges don't relly make sense, at all.
casecmprange_i , //ent - doesn't really make sense, but as ints/pointers/fields/etc might be emulated with this, allow it anyway, as an int type.
casecmprange_i //func
} ;
2014-03-31 17:06:41 +00:00
# define RUNAWAYCHECK() \
if ( ! - - * runaway ) \
{ \
2019-12-10 14:50:47 +00:00
prinst . pr_xstatement = st - pr_statements ; \
2014-03-31 17:06:41 +00:00
PR_RunError ( & progfuncs - > funcs , " runaway loop error \n " ) ; \
2014-05-30 03:57:30 +00:00
PR_StackTrace ( & progfuncs - > funcs , false ) ; \
2018-10-11 10:31:23 +00:00
externs - > Printf ( " runaway loop error \n " ) ; \
2019-12-10 14:50:47 +00:00
while ( prinst . pr_depth > prinst . exitdepth ) \
2014-03-31 17:06:41 +00:00
PR_LeaveFunction ( progfuncs ) ; \
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
prinst . spushed = 0 ; \
2014-03-31 17:06:41 +00:00
return - 1 ; \
}
2017-08-14 16:38:44 +00:00
# if defined(FTE_TARGET_WEB) || defined(SIMPLE_QCVM)
static int PR_NoDebugVM ( progfuncs_t * fte_restrict progfuncs )
{
char stack [ 4 * 1024 ] ;
2019-01-14 19:43:29 +00:00
size_t ofs ;
2017-08-14 16:38:44 +00:00
strcpy ( stack , " This platform does not support QC debugging \n Stack Trace: " ) ;
ofs = strlen ( stack ) ;
PR_SaveCallStack ( progfuncs , stack , & ofs , sizeof ( stack ) ) ;
Too many changes, sorry.
Change revision displays, use the SVN commit date instead of using __DATE__ (when there's no local changes). This should allow reproducible builds.
Added s_al_disable cvar, to block openal and all the various problems people have had with it, without having to name an explicit fallback (which would vary by system).
Add mastervolume cvar (for ss).
Add r_shadows 2 (aka fake shadows - for ss).
Add scr_loadingscreen_aspect -1 setting, to disable levelshots entirely, also disables the progress bar (for ss).
Better support for some effectinfo hacks (for ss).
Added dpcompat_nocsqcwarnings (because of lazy+buggy mods like ss).
Rework the dpcsqc versions of project+unproject builtins for better compat (for ss).
Added dpcompat_csqcinputeventtypes to block unexpected csqc input events (for ss).
Better compat with DP's loadfont console command (for ss).
Added dpcompat_smallerfonts cvar to replicate a DP bug (for ss).
Detect dp's m_draw extension, to work around it (for ss).
Cvar dpcompat_ignoremodificationtimes added. A value of 0 favour the most recently modified file, 1 will use DP-like alphabetically sorted preferences (for ss).
loadfont builtin can now accept outline=1 in the sizes arg for slightly more readable fonts.
Fix bbox calcs for rotated entities, fix needed for r_ignorenetpvs 0.
Hackily parse emoji.json to provide :poop: etc suggestions.
Skip prediction entirely when there's no local entity info. This fixes stair-smoothing in xonotic.
screenshot_cubemap will now capture half-float images when saving to ktx or dds files.
Fix support for xcf files larger than 4gb, mostly to avoid compiler warnings.
Fixed size of gfx/loading.lmp when replacement textures are used.
Added mipmap support for rg8 and l8a8 textures.
r_hdr_framebuffer cvar updated to support format names instead of random negative numbers. Description updated to name some interesting ones.
Perform autoupdate _checks_ ONLY with explicit user confirmation (actual updating already needed user confirmation, but this extra step should reduce the chances of us getting wrongly accused of exfiltrating user data if we're run in a sandbox - we ONLY ever included the updating engine's version in the checks, though there's nothing we can do to avoid sending the user's router's IP).
Removed the 'summon satan all over your harddrive' quit message, in case paranoid security researchers are idiots and don't bother doing actual research.
Removed the triptohell.info and fte.triptohell.info certificates, they really need to stop being self-signed. The updates domain is still self-signed for autoupdates.
Video drivers are now able to report supported video resolutions, visible to menuqc. Currently only works with SDL2 builds.
Added setmousepos builtin. Should work with glx+win32 build.
VF_SKYROOM_CAMERA can now accept an extra two args, setviewprop(VF_SKYROOM_CAMERA, org, axis, degrees).
Removed v_skyroom_origin+v_skyroom_orientation cvars in favour just v_skyroom, which should make it behave more like the 'fog' command (used when csqc isn't overriding).
Added R_EndPolygonRibbon builtin to make it faster+easier to generate textured ribbon/cable/etc wide lines (for TW).
sdl: Fix up sys_sdl.c's file enumeration to support wildcards in directories.
edit command now displays end1.bin/end2.bin correctly, because we can.
Finally add support for f_modified - though ruleset_allow_larger_models and ruleset_allow_overlong_sounds generally make it redundant.
Fix threading race condition in sha1 lookups.
Updated f_ruleset to include the same extra flags reported by ezquake.
A mod's default.fmf file can now contain an eg 'mainconfig config.cfg' line (to explicitly set the main config saved with cfg_save_auto 1 etc).
fmf: basegame steam:GameName/GameDir can be used to try to load a mod directory from an installed steam game. The resulting gamedir will be read-only.
HOMEDIR CHANGE: use homedirs only if the basedir cannot be written or a homedir already exists, which should further reduce the probability of microsoft randomly uploading our data to their cloud (but mostly because its annoying to never know where your data is written).
Fixed buf_cvarlist, should work in xonotic now, and without segfaults.
Added an extra arg to URI_Get_Callback calls - the response size, also changed the tempstring to contain all bytes of the response, you need to be careful about nulls though.
Try to work around nvidia's forced-panning bug on x11 when changing video modes. This might screw with other programs.
sdl: support custom icons.
sdl: support choosing a specific display.
Added some documentation to menuqc builtins.
menusys: use outlines for slightly more readable fonts.
menusys: switch vid_width and vid_height combos into a single video mode combo to set both according to reported video modes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5581 fc73d0e0-1445-4013-8a0c-d673dee63da5
2019-11-20 03:09:50 +00:00
PR_RunError ( & progfuncs - > funcs , " %s " , stack ) ;
2017-08-14 16:38:44 +00:00
return - 1 ;
}
# endif
2014-03-31 17:06:41 +00:00
static int PR_ExecuteCode16 ( progfuncs_t * fte_restrict progfuncs , int s , int * fte_restrict runaway )
2004-09-07 18:16:59 +00:00
{
2014-09-17 03:04:08 +00:00
unsigned int switchcomparison = 0 ;
2014-04-24 01:53:01 +00:00
const dstatement16_t * fte_restrict st ;
2014-08-03 14:47:47 +00:00
mfunction_t * fte_restrict newf ;
2014-03-31 17:06:41 +00:00
int i ;
edictrun_t * ed ;
eval_t * ptr ;
float * fte_restrict glob = pr_globals ;
float tmpf ;
int tmpi ;
2015-02-02 08:01:53 +00:00
unsigned short op ;
2014-03-31 17:06:41 +00:00
2014-09-17 03:04:08 +00:00
eval_t * switchref = ( eval_t * ) glob ;
2015-09-01 04:45:15 +00:00
unsigned int num_edicts = sv_num_edicts ;
2014-09-17 03:04:08 +00:00
2014-03-31 17:06:41 +00:00
# define OPA ((eval_t *)&glob[st->a])
# define OPB ((eval_t *)&glob[st->b])
# define OPC ((eval_t *)&glob[st->c])
# define INTSIZE 16
2014-04-24 01:53:01 +00:00
st = & pr_statements16 [ s ] ;
2015-02-02 08:01:53 +00:00
while ( progfuncs - > funcs . debug_trace | | prinst . watch_ptr | | prinst . profiling )
2014-03-31 17:06:41 +00:00
{
2017-02-19 00:15:42 +00:00
# if defined(FTE_TARGET_WEB) || defined(SIMPLE_QCVM)
2014-08-25 07:35:41 +00:00
reeval16 :
2014-03-31 17:06:41 +00:00
//this can generate huge functions, so disable it on systems that can't realiably cope with such things (IE initiates an unwanted denial-of-service attack when pointed our javascript, and firefox prints a warning too)
2019-12-16 17:24:09 +00:00
prinst . pr_xstatement = st - pr_statements16 ;
2017-08-14 16:38:44 +00:00
return PR_NoDebugVM ( progfuncs ) ;
2014-03-31 17:06:41 +00:00
# else
# define DEBUGABLE
# ifdef SEPARATEINCLUDES
# include "execloop16d.h"
# else
# include "execloop.h"
# endif
# undef DEBUGABLE
# endif
}
while ( 1 )
{
# include "execloop.h"
}
# undef INTSIZE
}
static int PR_ExecuteCode32 ( progfuncs_t * fte_restrict progfuncs , int s , int * fte_restrict runaway )
{
2017-02-19 00:15:42 +00:00
# if defined(FTE_TARGET_WEB) ||defined(SIMPLE_QCVM)
2014-08-25 07:35:41 +00:00
//this can generate huge functions, so disable it on systems that can't realiably cope with such things (IE initiates an unwanted denial-of-service attack when pointed our javascript, and firefox prints a warning too)
2019-12-16 17:24:09 +00:00
prinst . pr_xstatement = s ;
2014-08-25 07:35:41 +00:00
PR_RunError ( & progfuncs - > funcs , " 32bit qc statement support was disabled for this platform. \n " ) ;
PR_StackTrace ( & progfuncs - > funcs , false ) ;
return - 1 ;
# else
2014-09-17 03:04:08 +00:00
unsigned int switchcomparison = 0 ;
2014-04-24 01:53:01 +00:00
const dstatement32_t * fte_restrict st ;
2014-08-03 14:47:47 +00:00
mfunction_t * fte_restrict newf ;
2004-09-07 18:16:59 +00:00
int i ;
edictrun_t * ed ;
eval_t * ptr ;
2014-03-31 17:06:41 +00:00
float * fte_restrict glob = pr_globals ;
------------------------------------------------------------------------
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
float tmpf ;
int tmpi ;
2014-09-17 03:04:08 +00:00
eval_t * switchref = ( eval_t * ) glob ;
2015-09-01 04:45:15 +00:00
unsigned int num_edicts = sv_num_edicts ;
2004-09-07 18:16:59 +00:00
2015-02-02 08:01:53 +00:00
unsigned int op ;
2014-03-31 17:06:41 +00:00
# define OPA ((eval_t *)&glob[st->a])
# define OPB ((eval_t *)&glob[st->b])
# define OPC ((eval_t *)&glob[st->c])
# define INTSIZE 32
2014-04-24 01:53:01 +00:00
st = & pr_statements32 [ s ] ;
2015-02-02 08:01:53 +00:00
while ( progfuncs - > funcs . debug_trace | | prinst . watch_ptr | | prinst . profiling )
2014-03-31 17:06:41 +00:00
{
# define DEBUGABLE
# ifdef SEPARATEINCLUDES
# include "execloop32d.h"
# else
# include "execloop.h"
# endif
# undef DEBUGABLE
}
while ( 1 )
{
# ifdef SEPARATEINCLUDES
# include "execloop32.h"
# else
# include "execloop.h"
# endif
}
# undef INTSIZE
2014-08-25 07:35:41 +00:00
# endif
2014-03-31 17:06:41 +00:00
}
/*
= = = = = = = = = = = = = = = = = = = =
PR_ExecuteProgram
= = = = = = = = = = = = = = = = = = = =
*/
static void PR_ExecuteCode ( progfuncs_t * progfuncs , int s )
{
int runaway ;
------------------------------------------------------------------------
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 ( prinst . watch_ptr & & prinst . watch_ptr - > _int ! = prinst . watch_old . _int )
2012-11-27 03:23: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
switch ( prinst . watch_type )
2012-11-27 03:23:19 +00:00
{
case ev_float :
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Watch point \" %s \" changed by engine from %g to %g. \n " , prinst . watch_name , prinst . watch_old . _float , prinst . watch_ptr - > _float ) ;
2012-11-27 03:23:19 +00:00
break ;
2015-04-14 12:24:05 +00:00
case ev_vector :
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Watch point \" %s \" changed by engine from '%g %g %g' to '%g %g %g'. \n " , prinst . watch_name , prinst . watch_old . _vector [ 0 ] , prinst . watch_old . _vector [ 1 ] , prinst . watch_old . _vector [ 2 ] , prinst . watch_ptr - > _vector [ 0 ] , prinst . watch_ptr - > _vector [ 1 ] , prinst . watch_ptr - > _vector [ 2 ] ) ;
2015-04-14 12:24:05 +00:00
break ;
2012-11-27 03:23:19 +00:00
default :
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Watch point \" %s \" changed by engine from %i to %i. \n " , prinst . watch_name , prinst . watch_old . _int , prinst . watch_ptr - > _int ) ;
2012-11-27 03:23:19 +00:00
break ;
2015-04-14 12:24:05 +00:00
case ev_entity :
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Watch point \" %s \" changed by engine from %i(%s) to %i(%s). \n " , prinst . watch_name , prinst . watch_old . _int , PR_GetEdictClassname ( progfuncs , prinst . watch_old . _int ) , prinst . watch_ptr - > _int , PR_GetEdictClassname ( progfuncs , prinst . watch_ptr - > _int ) ) ;
2015-04-14 12:24:05 +00:00
break ;
2012-11-27 03:23:19 +00:00
case ev_function :
case ev_string :
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Watch point \" %s \" set by engine to %s. \n " , prinst . watch_name , PR_ValueString ( progfuncs , prinst . watch_type , prinst . watch_ptr , false ) ) ;
2012-11-27 03:23:19 +00:00
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
prinst . watch_old = * prinst . watch_ptr ;
2012-11-27 03:23:19 +00:00
//we can't dump stack or anything, as we don't really know the stack frame that it happened in.
//stop watching
------------------------------------------------------------------------
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
// prinst->watch_ptr = NULL;
2012-11-27 03:23:19 +00:00
}
2009-08-29 14:56:42 +00:00
# ifdef QCJIT
2011-07-30 14:14:56 +00:00
if ( current_progstate - > jit )
2009-08-29 14:56:42 +00:00
{
2011-07-30 14:14:56 +00:00
PR_EnterJIT ( progfuncs , current_progstate - > jit , s ) ;
2009-08-29 14:56:42 +00:00
return ;
}
# endif
runaway = 100000000 ;
2004-09-07 18:16:59 +00:00
2014-03-31 17:06:41 +00:00
for ( ; ; )
2004-09-07 18:16:59 +00:00
{
2014-03-31 17:06:41 +00:00
switch ( current_progstate - > structtype )
2004-09-07 18:16:59 +00:00
{
2014-03-31 17:06:41 +00:00
case PST_DEFAULT :
case PST_QTEST :
s = PR_ExecuteCode16 ( progfuncs , s , & runaway ) ;
if ( s = = - 1 )
return ;
continue ;
case PST_KKQWSV :
case PST_FTE32 :
2020-07-01 05:32:21 +00:00
case PST_UHEXEN2 :
2014-03-31 17:06:41 +00:00
s = PR_ExecuteCode32 ( progfuncs , s , & runaway ) ;
if ( s = = - 1 )
return ;
continue ;
default :
2019-09-25 20:23:24 +00:00
externs - > Sys_Error ( " PR_ExecuteProgram - bad structtype " ) ;
2004-09-07 18:16:59 +00:00
}
}
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void PDECL PR_ExecuteProgram ( pubprogfuncs_t * ppf , func_t fnum )
2004-09-07 18:16:59 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2014-08-03 14:47:47 +00:00
mfunction_t * f ;
2004-09-07 18:16:59 +00:00
int i ;
2005-10-07 16:27:20 +00:00
unsigned int initial_progs ;
2004-09-07 18:16:59 +00:00
int oldexitdepth ;
int s ;
2015-01-21 18:18:37 +00:00
# ifndef QCGC
2007-03-11 16:51:45 +00:00
int tempdepth ;
2015-01-21 18:18:37 +00:00
# endif
2007-03-11 16:51:45 +00:00
2005-10-07 16:27:20 +00:00
unsigned int newprogs = ( fnum & 0xff000000 ) > > 24 ;
2004-09-07 18:16:59 +00:00
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
initial_progs = prinst . pr_typecurrent ;
2004-09-07 18:16:59 +00:00
if ( newprogs ! = initial_progs )
{
2016-07-12 00:40:13 +00:00
if ( newprogs > = prinst . maxprogs | | ! pr_progstate [ newprogs ] . globals ) //can happen with hexen2...
2004-09-07 18:16:59 +00:00
{
2020-06-27 19:32:49 +00:00
externs - > Printf ( " PR_ExecuteProgram: tried branching into invalid progs (%# " pPRIx " ) \n " , fnum ) ;
2004-09-07 18:16:59 +00:00
return ;
}
2012-11-27 03:23:19 +00:00
PR_SwitchProgsParms ( progfuncs , newprogs ) ;
2004-09-07 18:16:59 +00:00
}
if ( ! ( fnum & ~ 0xff000000 ) | | ( signed ) ( fnum & ~ 0xff000000 ) > = pr_progs - > numfunctions )
{
// if (pr_global_struct->self)
// ED_Print (PROG_TO_EDICT(pr_global_struct->self));
2023-07-01 22:20:13 +00:00
# if defined(__GNUC__) && !defined(FTE_TARGET_WEB)
2018-10-11 10:31:23 +00:00
externs - > Printf ( " PR_ExecuteProgram: NULL function from exe (address %p) \n " , __builtin_return_address ( 0 ) ) ;
2014-05-10 16:37:53 +00:00
# else
2018-10-11 10:31:23 +00:00
externs - > Printf ( " PR_ExecuteProgram: NULL function from exe \n " ) ;
2014-05-10 16:37:53 +00:00
# endif
2004-09-07 18:16:59 +00:00
// Host_Error ("PR_ExecuteProgram: NULL function from exe");
// PR_MoveParms(0, pr_typecurrent);
2004-10-13 07:24:59 +00:00
PR_SwitchProgs ( progfuncs , initial_progs ) ;
2004-09-07 18:16:59 +00:00
return ;
}
------------------------------------------------------------------------
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
oldexitdepth = prinst . exitdepth ;
2004-09-07 18:16:59 +00:00
2014-08-03 14:47:47 +00:00
f = & pr_cp_functions [ fnum & ~ 0xff000000 ] ;
2004-09-07 18:16:59 +00:00
if ( f - > first_statement < 0 )
{ // negative statements are built in functions
i = - f - > first_statement ;
if ( i < externs - > numglobalbuiltins )
------------------------------------------------------------------------
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
( * externs - > globalbuiltins [ i ] ) ( & progfuncs - > funcs , ( struct globalvars_s * ) current_progstate - > globals ) ;
2004-09-07 18:16:59 +00:00
else
{
2018-10-11 10:31:23 +00:00
externs - > Printf ( " Bad builtin call number %i (from exe) \n " , - f - > first_statement ) ;
2015-02-02 08:01:53 +00:00
// PR_MoveParms(p, pr_typecurrent);
PR_SwitchProgs ( progfuncs , initial_progs ) ;
2004-09-07 18:16:59 +00:00
}
2012-11-27 03:23:19 +00:00
PR_SwitchProgsParms ( progfuncs , initial_progs ) ;
2004-09-07 18:16:59 +00:00
return ;
}
2015-02-02 08:01:53 +00:00
//forget about any tracing if its active. control returning to the engine should not look like its calling some random function.
2018-01-22 19:18:04 +00:00
progfuncs - > funcs . debug_trace = DEBUG_TRACE_OFF ;
2004-09-07 18:16:59 +00:00
// make a stack frame
2019-12-10 14:50:47 +00:00
prinst . exitdepth = prinst . pr_depth ;
2004-09-07 18:16:59 +00:00
2007-03-11 16:51:45 +00:00
2004-09-07 18:16:59 +00:00
s = PR_EnterFunction ( progfuncs , f , initial_progs ) ;
2015-01-21 18:18:37 +00:00
# ifndef QCGC
------------------------------------------------------------------------
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
tempdepth = prinst . numtempstringsstack ;
2015-01-21 18:18:37 +00:00
# endif
2004-09-07 18:16:59 +00:00
PR_ExecuteCode ( progfuncs , s ) ;
2012-11-27 03:23:19 +00:00
PR_SwitchProgsParms ( progfuncs , initial_progs ) ;
2004-09-07 18:16:59 +00:00
2015-01-21 18:18:37 +00:00
# ifndef QCGC
2007-03-11 16:51:45 +00:00
PR_FreeTemps ( progfuncs , tempdepth ) ;
------------------------------------------------------------------------
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
prinst . numtempstringsstack = tempdepth ;
2015-01-21 18:18:37 +00:00
# else
2019-12-10 14:50:47 +00:00
if ( ! prinst . pr_depth )
2015-01-21 18:18:37 +00:00
PR_RunGC ( progfuncs ) ;
# endif
2007-03-11 16:51:45 +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
prinst . exitdepth = oldexitdepth ;
2004-09-07 18:16:59 +00:00
}
typedef struct {
int fnum ;
int progsnum ;
int statement ;
} qcthreadstack_t ;
typedef struct qcthread_s {
int fstackdepth ;
qcthreadstack_t fstack [ MAX_STACK_DEPTH ] ;
int lstackused ;
int lstack [ LOCALSTACK_SIZE ] ;
int xstatement ;
int xfunction ;
progsnum_t xprogs ;
} qcthread_t ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
struct qcthread_s * PDECL PR_ForkStack ( pubprogfuncs_t * ppf )
2004-09-07 18:16:59 +00:00
{ //QC code can call builtins that call qc code.
//to get around the problems of restoring the builtins we simply don't save the thread over the builtin.
------------------------------------------------------------------------
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
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2004-09-07 18:16:59 +00:00
int i , l ;
------------------------------------------------------------------------
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 ed = prinst . exitdepth ;
2004-09-07 18:16:59 +00:00
int localsoffset , baselocalsoffset ;
------------------------------------------------------------------------
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
qcthread_t * thread = externs - > memalloc ( sizeof ( qcthread_t ) ) ;
2014-08-03 14:47:47 +00:00
const mfunction_t * f ;
2010-12-08 14:42:05 +00:00
2004-09-07 18:16:59 +00:00
//copy out the functions stack.
for ( i = 0 , localsoffset = 0 ; i < ed ; i + + )
{
2019-12-10 14:50:47 +00:00
if ( i + 1 = = prinst . pr_depth )
2020-01-09 15:35:40 +00:00
f = prinst . pr_xfunction ;
2004-09-07 18:16:59 +00:00
else
2019-12-10 14:50:47 +00:00
f = prinst . pr_stack [ i + 1 ] . f ;
2004-09-07 18:16:59 +00:00
localsoffset + = f - > locals ; //this is where it crashes
}
baselocalsoffset = localsoffset ;
2019-12-10 14:50:47 +00:00
for ( i = ed ; i < prinst . pr_depth ; i + + )
2004-09-07 18:16:59 +00:00
{
2019-12-10 14:50:47 +00:00
thread - > fstack [ i - ed ] . fnum = prinst . pr_stack [ i ] . f - pr_progstate [ prinst . pr_stack [ i ] . progsnum ] . functions ;
thread - > fstack [ i - ed ] . progsnum = prinst . pr_stack [ i ] . progsnum ;
thread - > fstack [ i - ed ] . statement = prinst . pr_stack [ i ] . s ;
2004-09-07 18:16:59 +00:00
2019-12-10 14:50:47 +00:00
if ( i + 1 = = prinst . pr_depth )
2020-01-09 15:35:40 +00:00
f = prinst . pr_xfunction ;
2004-09-07 18:16:59 +00:00
else
2019-12-10 14:50:47 +00:00
f = prinst . pr_stack [ i + 1 ] . f ;
2004-09-07 18:16:59 +00:00
localsoffset + = f - > locals ;
}
2019-12-10 14:50:47 +00:00
thread - > fstackdepth = prinst . pr_depth - ed ;
2004-09-07 18:16:59 +00:00
2019-12-10 14:50:47 +00:00
for ( i = prinst . pr_depth - 1 ; i > = ed ; i - - )
2004-09-07 18:16:59 +00:00
{
2019-12-10 14:50:47 +00:00
if ( i + 1 = = prinst . pr_depth )
2020-01-09 15:35:40 +00:00
f = prinst . pr_xfunction ;
2004-09-07 18:16:59 +00:00
else
2019-12-10 14:50:47 +00:00
f = prinst . pr_stack [ i + 1 ] . f ;
2004-09-07 18:16:59 +00:00
localsoffset - = f - > locals ;
for ( l = 0 ; l < f - > locals ; l + + )
{
thread - > lstack [ localsoffset - baselocalsoffset + l ] = ( ( int * ) pr_globals ) [ f - > parm_start + l ] ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
( ( int * ) pr_globals ) [ f - > parm_start + l ] = prinst . localstack [ localsoffset + l ] ; //copy the old value into the globals (so the older functions have the correct locals.
2004-09-07 18:16:59 +00:00
}
}
2019-12-10 14:50:47 +00:00
for ( i = ed ; i < prinst . pr_depth ; i + + ) //we need to get the locals back to how they were.
2004-09-07 18:16:59 +00:00
{
2019-12-10 14:50:47 +00:00
if ( i + 1 = = prinst . pr_depth )
2020-01-09 15:35:40 +00:00
f = prinst . pr_xfunction ;
2004-09-07 18:16:59 +00:00
else
2019-12-10 14:50:47 +00:00
f = prinst . pr_stack [ i + 1 ] . f ;
2004-09-07 18:16:59 +00:00
for ( l = 0 ; l < f - > locals ; l + + )
{
( ( int * ) pr_globals ) [ f - > parm_start + l ] = thread - > lstack [ localsoffset - baselocalsoffset + l ] ;
}
localsoffset + = f - > locals ;
}
thread - > lstackused = localsoffset - baselocalsoffset ;
2019-12-10 14:50:47 +00:00
thread - > xstatement = prinst . pr_xstatement ;
2020-01-09 15:35:40 +00:00
thread - > xfunction = prinst . pr_xfunction - current_progstate - > functions ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
thread - > xprogs = prinst . pr_typecurrent ;
2004-09-07 18:16:59 +00:00
return thread ;
}
------------------------------------------------------------------------
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 PDECL PR_ResumeThread ( pubprogfuncs_t * ppf , struct qcthread_s * thread )
2004-09-07 18:16:59 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2014-08-03 14:47:47 +00:00
mfunction_t * f , * oldf ;
2020-01-09 15:35:40 +00:00
int i , l , ls , olds ;
2004-09-07 18:16:59 +00:00
progsnum_t initial_progs ;
int oldexitdepth ;
2020-01-09 15:35:40 +00:00
int * glob ;
2004-09-07 18:16:59 +00:00
int s ;
2015-01-21 18:18:37 +00:00
# ifndef QCGC
2007-03-11 16:51:45 +00:00
int tempdepth ;
2015-01-21 18:18:37 +00:00
# endif
2004-09-07 18:16:59 +00:00
progsnum_t prnum = thread - > xprogs ;
int fnum = thread - > xfunction ;
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
if ( prinst . localstack_used + thread - > lstackused > LOCALSTACK_SIZE )
------------------------------------------------------------------------
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_RunError ( & progfuncs - > funcs , " Too many locals on resumtion of QC thread \n " ) ;
2004-09-07 18:16:59 +00:00
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth + thread - > fstackdepth > MAX_STACK_DEPTH )
------------------------------------------------------------------------
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_RunError ( & progfuncs - > funcs , " Too large stack on resumtion of QC thread \n " ) ;
2004-09-07 18:16:59 +00:00
//do progs switching stuff as appropriate. (fteqw only)
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
initial_progs = prinst . pr_typecurrent ;
2012-11-27 03:23:19 +00:00
PR_SwitchProgsParms ( progfuncs , prnum ) ;
2004-09-07 18:16:59 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
oldexitdepth = prinst . exitdepth ;
2019-12-10 14:50:47 +00:00
prinst . exitdepth = prinst . pr_depth ;
2004-09-07 18:16:59 +00:00
ls = 0 ;
//add on the callstack.
for ( i = 0 ; i < thread - > fstackdepth ; i + + )
{
2019-12-10 14:50:47 +00:00
if ( prinst . pr_depth = = prinst . exitdepth )
2004-09-07 18:16:59 +00:00
{
2020-01-09 15:35:40 +00:00
prinst . pr_stack [ prinst . pr_depth ] . f = prinst . pr_xfunction ;
2019-12-10 14:50:47 +00:00
prinst . pr_stack [ prinst . pr_depth ] . s = prinst . pr_xstatement ;
prinst . pr_stack [ prinst . pr_depth ] . progsnum = initial_progs ;
2004-09-07 18:16:59 +00:00
}
else
{
2019-12-10 14:50:47 +00:00
prinst . pr_stack [ prinst . pr_depth ] . progsnum = thread - > fstack [ i ] . progsnum ;
prinst . pr_stack [ prinst . pr_depth ] . f = pr_progstate [ thread - > fstack [ i ] . progsnum ] . functions + thread - > fstack [ i ] . fnum ;
prinst . pr_stack [ prinst . pr_depth ] . s = thread - > fstack [ i ] . statement ;
2004-09-07 18:16:59 +00:00
}
if ( i + 1 = = thread - > fstackdepth )
2020-01-09 15:35:40 +00:00
{
2014-08-03 14:47:47 +00:00
f = & pr_cp_functions [ fnum ] ;
2020-01-09 15:35:40 +00:00
glob = ( int * ) pr_globals ;
}
2004-09-07 18:16:59 +00:00
else
2020-01-09 15:35:40 +00:00
{
2004-09-07 18:16:59 +00:00
f = pr_progstate [ thread - > fstack [ i + 1 ] . progsnum ] . functions + thread - > fstack [ i + 1 ] . fnum ;
2020-01-09 15:35:40 +00:00
glob = ( int * ) pr_progstate [ thread - > fstack [ i + 1 ] . progsnum ] . globals ;
}
2004-09-07 18:16:59 +00:00
for ( l = 0 ; l < f - > locals ; l + + )
{
2020-01-09 15:35:40 +00:00
prinst . localstack [ prinst . localstack_used + + ] = glob [ f - > parm_start + l ] ;
glob [ f - > parm_start + l ] = thread - > lstack [ ls + + ] ;
2004-09-07 18:16:59 +00:00
}
2019-12-10 14:50:47 +00:00
prinst . pr_depth + + ;
2004-09-07 18:16:59 +00:00
}
if ( ls ! = thread - > lstackused )
------------------------------------------------------------------------
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_RunError ( & progfuncs - > funcs , " Thread stores incorrect locals count \n " ) ;
2004-09-07 18:16:59 +00:00
2010-12-08 14:42:05 +00:00
2014-08-03 14:47:47 +00:00
f = & pr_cp_functions [ fnum ] ;
2004-09-07 18:16:59 +00:00
// thread->lstackused -= f->locals; //the current function is the odd one out.
//add on the locals stack
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
memcpy ( prinst . localstack + prinst . localstack_used , thread - > lstack , sizeof ( int ) * thread - > lstackused ) ;
prinst . localstack_used + = thread - > lstackused ;
2004-09-07 18:16:59 +00:00
//bung the locals of the current function on the stack.
// for (i=0 ; i < f->locals ; i++)
// ((int *)pr_globals)[f->parm_start + i] = 0xff00ff00;//thread->lstack[thread->lstackused+i];
// PR_EnterFunction (progfuncs, f, initial_progs);
2020-01-09 15:35:40 +00:00
oldf = prinst . pr_xfunction ;
olds = prinst . pr_xstatement ;
prinst . pr_xfunction = f ;
2004-09-07 18:16:59 +00:00
s = thread - > xstatement ;
2015-01-21 18:18:37 +00:00
# ifndef QCGC
------------------------------------------------------------------------
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
tempdepth = prinst . numtempstringsstack ;
2015-01-21 18:18:37 +00:00
# endif
2004-09-07 18:16:59 +00:00
PR_ExecuteCode ( progfuncs , s ) ;
2012-11-27 03:23:19 +00:00
PR_SwitchProgsParms ( progfuncs , initial_progs ) ;
2015-01-21 18:18:37 +00:00
# ifndef QCGC
2007-03-11 16:51:45 +00:00
PR_FreeTemps ( progfuncs , tempdepth ) ;
------------------------------------------------------------------------
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
prinst . numtempstringsstack = tempdepth ;
2015-01-21 18:18:37 +00:00
# endif
2004-09-07 18:16:59 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
prinst . exitdepth = oldexitdepth ;
2020-01-09 15:35:40 +00:00
prinst . pr_xfunction = oldf ;
prinst . pr_xstatement = olds ;
2004-09-07 18:16:59 +00:00
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void PDECL PR_AbortStack ( pubprogfuncs_t * ppf )
2004-09-07 18:16:59 +00:00
{
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2020-01-09 15:35:40 +00:00
while ( prinst . pr_depth > prinst . exitdepth )
2004-09-07 18:16:59 +00:00
PR_LeaveFunction ( progfuncs ) ;
2020-01-09 15:35:40 +00:00
prinst . pr_xstatement = - 1 ; //should make the loop abort.
2004-09-07 18:16:59 +00:00
}
2015-02-02 08:01:53 +00:00
pbool PDECL PR_GetBuiltinCallInfo ( pubprogfuncs_t * ppf , int * builtinnum , char * function , size_t sizeoffunction )
{
progfuncs_t * progfuncs = ( progfuncs_t * ) ppf ;
2019-12-10 14:50:47 +00:00
int st = prinst . pr_xstatement ;
2015-02-02 08:01:53 +00:00
int op ;
int a ;
const char * fname ;
2016-01-18 05:22:07 +00:00
switch ( current_progstate - > structtype )
{
case PST_DEFAULT :
case PST_QTEST :
op = pr_statements16 [ st ] . op ;
a = pr_statements16 [ st ] . a ;
break ;
case PST_KKQWSV :
case PST_FTE32 :
op = pr_statements32 [ st ] . op ;
a = pr_statements32 [ st ] . a ;
break ;
2016-02-15 06:01:17 +00:00
default :
op = OP_DONE ;
a = 0 ;
break ;
2016-01-18 05:22:07 +00:00
}
2015-02-02 08:01:53 +00:00
* builtinnum = 0 ;
* function = 0 ;
if ( ( op > = OP_CALL0 & & op < = OP_CALL8 ) | | ( op > = OP_CALL1H & & op < = OP_CALL8H ) )
{
a = ( ( eval_t * ) & pr_globals [ a ] ) - > function ;
* builtinnum = - current_progstate - > functions [ a ] . first_statement ;
fname = PR_StringToNative ( ppf , current_progstate - > functions [ a ] . s_name ) ;
strncpy ( function , fname , sizeoffunction - 1 ) ;
function [ sizeoffunction - 1 ] = 0 ;
return true ;
}
return false ;
}