2008-10-05 02:55:01 +00:00
# ifndef PROGSLIB_H
# define PROGSLIB_H
2013-09-26 14:36:52 +00:00
2019-09-25 20:23:24 +00:00
# include "progtype.h"
2013-09-26 14:36:52 +00:00
# include <stdlib.h>
2004-09-07 18:16:59 +00:00
# ifdef _MSC_VER
2009-11-04 21:16:50 +00:00
# define VARGS __cdecl
# endif
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
2016-07-12 00:40:13 +00:00
# ifdef _WIN32
# define LIKEPRINTF(x) __attribute__((format(ms_printf,x,x+1)))
# else
# define LIKEPRINTF(x) __attribute__((format(printf,x,x+1)))
# endif
2009-11-04 21:16:50 +00:00
# endif
# ifndef LIKEPRINTF
# define LIKEPRINTF(x)
2004-09-07 18:16:59 +00:00
# endif
# ifndef VARGS
2009-11-04 21:16:50 +00:00
# define VARGS
2004-09-07 18:16:59 +00:00
# endif
2015-11-18 07:37:39 +00:00
# if defined(_M_IX86) || defined(__i386__) //supported arch
# if defined(__GNUC__) || defined(_MSC_VER) //supported compilers (yay for inline asm)
//#define QCJIT
# endif
2010-12-18 17:02:47 +00:00
# endif
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define QCBUILTIN ASMCALL
# ifdef _WIN32
# define PDECL __cdecl
# else
# define PDECL
# endif
2010-12-18 17:02:47 +00:00
# ifdef QCJIT
# define ASMCALL VARGS
# else
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define ASMCALL PDECL
2010-12-18 17:02:47 +00:00
# endif
2004-09-07 18:16:59 +00:00
2015-01-21 18:18:37 +00:00
# define QCGC
2004-09-07 18:16:59 +00:00
struct edict_s ;
2004-11-17 18:14:49 +00:00
struct entvars_s ;
2004-09-07 18:16:59 +00:00
struct globalvars_s ;
2004-11-17 18:14:49 +00:00
struct qcthread_s ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
typedef struct pubprogfuncs_s pubprogfuncs_t ;
typedef void ( ASMCALL * builtin_t ) ( pubprogfuncs_t * prinst , struct globalvars_s * gvars ) ;
2004-09-07 18:16:59 +00:00
2016-07-12 00:40:13 +00:00
enum ereftype_e
{
ER_ENTITY ,
ER_FREE ,
ER_OBJECT //custom sized, no vm/engine fields.
} ;
2016-07-21 19:27:59 +00:00
# define ED_ISFREE(e) ((e)->ereftype != ER_ENTITY)
2016-07-12 00:40:13 +00:00
2004-09-07 18:16:59 +00:00
//used by progs engine. All nulls is reset.
typedef struct {
2018-10-11 10:31:23 +00:00
const char * varname ;
2004-09-07 18:16:59 +00:00
struct fdef_s * ofs32 ;
int spare [ 2 ] ;
} evalc_t ;
# define sizeofevalc sizeof(evalc_t)
2018-10-11 10:31:23 +00:00
typedef enum { ev_void , ev_string , ev_float , ev_vector , ev_entity , ev_field , ev_function , ev_pointer , ev_integer , ev_variant , ev_struct , ev_union , ev_accessor , ev_enum , ev_boolean } etype_t ;
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
enum {
DEBUG_TRACE_OFF , //debugging should be off.
DEBUG_TRACE_INTO , //debug into functions
DEBUG_TRACE_OVER , //switch debugging off while executing child functions (and back on afterwards)
DEBUG_TRACE_OUT , //keep running until the end of the current function (trigger single-stepping again at that point)
2020-01-09 15:35:40 +00:00
DEBUG_TRACE_ABORTERROR , //give up with an endgame.
// DEBUG_TRACE_ABORTSTACK, //stop executing, without any errors.
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
DEBUG_TRACE_NORESUME //line number or something changed, but we should still be sitting at the debugger.
} ;
2004-09-07 18:16:59 +00:00
2012-11-27 03:23:19 +00:00
typedef struct fdef_s
{
2017-08-14 16:38:44 +00:00
unsigned int type ; //if DEF_SAVEGLOBAL bit is set then the variable needs to be saved in savegames
int ofs ; //runtime offset. add fieldadj to get the real array index.
2012-11-27 03:23:19 +00:00
unsigned int progsofs ; //used at loading time, so maching field offsets (unions/members) are positioned at the same runtime offset.
2018-10-11 10:31:23 +00:00
const char * name ; //proper name for the field.
2012-11-27 03:23:19 +00:00
} fdef_t ;
2005-05-22 13:42:10 +00:00
//the number of pointers to variables (as opposed to functions - those are fine) in these structures is excessive.
//Many of the functions are also obsolete.
------------------------------------------------------------------------
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 pubprogfuncs_s
{
2004-09-07 18:16:59 +00:00
int progsversion ; //PROGSTRUCT_VERSION
2019-09-25 20:23:24 +00:00
void ( PDECL * Shutdown ) ( pubprogfuncs_t * inst ) ;
2004-09-07 18:16:59 +00:00
2014-04-24 01:53:01 +00:00
void ( PDECL * Configure ) ( pubprogfuncs_t * prinst , size_t addressablesize , int max_progs , pbool enableprofiling ) ; //configure buffers and memory. Used to reset and must be called first. Flushes a running VM.
2015-02-02 08:01:53 +00:00
progsnum_t ( PDECL * LoadProgs ) ( pubprogfuncs_t * prinst , const char * s ) ; //load a progs
------------------------------------------------------------------------
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 ( PDECL * InitEnts ) ( pubprogfuncs_t * prinst , int max_ents ) ; //returns size of edicts for use with nextedict macro
void ( PDECL * ExecuteProgram ) ( pubprogfuncs_t * prinst , func_t fnum ) ; //start execution
struct globalvars_s * ( PDECL * globals ) ( pubprogfuncs_t * prinst , progsnum_t num ) ; //get the globals of a progs
struct entvars_s * ( PDECL * entvars ) ( pubprogfuncs_t * prinst , struct edict_s * ent ) ; //return a pointer to the entvars of an ent. can be achieved via the edict_t structure instead, so obsolete.
2004-09-07 18:16:59 +00:00
2018-10-11 10:31:23 +00:00
void ( VARGS * RunError ) ( pubprogfuncs_t * prinst , const char * msg , . . . ) LIKEPRINTF ( 2 ) ; //builtins call this to say there was a problem
------------------------------------------------------------------------
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 * PrintEdict ) ( pubprogfuncs_t * prinst , struct edict_s * ed ) ; //get a listing of all vars on an edict (sent back via 'print')
2004-09-07 18:16:59 +00:00
2015-09-14 10:36:42 +00:00
struct edict_s * ( PDECL * EntAlloc ) ( pubprogfuncs_t * prinst , pbool object , size_t extrasize ) ;
2020-02-11 18:06:10 +00:00
void ( PDECL * EntFree ) ( pubprogfuncs_t * prinst , struct edict_s * ed , pbool instant ) ;
2004-09-07 18:16:59 +00:00
2018-04-06 17:21:15 +00:00
struct edict_s * ( PDECL * EdictNum ) ( pubprogfuncs_t * prinst , unsigned int n ) ; //get the nth edict
unsigned int ( PDECL * NumForEdict ) ( pubprogfuncs_t * prinst , struct edict_s * e ) ; //so you can find out what that 'n' will be
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
char * ( PDECL * VarString ) ( pubprogfuncs_t * prinst , int first ) ; //returns a string made up of multiple arguments
2004-09-07 18:16:59 +00:00
2005-05-22 13:42:10 +00:00
struct progstate_s * * progstate ; //internal to the library.
2019-09-25 20:23:24 +00:00
int numprogs ;
2004-09-07 18:16:59 +00:00
2014-02-07 08:38:40 +00:00
func_t ( PDECL * FindFunction ) ( pubprogfuncs_t * prinst , const char * funcname , progsnum_t num ) ;
2004-09-07 18:16:59 +00:00
2019-01-20 01:00:18 +00:00
int ( PDECL * StartCompile ) ( pubprogfuncs_t * prinst , int argv , const char * * argc ) ; //1 if can compile, 0 if failed to compile
------------------------------------------------------------------------
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 ( PDECL * ContinueCompile ) ( pubprogfuncs_t * prinst ) ; //2 if finished, 1 if more to go, 0 if failed
2004-09-07 18:16:59 +00:00
2019-01-20 01:00:18 +00:00
char * ( PDECL * filefromprogs ) ( pubprogfuncs_t * prinst , progsnum_t prnum , const char * fname , size_t * size , char * buffer ) ; //reveals encoded/added files from already loaded progs
char * ( PDECL * filefromnewprogs ) ( pubprogfuncs_t * prinst , const char * prname , const char * fname , size_t * size , char * buffer ) ; //reveals encoded/added files from a progs on the disk somewhere
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 * ED_Print ) ( pubprogfuncs_t * prinst , struct edict_s * ed ) ;
2015-11-18 07:37:39 +00:00
char * ( PDECL * save_ents ) ( pubprogfuncs_t * prinst , char * buf , size_t * size , size_t maxsize , int mode ) ; //dump the entire progs info into one big self allocated string
2018-08-23 06:03:31 +00:00
int ( PDECL * load_ents ) ( pubprogfuncs_t * prinst , const char * s , void * ctx ,
void ( PDECL * entspawned ) ( pubprogfuncs_t * progfuncs , struct edict_s * ed , void * ctx , const char * entstart , const char * entend ) ,
pbool ( PDECL * extendedterm ) ( pubprogfuncs_t * progfuncs , void * ctx , const char * * extline )
) ; //restore the entire progs state (or just add some more ents) (returns edicts ize)
2004-09-07 18:16:59 +00:00
2015-11-18 07:37:39 +00:00
char * ( PDECL * saveent ) ( pubprogfuncs_t * prinst , char * buf , size_t * size , size_t maxsize , struct edict_s * ed ) ; //will save just one entities vars
struct edict_s * ( PDECL * restoreent ) ( pubprogfuncs_t * prinst , const char * buf , size_t * size , struct edict_s * ed ) ; //will restore the entity that had it's values saved (can use NULL for ed)
2004-09-07 18:16:59 +00:00
2013-11-21 23:02:28 +00:00
union eval_s * ( PDECL * FindGlobal ) ( pubprogfuncs_t * prinst , const char * name , progsnum_t num , etype_t * type ) ; //find a pointer to the globals value
2004-09-07 18:16:59 +00:00
2018-10-11 10:31:23 +00:00
union eval_s * ( PDECL * GetEdictFieldValue ) ( pubprogfuncs_t * prinst , struct edict_s * ent , const char * name , etype_t type , evalc_t * s ) ; //get an entityvar (cache it) and return the possible values
------------------------------------------------------------------------
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 edict_s * ( PDECL * ProgsToEdict ) ( pubprogfuncs_t * prinst , int progs ) ; //edicts are stored as ints and need to be adjusted
int ( PDECL * EdictToProgs ) ( pubprogfuncs_t * prinst , struct edict_s * ed ) ; //edicts are stored as ints and need to be adjusted
2004-09-07 18:16:59 +00:00
2018-10-11 10:31:23 +00:00
char * ( PDECL * EvaluateDebugString ) ( pubprogfuncs_t * prinst , const char * key ) ; //evaluate a string and return it's value (according to current progs) (expands edict vars)
2015-02-02 08:01:53 +00:00
int debug_trace ; //start calling the editor for each line executed
2014-05-30 03:57:30 +00:00
void ( PDECL * StackTrace ) ( pubprogfuncs_t * prinst , int showlocals ) ;
2018-10-11 10:31:23 +00:00
int ( PDECL * ToggleBreak ) ( pubprogfuncs_t * prinst , const char * filename , int linenum , int mode ) ;
2004-09-07 18:16:59 +00:00
struct progexterns_s * parms ; //these are the initial parms, they may be changed
2018-10-11 10:31:23 +00:00
pbool ( PDECL * Decompile ) ( pubprogfuncs_t * prinst , const char * fname ) ;
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
int callargc ; //number of args of built-in call
2004-09-07 18:16:59 +00:00
2005-05-15 18:49:04 +00:00
char * stringtable ; //qc strings are all relative. add to a qc string. this is required for support of frikqcc progs that strip string immediates.
------------------------------------------------------------------------
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 stringtablesize ;
2013-05-03 04:28:08 +00:00
int stringtablemaxsize ;
2017-08-14 16:38:44 +00:00
int fieldadjust ; //FrikQCC style arrays can cause problems due to field remapping. This causes us to leave gaps but offsets identical. except for system fields, qc-addressable variables use their old offsets, this is the bias so that the offset pokes the correct memory.
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
struct qcthread_s * ( PDECL * Fork ) ( pubprogfuncs_t * prinst ) ; //returns a pointer to a thread which can be resumed via RunThread.
void ( PDECL * RunThread ) ( pubprogfuncs_t * prinst , struct qcthread_s * thread ) ;
void ( PDECL * AbortStack ) ( pubprogfuncs_t * prinst ) ; //annigilates the current stack, positioning on a return statement. It is expected that this is only used via a builtin!
2004-09-07 18:16:59 +00:00
2015-02-02 08:01:53 +00:00
pbool ( PDECL * GetBuiltinCallInfo ) ( pubprogfuncs_t * prinst , int * builtinnum , char * function , size_t sizeoffunction ) ; //call to query the qc's name+index for the builtin
2005-02-12 18:56:04 +00:00
2018-10-11 10:31:23 +00:00
int ( PDECL * RegisterFieldVar ) ( pubprogfuncs_t * prinst , unsigned int type , const char * name , signed long requestedpos , signed long originalofs ) ;
2005-05-20 03:32:53 +00:00
2019-09-25 20:23:24 +00:00
char * ( PDECL * AddString ) ( pubprogfuncs_t * prinst , const char * val , int minlength , pbool demarkup ) ; //dump a string into the progs memory (for setting globals and whatnot)
void * ( PDECL * Tempmem ) ( pubprogfuncs_t * prinst , int ammount , char * whatfor ) ; //grab some mem for as long as the progs stays loaded
void * ( PDECL * AddressableAlloc ) ( pubprogfuncs_t * progfuncs , unsigned int ammount ) ; /*returns memory within the qc block, use stringtoprogs to get a usable qc pointer/string*/
void ( PDECL * AddressableFree ) ( pubprogfuncs_t * progfuncs , void * mem ) ; /*frees a block of addressable memory*/
------------------------------------------------------------------------
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
string_t ( PDECL * TempString ) ( pubprogfuncs_t * prinst , const char * str ) ;
2019-09-25 20:23:24 +00:00
string_t ( PDECL * AllocTempString ) ( pubprogfuncs_t * prinst , char * * str , unsigned int len ) ;
2015-09-01 04:45:15 +00:00
string_t ( PDECL * StringToProgs ) ( pubprogfuncs_t * prinst , const char * str ) ; //commonly makes a semi-permanent mapping from some table to the string value. mapping can be removed via RemoveProgsString
2019-09-25 20:23:24 +00:00
const char * ( ASMCALL * StringToNative ) ( pubprogfuncs_t * prinst , string_t str ) ;
2008-01-23 01:31:01 +00:00
2018-10-11 10:31:23 +00:00
int ( PDECL * QueryField ) ( pubprogfuncs_t * prinst , unsigned int fieldoffset , etype_t * type , char const * * name , evalc_t * fieldcache ) ; //find info on a field definition at an offset
2009-11-04 21:16:50 +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 * EntClear ) ( pubprogfuncs_t * progfuncs , struct edict_s * e ) ;
2015-09-01 04:45:15 +00:00
void ( PDECL * FindPrefixGlobals ) ( pubprogfuncs_t * progfuncs , int prnum , char * prefix , void ( PDECL * found ) ( pubprogfuncs_t * progfuncs , char * name , union eval_s * val , etype_t type , void * ctx ) , void * ctx ) ; //calls the callback for each named global found
2011-08-16 04:12:15 +00:00
2018-10-11 10:31:23 +00:00
pbool ( PDECL * SetWatchPoint ) ( pubprogfuncs_t * prinst , const char * 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
void ( PDECL * AddSharedVar ) ( pubprogfuncs_t * progfuncs , int start , int size ) ;
void ( PDECL * AddSharedFieldVar ) ( pubprogfuncs_t * progfuncs , int num , char * relstringtable ) ;
char * ( PDECL * RemoveProgsString ) ( pubprogfuncs_t * progfuncs , string_t str ) ;
2020-06-12 23:29:58 +00:00
pbool ( PDECL * GetFunctionInfo ) ( pubprogfuncs_t * progfuncs , func_t func , int * argcount , unsigned char * * argsizes , int * builtinnum , char * funcname , size_t funcnamesize ) ; //queries the interesting info from a function def
2015-09-01 04:45:15 +00:00
void ( PDECL * GenerateStatementString ) ( pubprogfuncs_t * progfuncs , int statementnum , char * out , int outlen ) ; //disassembles a specific statement. for debugging reports.
------------------------------------------------------------------------
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
fdef_t * ( PDECL * FieldInfo ) ( pubprogfuncs_t * progfuncs , unsigned int * count ) ;
char * ( PDECL * UglyValueString ) ( pubprogfuncs_t * progfuncs , etype_t type , union eval_s * val ) ;
2014-03-30 08:55:06 +00:00
pbool ( PDECL * ParseEval ) ( pubprogfuncs_t * progfuncs , union eval_s * eval , int type , const char * s ) ;
void ( PDECL * SetStringField ) ( pubprogfuncs_t * progfuncs , struct edict_s * ed , string_t * fld , const char * str , pbool str_is_static ) ; //if ed is null, fld points to a global. if str_is_static, then s doesn't need its own memory allocated.
2015-01-07 13:34:05 +00:00
pbool ( PDECL * DumpProfile ) ( pubprogfuncs_t * progfuncs , pbool resetprofiles ) ;
2015-09-01 04:45:15 +00:00
2018-04-06 17:21:15 +00:00
unsigned int edicttable_length ;
2015-09-01 04:45:15 +00:00
struct edict_s * * edicttable ;
2019-09-25 20:23:24 +00:00
//stuff not used by the qclib at all, but provided for lazy user storage.
struct
{
char * tempstringbase ; //for engine's use. Store your base tempstring pointer here.
int tempstringnum ; //for engine's use.
} user ;
2004-09-07 18:16:59 +00:00
} ;
typedef struct progexterns_s {
int progsversion ; //PROGSTRUCT_VERSION
2018-04-20 19:09:14 +00:00
void * ( PDECL * ReadFile ) ( const char * fname , unsigned char * ( PDECL * buf_get ) ( void * ctx , size_t len ) , void * buf_ctx , size_t * out_size , pbool issourcefile ) ;
2014-10-05 20:04:11 +00:00
int ( PDECL * FileSize ) ( const char * fname ) ; //-1 if file does not exist
pbool ( PDECL * WriteFile ) ( const char * name , void * data , int len ) ;
int ( VARGS * Printf ) ( const char * , . . . ) LIKEPRINTF ( 1 ) ;
2016-12-09 09:09:12 +00:00
int ( VARGS * DPrintf ) ( const char * , . . . ) LIKEPRINTF ( 1 ) ;
2014-10-05 20:04:11 +00:00
void ( VARGS * Sys_Error ) ( const char * , . . . ) LIKEPRINTF ( 1 ) ;
void ( VARGS * Abort ) ( char * , . . . ) LIKEPRINTF ( 1 ) ;
2019-09-04 08:32:22 +00:00
pbool ( PDECL * CheckHeaderCrc ) ( pubprogfuncs_t * inst , progsnum_t idx , int crc , const char * filename ) ;
2004-09-07 18:16:59 +00:00
2014-10-05 20:04:11 +00:00
void ( PDECL * entspawn ) ( struct edict_s * ent , int loading ) ; //ent has been spawned, but may not have all the extra variables (that may need to be set) set
pbool ( PDECL * entcanfree ) ( struct edict_s * ent ) ; //return true to stop ent from being freed
void ( ASMCALL * stateop ) ( pubprogfuncs_t * prinst , float var , func_t func ) ; //what to do on qc's state opcode.
void ( ASMCALL * cstateop ) ( pubprogfuncs_t * prinst , float vara , float varb , func_t currentfunc ) ; //a hexen2 opcode.
void ( ASMCALL * cwstateop ) ( pubprogfuncs_t * prinst , float vara , float varb , func_t currentfunc ) ; //a hexen2 opcode.
void ( ASMCALL * thinktimeop ) ( pubprogfuncs_t * prinst , struct edict_s * ent , float varb ) ; //a hexen2 opcode.
2004-09-07 18:16:59 +00:00
//used when loading a game
2015-02-02 08:01:53 +00:00
int ( PDECL * MapNamedBuiltin ) ( pubprogfuncs_t * prinst , int headercrc , const char * builtinname ) ; //return 0 for not found.
2014-10-05 20:04:11 +00:00
void ( PDECL * loadcompleate ) ( int edictsize ) ; //notification to reset any pointers.
pbool ( PDECL * badfield ) ( pubprogfuncs_t * prinst , struct edict_s * ent , const char * keyname , const char * value ) ; //called for any fields that are not registered
2004-09-07 18:16:59 +00:00
2014-10-05 20:04:11 +00:00
void * ( VARGS * memalloc ) ( int size ) ; //small string allocation malloced and freed randomly by the executor. (use malloc if you want)
void ( VARGS * memfree ) ( void * mem ) ;
2004-09-07 18:16:59 +00:00
2019-01-29 07:18:07 +00:00
int ( PDECL * useeditor ) ( pubprogfuncs_t * prinst , const char * filename , int * line , int * statement , int funcstart , char * reason , pbool fatal ) ; //called on syntax errors or step-by-step debugging. line and statement(if line was set to 0) can be used to change the next line. return value is the new debug state to use/step.
2014-10-05 20:04:11 +00:00
void ( PDECL * addressablerelocated ) ( pubprogfuncs_t * progfuncs , char * oldb , char * newb , int oldlen ) ; //called when the progs memory was resized. you must fix up all pointers to globals, strings, fields, addressable blocks.
2004-09-07 18:16:59 +00:00
builtin_t * globalbuiltins ; //these are available to all progs
int numglobalbuiltins ;
2005-03-10 03:55:18 +00:00
enum { PR_NOCOMPILE , PR_COMPILENEXIST , PR_COMPILEEXISTANDCHANGED , PR_COMPILECHANGED , PR_COMPILEALWAYS , PR_COMPILEIGNORE } autocompile ;
2004-09-07 18:16:59 +00:00
2005-05-22 13:42:10 +00:00
double * gametime ; //used to prevent the vm from reusing an entity faster than 2 secs.
2004-09-07 18:16:59 +00:00
2020-04-29 10:43:22 +00:00
pbool usethreadedgc ;
struct edict_s * * edicts ; //pointer to the engine's reference to world.
unsigned int * num_edicts ; //pointer to the engine's edict count.
2014-10-05 20:04:11 +00:00
int edictsize ; //size of edict_t
2011-10-03 02:45:44 +00:00
void * user ; /*contains the owner's world reference in FTE*/
2004-09-07 18:16:59 +00:00
} progparms_t , progexterns_t ;
# if defined(QCLIBDLL_EXPORTS)
2020-06-12 23:29:58 +00:00
# ifdef _WIN32
__declspec ( dllexport )
# else
__attribute__ ( ( visibility ( " default " ) ) )
# endif
2004-09-07 18:16:59 +00:00
# endif
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
pubprogfuncs_t * PDECL InitProgs ( progparms_t * ext ) ;
2004-09-07 18:16:59 +00:00
typedef union eval_s
{
string_t string ;
float _float ;
2005-11-29 13:30:20 +00:00
float _vector [ 3 ] ;
2004-09-07 18:16:59 +00:00
func_t function ;
int _int ;
int edict ;
2011-10-27 16:16:29 +00:00
float prog ; //so it can easily be changed
2004-09-07 18:16:59 +00:00
} eval_t ;
# define PR_CURRENT -1
# define PR_ANY -2 //not always valid. Use for finding funcs
2005-04-02 18:00:45 +00:00
# define PR_ANYBACK -3
2016-12-09 09:09:12 +00:00
# define PROGSTRUCT_VERSION 4
2004-09-07 18:16:59 +00:00
# ifndef DLL_PROG
2014-04-24 01:53:01 +00:00
# define PR_Configure(pf, memsize, max_progs, profiling) (*pf->Configure) (pf, memsize, max_progs, profiling)
2015-02-02 08:01:53 +00:00
# define PR_LoadProgs(pf, s) (*pf->LoadProgs) (pf, s)
2005-02-28 07:16:19 +00:00
# define PR_InitEnts(pf, maxents) (*pf->InitEnts) (pf, maxents)
# define PR_ExecuteProgram(pf, fnum) (*pf->ExecuteProgram) (pf, fnum)
2004-09-07 18:16:59 +00:00
# define PR_globals(pf, num) (*pf->globals) (pf, num)
# define PR_entvars(pf, ent) (*pf->entvars) (pf, ent)
2005-02-12 18:56:04 +00:00
# define PR_RegisterFieldVar(pf,type,name,reqofs,qcofs) (*pf->RegisterFieldVar) (pf,type,name,reqofs,qcofs)
2015-09-14 10:36:42 +00:00
# define ED_Alloc(pf,isobj,extsize) (*pf->EntAlloc) (pf, isobj, extsize)
2020-02-11 18:06:10 +00:00
# define ED_Free(pf, ed) (*pf->EntFree) (pf, ed, false)
2009-11-04 21:16:50 +00:00
# define ED_Clear(pf, ed) (*pf->EntClear) (pf, ed)
2004-09-07 18:16:59 +00:00
2018-08-23 06:03:31 +00:00
# define PR_LoadEnts(pf, s, ctx, entcb, extcb) (*pf->load_ents) (pf, s, ctx, entcb, extcb)
2013-08-21 06:55:54 +00:00
# define PR_SaveEnts(pf, buf, size, maxsize, mode) (*pf->save_ents) (pf, buf, size, maxsize, mode)
2004-09-07 18:16:59 +00:00
2015-09-01 04:45:15 +00:00
#if 0 //def _DEBUG
2004-09-07 18:16:59 +00:00
# define EDICT_NUM(pf, num) (*pf->EDICT_NUM) (pf, num)
2015-09-01 04:45:15 +00:00
# else
2018-04-06 17:21:15 +00:00
# define EDICT_NUM_PB(pf, num) (pf->edicttable[num])
# define EDICT_NUM_UB(pf, num) EDICT_NUM_PB(pf,(((unsigned int)(num))>=pf->edicttable_length)?0:num)
2015-09-01 04:45:15 +00:00
# endif
2018-04-06 17:21:15 +00:00
# define NUM_FOR_EDICT(pf, e) (*pf->NumForEdict) (pf, (struct edict_s*)(e))
2004-09-07 18:16:59 +00:00
# define SetGlobalEdict(pf, ed, ofs) (*pf->SetGlobalEdict) (pf, ed, ofs)
2005-02-28 07:16:19 +00:00
# define PR_VarString(pf,first) (*pf->VarString) (pf,first)
# define PR_StartCompile(pf,argc,argv) (*pf->StartCompile) (pf,argc,argv)
# define PR_ContinueCompile(pf) (*pf->ContinueCompile) (pf)
2014-05-30 03:57:30 +00:00
# define PR_StackTrace(pf,locals) (*pf->StackTrace) (pf,locals)
2005-02-28 07:16:19 +00:00
# define PR_AbortStack(pf) (*pf->AbortStack) (pf)
# define PR_RunError(pf,str) (*pf->RunError) (pf,str)
# define PR_PrintEdict(pf,ed) (*pf->PrintEdict) (pf, ed)
2004-09-07 18:16:59 +00:00
2005-02-28 07:16:19 +00:00
# define PR_FindFunction(pf, name, num) (*pf->FindFunction) (pf, name, num)
2011-05-20 04:10:46 +00:00
# define PR_FindGlobal(pf, name, progs, type) (*pf->FindGlobal) (pf, name, progs, type)
2013-11-21 23:02:28 +00:00
# define PR_AddString(pf, ed, len, demarkup) (*pf->AddString) (pf, ed, len, demarkup)
2011-08-16 04:12:15 +00:00
# define PR_Alloc(pf,size,whatfor) (*pf->Tempmem) (pf, size, whatfor)
# define PR_AddressableAlloc(pf,size) (*pf->AddressableAlloc) (pf, size)
2012-07-05 19:42:36 +00:00
# define PR_AddressableFree(pf,mem) (*pf->AddressableFree) (pf, mem)
2004-09-07 18:16:59 +00:00
2019-06-05 20:48:06 +00:00
# define PROG_TO_EDICTINDEX(pf, ed) ed
2004-09-07 18:16:59 +00:00
# define PROG_TO_EDICT(pf, ed) (*pf->ProgsToEdict) (pf, ed)
2009-11-04 21:16:50 +00:00
# define EDICT_TO_PROG(pf, ed) (*pf->EdictToProgs) (pf, (struct edict_s*)ed)
2004-09-07 18:16:59 +00:00
2007-03-11 16:51:45 +00:00
# define PR_GetString(pf,s) (*pf->StringToNative) (pf, s)
# define PR_GetStringOfs(pf,o) (*pf->StringToNative) (pf, G_INT(o))
# define PR_SetString(pf, s) (*pf->StringToProgs) (pf, s)
2004-09-07 18:16:59 +00:00
# define NEXT_EDICT(pf,o) EDICT_NUM(pf, NUM_FOR_EDICT(pf, o)+1)
# define RETURN_EDICT(pf, e) (((int *)pr_globals)[OFS_RETURN] = EDICT_TO_PROG(pf, e))
//builtin funcs (which operate on globals)
2005-05-22 13:42:10 +00:00
//To use these outside of builtins, you will likly have to use the 'globals' method.
2004-09-07 18:16:59 +00:00
# define G_FLOAT(o) (((float *)pr_globals)[o])
# define G_FLOAT2(o) (((float *)pr_globals)[OFS_PARM0 + o*3])
# define G_INT(o) (((int *)pr_globals)[o])
# define G_EDICT(pf, o) PROG_TO_EDICT(pf, G_INT(o)) //((edict_t *)((char *) sv.edicts+ *(int *)&((float *)pr_globals)[o]))
# define G_EDICTNUM(pf, o) NUM_FOR_EDICT(pf, G_EDICT(pf, o))
# define G_VECTOR(o) (&((float *)pr_globals)[o])
# define G_FUNCTION(o) (*(func_t *)&((float *)pr_globals)[o])
2007-03-11 16:51:45 +00:00
/*
2004-09-07 18:16:59 +00:00
# define PR_GetString(p,s) (s?s + p->stringtable:"")
2005-05-15 18:49:04 +00:00
# define PR_GetStringOfs(p,o) (G_INT(o)?G_INT(o) + p->stringtable:"")
2005-05-22 13:42:10 +00:00
# define PR_SetStringOfs(p,o,s) (G_INT(o) = s - p->stringtable)
2007-03-11 16:51:45 +00:00
*/
//#define PR_SetString(p, s) ((s&&*s)?(s - p->stringtable):0)
/**/
2004-09-07 18:16:59 +00:00
2015-01-21 18:18:37 +00:00
# ifdef QCGC
# define PR_NewString(p, s) (p)->TempString(p, s)
# else
# define PR_NewString(p, s) PR_SetString(p, PR_AddString(p, s, 0, false))
# endif
2004-09-07 18:16:59 +00:00
# define ev_prog ev_integer
# define E_STRING(o) (char *)(((int *)((char *)ed) + progparms.edictsize)[o])
//#define pr_global_struct pr_globals
# endif
# define OFS_NULL 0
# define OFS_RETURN 1
# define OFS_PARM0 4 // leave 3 ofs for each parm to hold vectors
# define OFS_PARM1 7
# define OFS_PARM2 10
# define OFS_PARM3 13
# define OFS_PARM4 16
# define OFS_PARM5 19
# define OFS_PARM6 22
# define OFS_PARM7 25
# define RESERVED_OFS 28
# undef edict_t
# undef globalvars_t
2008-10-05 02:55:01 +00:00
# endif //PROGSLIB_H