2004-11-23 14:29:51 +00:00
# include "quakedef.h"
2009-11-17 00:15:44 +00:00
# include "pr_common.h"
# include "shader.h"
2004-11-29 01:21:00 +00:00
2009-11-04 21:16:50 +00:00
# ifdef GLQUAKE
2004-11-23 14:29:51 +00:00
# include "glquake.h"
# endif
2005-10-07 16:27:20 +00:00
2009-11-17 00:15:44 +00:00
# if defined(MENU_DAT) || defined(CSQC_DAT)
2013-03-12 22:53:23 +00:00
# include "cl_master.h"
2009-11-17 00:15:44 +00:00
2015-07-14 14:47:00 +00:00
qbyte mpkeysdown [ K_MAX / 8 ] ;
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
extern qboolean csqc_dp_lastwas3d ;
2013-06-23 02:17:02 +00:00
extern unsigned int r2d_be_flags ;
2016-07-12 00:40:13 +00:00
# define DRAWFLAG_NORMAL 0
# define DRAWFLAG_ADD 1
# define DRAWFLAG_MODULATE 2
# define DRAWFLAG_MODULATE2 3
# define DRAWFLAG_2D (1u<<2)
# define DRAWFLAG_TWOSIDED 0x400
2013-05-11 05:03:07 +00:00
static unsigned int PF_SelectDPDrawFlag ( int flag )
{
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
csqc_dp_lastwas3d = false ; //for compat with dp's stupid beginpolygon
2013-05-11 05:03:07 +00:00
//flags:
//0 = blend
//1 = add
//2 = modulate
//3 = modulate*2
flag & = 3 ;
if ( flag = = DRAWFLAG_ADD )
return BEF_FORCEADDITIVE ;
else
return 0 ;
}
2009-11-17 00:15:44 +00:00
//float drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawfill ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2009-11-17 00:15:44 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
float * size = G_VECTOR ( OFS_PARM1 ) ;
float * rgb = G_VECTOR ( OFS_PARM2 ) ;
float alpha = G_FLOAT ( OFS_PARM3 ) ;
2013-06-23 02:17:02 +00:00
int flag = prinst - > callargc > = 5 ? G_FLOAT ( OFS_PARM4 ) : 0 ;
2009-11-17 00:15:44 +00:00
2013-06-23 02:17:02 +00:00
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
2011-03-31 01:14:01 +00:00
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
R2D_FillBlock ( pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] ) ;
2013-06-23 02:17:02 +00:00
r2d_be_flags = 0 ;
2009-11-17 00:15:44 +00:00
G_FLOAT ( OFS_RETURN ) = 1 ;
2004-11-23 14:29:51 +00:00
}
2009-11-17 00:15:44 +00:00
//void drawsetcliparea(float x, float y, float width, float height) = #458;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawsetcliparea ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-10-01 03:09:17 +00:00
{
2013-06-23 02:17:02 +00:00
srect_t srect ;
2015-08-14 02:46:38 +00:00
if ( R2D_Flush )
R2D_Flush ( ) ;
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
csqc_dp_lastwas3d = false ;
2015-07-31 13:23:32 +00:00
srect . x = G_FLOAT ( OFS_PARM0 ) / ( float ) vid . fbvwidth ;
srect . y = G_FLOAT ( OFS_PARM1 ) / ( float ) vid . fbvheight ;
srect . width = G_FLOAT ( OFS_PARM2 ) / ( float ) vid . fbvwidth ;
srect . height = G_FLOAT ( OFS_PARM3 ) / ( float ) vid . fbvheight ;
2013-06-23 02:17:02 +00:00
srect . dmin = - 99999 ;
srect . dmax = 99999 ;
srect . y = ( 1 - srect . y ) - srect . height ;
BE_Scissor ( & srect ) ;
2005-10-01 03:09:17 +00:00
2013-06-23 02:17:02 +00:00
G_FLOAT ( OFS_RETURN ) = 1 ;
2009-11-17 00:15:44 +00:00
}
//void drawresetcliparea(void) = #459;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawresetcliparea ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
2015-08-14 02:46:38 +00:00
if ( R2D_Flush )
R2D_Flush ( ) ;
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
csqc_dp_lastwas3d = false ;
2013-06-23 02:17:02 +00:00
BE_Scissor ( NULL ) ;
G_FLOAT ( OFS_RETURN ) = 1 ;
2009-11-17 00:15:44 +00:00
}
2004-11-23 14:29:51 +00:00
2015-12-28 17:41:39 +00:00
# define FONT_SLOTS 32
2013-12-29 22:48:28 +00:00
# define FONT_SIZES 16
------------------------------------------------------------------------
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 {
2013-12-29 22:48:28 +00:00
unsigned int owner ; //kdm_foo. whoever has an interest in this font. font is purged when this becomes 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
char slotname [ 16 ] ;
2013-12-29 22:48:28 +00:00
char facename [ MAX_OSPATH ] ;
------------------------------------------------------------------------
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 sizes ;
2013-12-29 22:48:28 +00:00
int size [ FONT_SIZES ] ;
struct font_s * font [ FONT_SIZES ] ;
------------------------------------------------------------------------
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
} fontslot [ FONT_SLOTS ] ;
2013-08-21 07:14:39 +00:00
2016-07-12 00:40:13 +00:00
static struct font_s * PR_CL_ChooseFont ( float * fontsel , int szx , int szy )
------------------------------------------------------------------------
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 fontidx = 0 ; //default by default...
2013-12-29 22:48:28 +00:00
struct font_s * font = font_default ;
2013-03-12 22:53:23 +00:00
2013-12-29 22:48:28 +00:00
if ( fontsel )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
2013-12-29 22:48:28 +00:00
fontidx = * fontsel ;
------------------------------------------------------------------------
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 ( fontidx > = 0 & & fontidx < FONT_SLOTS )
{
int i , j ;
int fontdiff = 10000 ;
for ( i = 0 ; i < fontslot [ fontidx ] . sizes ; i + + )
{
j = abs ( szy - fontslot [ fontidx ] . size [ i ] ) ;
2013-03-12 22:35:33 +00:00
if ( j < fontdiff & & fontslot [ fontidx ] . font [ i ] )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
fontdiff = j ;
font = fontslot [ fontidx ] . font [ i ] ;
}
}
}
2013-08-21 07:14:39 +00:00
return font ;
}
void PR_CL_BeginString ( pubprogfuncs_t * prinst , float vx , float vy , float szx , float szy , float * px , float * py )
{
2013-10-08 14:28:11 +00:00
world_t * world = prinst - > parms - > user ;
2015-04-27 06:19:33 +00:00
struct font_s * font ;
2013-10-08 14:28:11 +00:00
if ( world - > g . drawfontscale & & ( world - > g . drawfontscale [ 0 ] | | world - > g . drawfontscale [ 1 ] ) )
{
szx * = world - > g . drawfontscale [ 0 ] ;
szy * = world - > g . drawfontscale [ 1 ] ;
}
2015-04-27 06:19:33 +00:00
font = PR_CL_ChooseFont ( world - > g . drawfont , szx , szy ) ;
------------------------------------------------------------------------
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
Font_BeginScaledString ( font , vx , vy , szx , szy , px , py ) ;
}
2014-03-30 08:55:06 +00:00
int PR_findnamedfont ( const char * name , qboolean isslotname )
------------------------------------------------------------------------
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 i ;
if ( isslotname )
{
for ( i = 0 ; i < FONT_SLOTS ; i + + )
{
if ( ! stricmp ( fontslot [ i ] . slotname , name ) )
return i ;
}
}
else
{
for ( i = 0 ; i < FONT_SLOTS ; i + + )
{
if ( ! stricmp ( fontslot [ i ] . facename , name ) )
return i ;
}
}
return - 1 ;
}
2015-12-28 17:41:39 +00:00
int PR_findunusedfont ( void )
{
int i ;
//don't find slot 0.
for ( i = FONT_SLOTS ; i - - > 1 ; )
{
if ( ! * fontslot [ i ] . slotname & & ! * fontslot [ i ] . facename )
return i ;
}
return - 1 ;
}
2015-01-21 18:18:37 +00:00
//purgeowner is the bitmask of owners that are getting freed.
//if purgeowner is 0, fonts will get purged
void PR_ReleaseFonts ( unsigned int purgeowner )
------------------------------------------------------------------------
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 i , j ;
2015-01-21 18:18:37 +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
for ( i = 0 ; i < FONT_SLOTS ; i + + )
{
2015-01-21 18:18:37 +00:00
if ( fontslot [ i ] . owner )
continue ; //already free
2013-12-29 22:48:28 +00:00
fontslot [ i ] . owner & = ~ purgeowner ;
2015-01-21 18:18:37 +00:00
if ( fontslot [ i ] . owner )
continue ; //still owned by someone
2013-12-29 22:48:28 +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
for ( j = 0 ; j < fontslot [ i ] . sizes ; j + + )
{
2013-03-12 22:35:33 +00:00
if ( fontslot [ i ] . font [ j ] )
Font_Free ( fontslot [ i ] . font [ j ] ) ;
------------------------------------------------------------------------
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
fontslot [ i ] . font [ j ] = NULL ;
}
2015-01-21 18:18:37 +00:00
fontslot [ i ] . sizes = 0 ;
fontslot [ i ] . slotname [ 0 ] = ' \0 ' ;
fontslot [ i ] . facename [ 0 ] = ' \0 ' ;
}
}
void PR_ReloadFonts ( qboolean reload )
{
int i , j ;
if ( qrenderer = = QR_NONE )
reload = false ;
for ( i = 0 ; i < FONT_SLOTS ; i + + )
{
//already not loaded
2013-12-29 22:48:28 +00:00
if ( ! fontslot [ i ] . owner )
2015-01-21 18:18:37 +00:00
continue ;
//flush it (if loaded)
for ( j = 0 ; j < fontslot [ i ] . sizes ; j + + )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
2015-01-21 18:18:37 +00:00
if ( fontslot [ i ] . font [ j ] )
Font_Free ( fontslot [ i ] . font [ j ] ) ;
fontslot [ i ] . font [ j ] = NULL ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
2015-01-21 18:18:37 +00:00
//and reload if needed
if ( reload )
2013-12-29 22:48:28 +00:00
{ //otherwise load it.
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
for ( j = 0 ; j < fontslot [ i ] . sizes ; j + + )
2013-12-29 22:48:28 +00:00
{
2015-01-21 18:18:37 +00:00
fontslot [ i ] . font [ j ] = Font_LoadFont ( fontslot [ i ] . size [ j ] , fontslot [ i ] . facename ) ;
2013-12-29 22:48:28 +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 QCBUILTIN PF_CL_findfont ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
2014-03-30 08:55:06 +00:00
const char * slotname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
------------------------------------------------------------------------
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
G_FLOAT ( OFS_RETURN ) = PR_findnamedfont ( slotname , true ) + 1 ; //return default on failure.
}
void QCBUILTIN PF_CL_loadfont ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
2014-03-30 08:55:06 +00:00
const char * slotname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
const char * facename = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
const char * sizestr = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
2016-02-10 23:23:43 +00:00
int slotnum = ( prinst - > callargc > 3 ) ? G_FLOAT ( OFS_PARM3 ) : - 1 ;
//float fix_scale = (prinst->callargc>4)?G_FLOAT(OFS_PARM4):0;
//float fix_voffset = (prinst->callargc>5)G_FLOAT(OFS_PARM5):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
int i , sz ;
2013-12-29 22:48:28 +00:00
world_t * world = prinst - > parms - > user ;
------------------------------------------------------------------------
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
G_FLOAT ( OFS_RETURN ) = 0 ; //return default on failure.
2013-03-12 22:35:33 +00:00
if ( slotnum < 0 & & * slotname )
------------------------------------------------------------------------
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
slotnum = PR_findnamedfont ( slotname , true ) ;
2013-03-12 22:35:33 +00:00
else if ( slotnum < 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
slotnum = PR_findnamedfont ( facename , false ) ;
2013-03-12 22:35:33 +00:00
if ( slotnum < 0 )
2015-12-28 17:41:39 +00:00
slotnum = PR_findunusedfont ( ) ;
2013-03-12 22:35:33 +00:00
if ( slotnum < 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
return ; //eep.
if ( ( unsigned ) slotnum > = FONT_SLOTS )
return ;
//if its changed, purge it.
if ( stricmp ( fontslot [ slotnum ] . slotname , slotname ) | | stricmp ( fontslot [ slotnum ] . facename , facename ) )
{
Q_strncpyz ( fontslot [ slotnum ] . slotname , slotname , sizeof ( fontslot [ slotnum ] . slotname ) ) ;
Q_strncpyz ( fontslot [ slotnum ] . facename , facename , sizeof ( fontslot [ slotnum ] . facename ) ) ;
for ( i = 0 ; i < fontslot [ slotnum ] . sizes ; i + + )
{
2013-03-12 22:35:33 +00:00
if ( fontslot [ slotnum ] . font [ i ] )
Font_Free ( fontslot [ slotnum ] . font [ i ] ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
fontslot [ slotnum ] . font [ i ] = NULL ;
}
2013-12-29 22:48:28 +00:00
fontslot [ slotnum ] . owner = 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
}
2013-12-29 22:48:28 +00:00
fontslot [ slotnum ] . owner | = world - > keydestmask ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
while ( * sizestr )
{
sizestr = COM_Parse ( sizestr ) ;
sz = atoi ( com_token ) ;
for ( i = 0 ; i < fontslot [ slotnum ] . sizes ; i + + )
{
if ( fontslot [ slotnum ] . size [ i ] = = sz )
break ;
}
if ( i = = fontslot [ slotnum ] . sizes )
{
if ( i > = FONT_SIZES )
break ;
fontslot [ slotnum ] . size [ i ] = sz ;
2013-12-29 22:48:28 +00:00
if ( qrenderer = = QR_NONE )
fontslot [ slotnum ] . font [ i ] = NULL ;
else
fontslot [ slotnum ] . font [ i ] = Font_LoadFont ( fontslot [ slotnum ] . size [ i ] , facename ) ;
------------------------------------------------------------------------
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
fontslot [ slotnum ] . sizes + + ;
}
}
2013-03-12 22:35:33 +00:00
G_FLOAT ( OFS_RETURN ) = slotnum ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
}
2013-12-29 22:48:28 +00:00
void CL_LoadFont_f ( void )
{
//console command for compat with dp/debug.
if ( Cmd_Argc ( ) = = 1 )
{
int i , j ;
for ( i = 0 ; i < FONT_SLOTS ; i + + )
{
if ( fontslot [ i ] . sizes )
{
Con_Printf ( " %s: %s ( " , fontslot [ i ] . slotname , fontslot [ i ] . facename ) ;
for ( j = 0 ; j < fontslot [ i ] . sizes ; j + + )
{
if ( j )
2014-02-13 23:54:57 +00:00
Con_Printf ( " , " ) ;
2013-12-29 22:48:28 +00:00
Con_Printf ( " %i " , fontslot [ i ] . size [ j ] ) ;
}
Con_Printf ( " ) \n " ) ;
}
}
}
else
{
int i ;
int slotnum = 0 ;
char * slotname = Cmd_Argv ( 1 ) ;
char * facename = Cmd_Argv ( 2 ) ;
int sizenum = 3 ;
//loadfont slot face size1 size2...
slotnum = PR_findnamedfont ( slotname , true ) ;
if ( slotnum < 0 )
{
char * dpnames [ ] = { " default " , " console " , " sbar " , " notify " , " chat " , " centerprint " , " infobar " , " menu " , " user0 " , " user1 " , " user2 " , " user3 " , " user4 " , " user5 " , " user6 " , " user7 " , NULL } ;
for ( i = 0 ; dpnames [ i ] ; i + + )
{
if ( ! strcmp ( dpnames [ i ] , slotname ) )
{
//assign it to this slot only if this slot does not already have a face. avoids corrupting already-loaded fonts.
if ( ! * fontslot [ i ] . facename )
slotnum = i ;
break ;
}
}
if ( slotnum < 0 )
slotnum = PR_findnamedfont ( " " , true ) ; //whatever is still free
}
if ( slotnum < 0 )
{
Con_Printf ( " out of font slots \n " ) ;
return ;
}
//if there's a new font in this slot, purge the old and change the name+face strings
if ( stricmp ( fontslot [ slotnum ] . slotname , slotname ) | | stricmp ( fontslot [ slotnum ] . facename , facename ) )
{
Q_strncpyz ( fontslot [ slotnum ] . slotname , slotname , sizeof ( fontslot [ slotnum ] . slotname ) ) ;
Q_strncpyz ( fontslot [ slotnum ] . facename , facename , sizeof ( fontslot [ slotnum ] . facename ) ) ;
for ( i = 0 ; i < fontslot [ slotnum ] . sizes ; i + + )
{
if ( fontslot [ slotnum ] . font [ i ] )
Font_Free ( fontslot [ slotnum ] . font [ i ] ) ;
fontslot [ slotnum ] . font [ i ] = NULL ;
}
fontslot [ slotnum ] . owner = 0 ;
}
if ( ! * facename )
return ;
fontslot [ slotnum ] . owner | = kdm_console ; //fonts owned by the console are never forgotten.
while ( sizenum < Cmd_Argc ( ) )
{
int sz = atoi ( Cmd_Argv ( sizenum + + ) ) ;
if ( sz < = 0 )
sz = 8 ;
for ( i = 0 ; i < fontslot [ slotnum ] . sizes ; i + + )
{
if ( fontslot [ slotnum ] . size [ i ] = = sz )
break ;
}
if ( i = = fontslot [ slotnum ] . sizes )
{
if ( i > = FONT_SIZES )
break ;
fontslot [ slotnum ] . size [ i ] = sz ;
if ( qrenderer = = QR_NONE )
fontslot [ slotnum ] . font [ i ] = NULL ;
else
fontslot [ slotnum ] . font [ i ] = Font_LoadFont ( fontslot [ slotnum ] . size [ i ] , facename ) ;
fontslot [ slotnum ] . sizes + + ;
}
}
}
}
2015-01-21 18:18:37 +00:00
//scrolling could be done with scissoring.
//selection could be done with some substrings
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_DrawTextField ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2010-07-11 02:22:39 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
float * size = G_VECTOR ( OFS_PARM1 ) ;
unsigned int flags = G_FLOAT ( OFS_PARM2 ) ;
2014-03-30 08:55:06 +00:00
const char * text = PR_GetStringOfs ( prinst , OFS_PARM3 ) ;
2015-01-21 18:18:37 +00:00
2015-04-27 06:19:33 +00:00
world_t * world = prinst - > parms - > user ;
vec2_t scale = { 8 , 8 } ;
struct font_s * font ;
if ( world - > g . drawfontscale & & ( world - > g . drawfontscale [ 0 ] | | world - > g . drawfontscale [ 1 ] ) )
{
scale [ 0 ] * = world - > g . drawfontscale [ 0 ] ;
scale [ 1 ] * = world - > g . drawfontscale [ 1 ] ;
}
font = PR_CL_ChooseFont ( world - > g . drawfont , scale [ 0 ] , scale [ 1 ] ) ;
R_DrawTextField ( pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] , text , CON_WHITEMASK , flags , font , scale ) ;
2010-07-11 02:22:39 +00:00
}
2004-11-23 14:29:51 +00:00
2009-11-17 00:15:44 +00:00
//float drawstring(vector position, string text, vector scale, float alpha, float flag) = #455;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawcolouredstring ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2009-11-17 00:15:44 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2014-03-30 08:55:06 +00:00
const char * text = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2009-11-17 00:15:44 +00:00
float * size = G_VECTOR ( OFS_PARM2 ) ;
2011-05-20 04:10:46 +00:00
float alpha = 0 ;
float flag = 0 ;
float r , g , b ;
------------------------------------------------------------------------
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 px , py , ipx ;
2015-07-14 14:47:00 +00:00
unsigned int codeflags , codepoint ;
2004-11-23 14:29:51 +00:00
2010-07-11 02:22:39 +00:00
conchar_t buffer [ 2048 ] , * str ;
------------------------------------------------------------------------
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 - > callargc > = 6 )
2011-05-20 04:10:46 +00:00
{
r = G_FLOAT ( OFS_PARM3 + 0 ) ;
g = G_FLOAT ( OFS_PARM3 + 1 ) ;
b = G_FLOAT ( OFS_PARM3 + 2 ) ;
alpha = G_FLOAT ( OFS_PARM4 ) ;
2013-06-23 02:17:02 +00:00
flag = G_FLOAT ( OFS_PARM5 ) ; //flag is mandatory to distinguish it.
2011-05-20 04:10:46 +00:00
}
else
{
r = 1 ;
g = 1 ;
b = 1 ;
alpha = G_FLOAT ( OFS_PARM3 ) ;
2013-06-23 02:17:02 +00:00
flag = prinst - > callargc > = 5 ? G_FLOAT ( OFS_PARM4 ) : 0 ;
2011-05-20 04:10:46 +00:00
}
2009-11-17 00:15:44 +00:00
if ( ! text )
2004-11-23 14:29:51 +00:00
{
2009-11-17 00:15:44 +00:00
G_FLOAT ( OFS_RETURN ) = - 1 ; //was null..
return ;
}
2004-11-23 14:29:51 +00:00
2010-07-11 02:22:39 +00:00
COM_ParseFunString ( CON_WHITEMASK , text , buffer , sizeof ( buffer ) , false ) ;
str = buffer ;
2013-05-11 05:03:07 +00:00
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
------------------------------------------------------------------------
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_CL_BeginString ( prinst , pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] , & px , & py ) ;
2012-10-08 04:36:10 +00:00
ipx = px ;
2015-11-18 07:37:39 +00:00
R2D_ImageColours ( r , g , b , alpha ) ;
2010-07-11 02:22:39 +00:00
while ( * str )
{
2015-07-14 14:47:00 +00:00
str = Font_Decode ( str , & codeflags , & codepoint ) ;
2016-12-09 09:09:12 +00:00
if ( codeflags & CON_HIDDEN )
continue ;
2015-07-14 14:47:00 +00:00
if ( codepoint = = ' \n ' )
2012-10-08 04:36:10 +00:00
py + = Font_CharHeight ( ) ;
2015-07-14 14:47:00 +00:00
else if ( codepoint = = ' \r ' )
2012-10-08 04:36:10 +00:00
px = ipx ;
else
2015-07-14 14:47:00 +00:00
px = Font_DrawScaleChar ( px , py , codeflags , codepoint ) ;
2010-07-11 02:22:39 +00:00
}
2015-11-18 07:37:39 +00:00
R2D_ImageColours ( 1 , 1 , 1 , 1 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
Font_EndString ( NULL ) ;
2013-05-11 05:03:07 +00:00
r2d_be_flags = 0 ;
2009-11-17 00:15:44 +00:00
}
2004-11-23 14:29:51 +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 QCBUILTIN PF_CL_stringwidth ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
2011-09-03 03:49:43 +00:00
conchar_t buffer [ 2048 ] , * end ;
float px , py ;
2014-03-30 08:55:06 +00:00
const char * text = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2011-05-27 17:59:31 +00:00
int usecolours = G_FLOAT ( OFS_PARM1 ) ;
------------------------------------------------------------------------
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 * size = ( prinst - > callargc > 2 ) ? G_VECTOR ( OFS_PARM2 ) : NULL ;
2011-05-20 04:10:46 +00:00
2011-09-03 03:49:43 +00:00
end = COM_ParseFunString ( CON_WHITEMASK , text , buffer , sizeof ( buffer ) , ! usecolours ) ;
2011-05-20 04:10:46 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
PR_CL_BeginString ( prinst , 0 , 0 , size ? size [ 0 ] : 8 , size ? size [ 1 ] : 8 , & px , & py ) ;
2013-06-23 02:17:02 +00:00
px = Font_LineScaleWidth ( buffer , end ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
Font_EndString ( NULL ) ;
2011-09-03 03:49:43 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
G_FLOAT ( OFS_RETURN ) = ( px * vid . width ) / vid . rotpixelwidth ;
2004-11-23 14:29:51 +00:00
}
2009-11-17 00:15:44 +00:00
//float drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawpic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2014-03-30 08:55:06 +00:00
const char * picname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2009-11-17 00:15:44 +00:00
float * size = G_VECTOR ( OFS_PARM2 ) ;
float * rgb = G_VECTOR ( OFS_PARM3 ) ;
float alpha = G_FLOAT ( OFS_PARM4 ) ;
2013-06-23 02:17:02 +00:00
int flag = prinst - > callargc > = 6 ? ( int ) G_FLOAT ( OFS_PARM5 ) : 0 ;
2004-11-23 14:29:51 +00:00
2009-11-17 00:15:44 +00:00
mpic_t * p ;
2004-11-23 14:29:51 +00:00
2011-03-31 01:14:01 +00:00
p = R2D_SafeCachePic ( picname ) ;
2014-10-05 20:04:11 +00:00
if ( ! p | | ! R_GetShaderSizes ( p , NULL , NULL , false ) )
2011-03-31 01:14:01 +00:00
p = R2D_SafePicFromWad ( picname ) ;
2014-02-07 08:38:40 +00:00
if ( ! p )
{
if ( ! CL_IsDownloading ( picname ) )
p = R2D_SafeCachePic ( " no_texture " ) ;
2015-07-06 14:47:46 +00:00
G_FLOAT ( OFS_RETURN ) = 0 ;
2014-02-07 08:38:40 +00:00
}
else
2015-07-06 14:47:46 +00:00
G_FLOAT ( OFS_RETURN ) = 1 ;
2004-11-23 14:29:51 +00:00
2011-04-20 23:34:13 +00:00
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
2011-03-31 01:14:01 +00:00
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
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 ( ( size [ 0 ] < 0 ) ^ ( size [ 1 ] < 0 ) )
R2D_Image ( pos [ 0 ] + size [ 0 ] , pos [ 1 ] + size [ 1 ] , - size [ 0 ] , - size [ 1 ] , 1 , 1 , 0 , 0 , p ) ;
else
R2D_Image ( pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] , 0 , 0 , 1 , 1 , p ) ;
2011-04-20 23:34:13 +00:00
r2d_be_flags = 0 ;
2004-11-23 14:29:51 +00:00
}
2015-02-02 08:01:53 +00:00
void QCBUILTIN PF_CL_drawrotpic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
float * pivot = G_VECTOR ( OFS_PARM0 ) ;
float * mins = G_VECTOR ( OFS_PARM1 ) ;
float * maxs = G_VECTOR ( OFS_PARM2 ) ;
const char * picname = PR_GetStringOfs ( prinst , OFS_PARM3 ) ;
float * rgb = G_VECTOR ( OFS_PARM4 ) ;
float alpha = G_FLOAT ( OFS_PARM5 ) ;
float angle = ( G_FLOAT ( OFS_PARM6 ) * M_PI ) / 180 ;
int flag = prinst - > callargc > = 8 ? ( int ) G_FLOAT ( OFS_PARM7 ) : 0 ;
vec2_t points [ 4 ] ;
vec2_t tcoords [ 4 ] ;
vec2_t saxis ;
vec2_t taxis ;
mpic_t * p ;
p = R2D_SafeCachePic ( picname ) ;
if ( ! p )
p = R2D_SafePicFromWad ( picname ) ;
saxis [ 0 ] = cos ( angle ) ;
saxis [ 1 ] = sin ( angle ) ;
taxis [ 0 ] = - sin ( angle ) ;
taxis [ 1 ] = cos ( angle ) ;
Vector2MA ( pivot , mins [ 0 ] , saxis , points [ 0 ] ) ; Vector2MA ( points [ 0 ] , mins [ 1 ] , taxis , points [ 0 ] ) ;
Vector2MA ( pivot , maxs [ 0 ] , saxis , points [ 1 ] ) ; Vector2MA ( points [ 1 ] , mins [ 1 ] , taxis , points [ 1 ] ) ;
Vector2MA ( pivot , maxs [ 0 ] , saxis , points [ 2 ] ) ; Vector2MA ( points [ 2 ] , maxs [ 1 ] , taxis , points [ 2 ] ) ;
Vector2MA ( pivot , mins [ 0 ] , saxis , points [ 3 ] ) ; Vector2MA ( points [ 3 ] , maxs [ 1 ] , taxis , points [ 3 ] ) ;
Vector2Set ( tcoords [ 0 ] , 0 , 0 ) ;
Vector2Set ( tcoords [ 1 ] , 1 , 0 ) ;
Vector2Set ( tcoords [ 2 ] , 1 , 1 ) ;
Vector2Set ( tcoords [ 3 ] , 0 , 1 ) ;
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
R2D_Image2dQuad ( points , tcoords , p ) ;
r2d_be_flags = 0 ;
G_FLOAT ( OFS_RETURN ) = 1 ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void QCBUILTIN PF_CL_drawsubpic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2009-11-17 00:15:44 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
float * size = G_VECTOR ( OFS_PARM1 ) ;
2014-03-30 08:55:06 +00:00
const char * picname = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
2009-11-17 00:15:44 +00:00
float * srcPos = G_VECTOR ( OFS_PARM3 ) ;
float * srcSize = G_VECTOR ( OFS_PARM4 ) ;
float * rgb = G_VECTOR ( OFS_PARM5 ) ;
float alpha = G_FLOAT ( OFS_PARM6 ) ;
2013-06-23 02:17:02 +00:00
int flag = prinst - > callargc > = 8 ? ( int ) G_FLOAT ( OFS_PARM7 ) : 0 ;
2004-11-23 14:29:51 +00:00
2009-11-17 00:15:44 +00:00
mpic_t * p ;
2004-11-23 14:29:51 +00:00
2011-03-31 01:14:01 +00:00
p = R2D_SafeCachePic ( picname ) ;
------------------------------------------------------------------------
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 ( ! p )
p = R2D_SafePicFromWad ( picname ) ;
2004-11-23 14:29:51 +00:00
2011-04-20 23:34:13 +00:00
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
2011-03-31 01:14:01 +00:00
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
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 ( ( size [ 0 ] < 0 ) ^ ( size [ 1 ] < 0 ) )
R2D_Image ( pos [ 0 ] + size [ 0 ] , pos [ 1 ] + size [ 1 ] , - size [ 0 ] , - size [ 1 ] , srcPos [ 0 ] + srcSize [ 0 ] , srcPos [ 1 ] + srcSize [ 1 ] , srcPos [ 0 ] , srcPos [ 1 ] , p ) ;
else
R2D_Image ( pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] , srcPos [ 0 ] , srcPos [ 1 ] , srcPos [ 0 ] + srcSize [ 0 ] , srcPos [ 1 ] + srcSize [ 1 ] , p ) ;
2011-04-20 23:34:13 +00:00
r2d_be_flags = 0 ;
2004-11-23 14:29:51 +00:00
2009-11-17 00:15:44 +00:00
G_FLOAT ( OFS_RETURN ) = 1 ;
}
2015-02-02 08:01:53 +00:00
void QCBUILTIN PF_CL_drawrotsubpic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
float * pivot = G_VECTOR ( OFS_PARM0 ) ;
float * mins = G_VECTOR ( OFS_PARM1 ) ;
float * maxs = G_VECTOR ( OFS_PARM2 ) ;
const char * picname = PR_GetStringOfs ( prinst , OFS_PARM3 ) ;
float * srcPos = G_VECTOR ( OFS_PARM4 ) ;
float * srcSize = G_VECTOR ( OFS_PARM5 ) ;
float * rgb = G_VECTOR ( OFS_PARM6 ) ;
float alpha = G_FLOAT ( OFS_PARM7 + 0 ) ;
float angle = ( G_FLOAT ( OFS_PARM7 + 1 ) * M_PI ) / 180 ;
int flag = prinst - > callargc > = 8 ? ( int ) G_FLOAT ( OFS_PARM7 + 2 ) : 0 ;
vec2_t points [ 4 ] , tcoords [ 4 ] ;
vec2_t saxis ;
vec2_t taxis ;
mpic_t * p ;
saxis [ 0 ] = cos ( angle ) ;
saxis [ 1 ] = sin ( angle ) ;
taxis [ 0 ] = - sin ( angle ) ;
taxis [ 1 ] = cos ( angle ) ;
p = R2D_SafeCachePic ( picname ) ;
if ( ! p )
p = R2D_SafePicFromWad ( picname ) ;
2004-11-23 14:29:51 +00:00
2015-02-02 08:01:53 +00:00
Vector2MA ( pivot , mins [ 0 ] , saxis , points [ 0 ] ) ; Vector2MA ( points [ 0 ] , mins [ 1 ] , taxis , points [ 0 ] ) ;
Vector2MA ( pivot , maxs [ 0 ] , saxis , points [ 1 ] ) ; Vector2MA ( points [ 1 ] , mins [ 1 ] , taxis , points [ 1 ] ) ;
Vector2MA ( pivot , maxs [ 0 ] , saxis , points [ 2 ] ) ; Vector2MA ( points [ 2 ] , maxs [ 1 ] , taxis , points [ 2 ] ) ;
Vector2MA ( pivot , mins [ 0 ] , saxis , points [ 3 ] ) ; Vector2MA ( points [ 3 ] , maxs [ 1 ] , taxis , points [ 3 ] ) ;
Vector2Set ( tcoords [ 0 ] , srcPos [ 0 ] , srcPos [ 1 ] ) ;
Vector2Set ( tcoords [ 1 ] , srcPos [ 0 ] + srcSize [ 0 ] , srcPos [ 1 ] ) ;
Vector2Set ( tcoords [ 2 ] , srcPos [ 0 ] + srcSize [ 0 ] , srcPos [ 1 ] + srcSize [ 1 ] ) ;
Vector2Set ( tcoords [ 3 ] , srcPos [ 0 ] , srcPos [ 1 ] + srcSize [ 1 ] ) ;
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
R2D_Image2dQuad ( points , tcoords , p ) ;
r2d_be_flags = 0 ;
G_FLOAT ( OFS_RETURN ) = 1 ;
}
2004-11-23 14:29:51 +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 QCBUILTIN PF_CL_is_cached_pic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2014-03-30 08:55:06 +00:00
const char * str ;
2004-11-23 14:29:51 +00:00
str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2013-08-21 07:14:39 +00:00
G_FLOAT ( OFS_RETURN ) = ! ! R_RegisterCustom ( str , SUF_2D , NULL , NULL ) ;
2004-11-23 14:29:51 +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 QCBUILTIN PF_CL_precache_pic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2014-03-30 08:55:06 +00:00
const char * str ;
2004-12-24 08:45:56 +00:00
mpic_t * pic ;
2008-03-11 13:36:18 +00:00
float fromwad ;
2006-01-11 22:23:23 +00:00
2004-11-23 14:29:51 +00:00
str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
------------------------------------------------------------------------
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 - > callargc > 1 )
2008-03-11 13:36:18 +00:00
fromwad = G_FLOAT ( OFS_PARM1 ) ;
else
fromwad = false ;
2004-11-23 14:29:51 +00:00
2008-03-11 13:36:18 +00:00
if ( fromwad )
2011-03-31 01:14:01 +00:00
pic = R2D_SafePicFromWad ( str ) ;
2008-03-11 13:36:18 +00:00
else
{
2014-06-21 17:58:17 +00:00
pic = R2D_SafeCachePic ( str ) ;
2014-10-05 20:04:11 +00:00
if ( ( ! pic | | ! R_GetShaderSizes ( pic , NULL , NULL , true ) ) & & cls . state
2008-11-09 22:29:28 +00:00
# ifndef CLIENTONLY
& & ! sv . active
# endif
2014-06-21 17:58:17 +00:00
& & strchr ( str , ' . ' ) ) //only try to download it if it looks as though it contains a path.
2008-11-09 22:29:28 +00:00
CL_CheckOrEnqueDownloadFile ( str , str , 0 ) ;
2008-03-11 13:36:18 +00:00
}
2004-11-23 14:29:51 +00:00
2015-02-02 08:01:53 +00:00
if ( pic & & R_GetShaderSizes ( pic , NULL , NULL , true ) )
2004-11-23 14:29:51 +00:00
G_INT ( OFS_RETURN ) = G_INT ( OFS_PARM0 ) ;
else
G_INT ( OFS_RETURN ) = 0 ;
}
2016-07-12 00:40:13 +00:00
//warning: not threaded.
void QCBUILTIN PF_CL_uploadimage ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * imagename = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
int width = G_INT ( OFS_PARM1 ) ;
int height = G_INT ( OFS_PARM2 ) ;
int src = G_INT ( OFS_PARM3 ) ; //ptr
int size = width * height * 4 ;
void * imgptr ;
texid_t tid ;
G_INT ( OFS_RETURN ) = 0 ; //assume the worst
if ( width < 0 | | height < 0 | | width > 16384 | | height > 16384 )
{ //this is actually kinda likely when everyone assumes everything is a float.
PR_BIError ( prinst , " PF_CL_uploadimage: dimensions are out of range \n " ) ;
return ;
}
//FIXME: this should use a proper qclib function to validate more reliably / reusably
if ( src < = 0 | | src + size > = prinst - > stringtablesize )
{
PR_BIError ( prinst , " PF_CL_uploadimage: invalid source \n " ) ;
return ;
}
imgptr = prinst - > stringtable + src ;
tid = Image_FindTexture ( imagename , NULL , RT_IMAGEFLAGS ) ;
if ( ! TEXVALID ( tid ) )
tid = Image_CreateTexture ( imagename , NULL , RT_IMAGEFLAGS ) ;
Image_Upload ( tid , TF_RGBA32 , imgptr , NULL , width , height , RT_IMAGEFLAGS ) ;
tid - > width = width ;
tid - > height = height ;
G_INT ( OFS_RETURN ) = 1 ;
}
//warning: not threadable. hopefully noone abuses it.
void QCBUILTIN PF_CL_readimage ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
size_t filesize ;
const char * filename = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
int imagewidth , imageheight ;
qboolean hasalpha ;
void * filedata ;
G_INT ( OFS_RETURN ) = 0 ; //assume the worst
G_INT ( OFS_PARM1 ) = 0 ; //out width
G_INT ( OFS_PARM2 ) = 0 ; //out height
filedata = FS_LoadMallocFile ( filename , & filesize ) ;
if ( filedata )
{
qbyte * imagedata = Read32BitImageFile ( filedata , filesize , & imagewidth , & imageheight , & hasalpha , filename ) ;
Z_Free ( filedata ) ;
if ( imagedata )
{
void * ptr = prinst - > AddressableAlloc ( prinst , imagewidth * imageheight * 4 ) ;
if ( ptr )
{
memcpy ( ptr , imagedata , imagewidth * imageheight * 4 ) ;
G_INT ( OFS_RETURN ) = ( char * ) ptr - prinst - > stringtable ;
G_INT ( OFS_PARM1 ) = imagewidth ; //out width
G_INT ( OFS_PARM2 ) = imageheight ; //out height
}
BZ_Free ( imagedata ) ;
}
}
}
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_free_pic ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2013-05-11 05:03:07 +00:00
//we don't support this, as the shader could be used elsewhere also, and we have pointers to things.
/*
2004-11-23 14:29:51 +00:00
char * str ;
str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2013-05-11 05:03:07 +00:00
R_UnloadShader ( R_RegisterCustom ( str , NULL , NULL ) ) ;
*/
2004-11-23 14:29:51 +00:00
}
//float drawcharacter(vector position, float character, vector scale, vector rgb, float alpha, float flag) = #454;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawcharacter ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
float * pos = G_VECTOR ( OFS_PARM0 ) ;
int chara = G_FLOAT ( OFS_PARM1 ) ;
float * size = G_VECTOR ( OFS_PARM2 ) ;
float * rgb = G_VECTOR ( OFS_PARM3 ) ;
float alpha = G_FLOAT ( OFS_PARM4 ) ;
2013-06-23 02:17:02 +00:00
int flag = prinst - > callargc > = 6 ? G_FLOAT ( OFS_PARM5 ) : 0 ;
2004-11-23 14:29:51 +00:00
2010-07-11 02:22:39 +00:00
float x , y ;
2004-11-23 14:29:51 +00:00
if ( ! chara )
{
G_FLOAT ( OFS_RETURN ) = - 1 ; //was null..
return ;
}
2012-11-27 03:23:19 +00:00
//no control chars. use quake ones if so
2013-05-11 14:02:55 +00:00
if ( ! ( flag & 4 ) )
if ( chara < 32 & & chara ! = ' \t ' )
chara | = 0xe000 ;
2012-11-27 03:23:19 +00:00
2013-05-11 14:02:55 +00:00
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
------------------------------------------------------------------------
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_CL_BeginString ( prinst , pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] , & x , & y ) ;
2015-11-18 07:37:39 +00:00
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
2015-07-14 14:47:00 +00:00
Font_DrawScaleChar ( x , y , CON_WHITEMASK , chara ) ;
2015-11-18 07:37:39 +00:00
R2D_ImageColours ( 1 , 1 , 1 , 1 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
Font_EndString ( NULL ) ;
2013-05-11 14:02:55 +00:00
r2d_be_flags = 0 ;
2004-11-23 14:29:51 +00:00
G_FLOAT ( OFS_RETURN ) = 1 ;
}
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2009-05-24 10:11:17 +00:00
//float drawrawstring(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #455;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawrawstring ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2013-10-08 14:28:11 +00:00
{
2004-11-23 14:29:51 +00:00
float * pos = G_VECTOR ( OFS_PARM0 ) ;
2014-03-30 08:55:06 +00:00
const char * text = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2004-11-23 14:29:51 +00:00
float * size = G_VECTOR ( OFS_PARM2 ) ;
2009-11-04 21:16:50 +00:00
float * rgb = G_VECTOR ( OFS_PARM3 ) ;
float alpha = G_FLOAT ( OFS_PARM4 ) ;
2013-06-23 02:17:02 +00:00
int flag = prinst - > callargc > = 6 ? G_FLOAT ( OFS_PARM5 ) : 0 ;
2010-07-11 02:22:39 +00:00
float x , y ;
2012-11-27 03:23:19 +00:00
unsigned int c ;
2013-05-03 04:28:08 +00:00
int error ;
2004-11-23 14:29:51 +00:00
if ( ! text )
{
G_FLOAT ( OFS_RETURN ) = - 1 ; //was null..
return ;
}
2013-06-23 02:17:02 +00:00
r2d_be_flags = PF_SelectDPDrawFlag ( flag ) ;
------------------------------------------------------------------------
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_CL_BeginString ( prinst , pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] , & x , & y ) ;
2015-11-18 07:37:39 +00:00
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
2011-05-20 04:10:46 +00:00
2004-11-23 14:29:51 +00:00
while ( * text )
{
2013-05-03 04:28:08 +00:00
if ( 1 ) //VMUTF8)
2014-03-30 08:55:06 +00:00
c = unicode_decode ( & error , text , ( char * * ) & text , false ) ;
2013-05-03 04:28:08 +00:00
else
{
//FIXME: which charset is this meant to be using?
//quakes? 8859-1? utf8? some weird hacky mixture?
c = * text + + & 0xff ;
if ( ( c & 0x7f ) < 32 )
c | = 0xe000 ; //if its a control char, just use the quake range instead.
else if ( c & 0x80 )
c | = 0xe000 ; //if its a high char, just use the quake range instead. we could colour it, but why bother
}
2015-07-14 14:47:00 +00:00
x = Font_DrawScaleChar ( x , y , CON_WHITEMASK , c ) ;
2004-11-23 14:29:51 +00:00
}
2015-11-18 07:37:39 +00:00
R2D_ImageColours ( 1 , 1 , 1 , 1 ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
Font_EndString ( NULL ) ;
2013-06-23 02:17:02 +00:00
r2d_be_flags = 0 ;
2004-11-23 14:29:51 +00:00
}
2008-11-09 22:29:28 +00:00
2013-06-23 02:17:02 +00:00
//void (float width, vector pos1, vector pos2, vector rgb, float alpha, optional float flags) drawline;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawline ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-05-24 10:11:17 +00:00
{
2013-06-23 02:17:02 +00:00
//float width = G_FLOAT(OFS_PARM0);
float * point1 = G_VECTOR ( OFS_PARM1 ) ;
float * point2 = G_VECTOR ( OFS_PARM2 ) ;
float * rgb = G_VECTOR ( OFS_PARM3 ) ;
float alpha = G_FLOAT ( OFS_PARM4 ) ;
int flags = prinst - > callargc > = 6 ? G_FLOAT ( OFS_PARM5 ) : 0 ;
shader_t * shader_draw_line ;
//this shader lookup might get pricy.
2013-08-21 07:14:39 +00:00
shader_draw_line = R_RegisterShader ( " shader_draw_line " , SUF_NONE ,
2013-06-23 02:17:02 +00:00
" { \n "
" program defaultfill \n "
" { \n "
" map $whiteimage \n "
" rgbgen exactvertex \n "
" alphagen vertex \n "
2014-07-01 02:51:41 +00:00
" blendfunc blend \n "
2013-06-23 02:17:02 +00:00
" } \n "
" } \n " ) ;
2017-03-21 17:51:34 +00:00
r2d_be_flags = PF_SelectDPDrawFlag ( flags ) ;
dpp7: Treat 'dropped' c2s packets as choked when using dpp7 protocols. This is because the protocol provides no way to disambiguate, and I don't like false reports of packetloss (only reliables loss can be detected, and that's not frequent enough to be meaningful). Pings can still be determined with dpp7, for those few packets which are acked.
package manager: reworked to enable/disable plugins when downloaded, which can also be present-but-disabled.
package manager: display a confirmation prompt before applying changes. do not allow other changes to be made while applying. prompt may be skipped with 'pkg apply' in dedicated servers.
sv: downloads are no longer forced to lower case.
sv: added sv_demoAutoCompress cvar. set to 1 to directly record to *.mvd.gz
cl: properly support directly playing .mvd.gz files
menus: reworked to separate mouse and keyboard focus. mouse focus becomes keyboard focus only on mouse clicks. tooltips follow mouse cursors.
menus: cleaned up menu heirachy a little. now simpler.
server browser: changed 'hide *' filters to 'show *' instead. I felt it was more logical.
deluxmapping: changed to disabled, load, generate, like r_loadlit is.
render targets api now supports negative formats to mean nearest filtering, where filtering is part of texture state.
drawrotpic fixed, now batches and interacts with drawpic correctly.
drawline fixed, no interacts with draw* correctly, but still does not batch.
fixed saving games.
provide proper userinfo to nq clients, where supported.
qcc: catch string table overflows safely, giving errors instead of crashes. switch to 32bit statements if some over-sized function requires it.
qtv: some bigcoords support tweaks
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5073 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-03-21 05:27:07 +00:00
R2D_ImageColours ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] , alpha ) ;
R2D_Line ( point1 [ 0 ] , point1 [ 1 ] , point2 [ 0 ] , point2 [ 1 ] , shader_draw_line ) ;
R2D_ImageColours ( 1 , 1 , 1 , 1 ) ;
2017-03-21 17:51:34 +00:00
r2d_be_flags = 0 ;
2009-11-17 00:15:44 +00:00
}
//vector drawgetimagesize(string pic) = #460;
------------------------------------------------------------------------
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 QCBUILTIN PF_CL_drawgetimagesize ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
2014-03-30 08:55:06 +00:00
const char * picname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2011-03-31 01:14:01 +00:00
mpic_t * p = R2D_SafeCachePic ( picname ) ;
2009-11-17 00:15:44 +00:00
float * ret = G_VECTOR ( OFS_RETURN ) ;
2014-10-05 20:04:11 +00:00
int iw , ih ;
if ( R_GetShaderSizes ( p , & iw , & ih , true ) > 0 )
2009-11-17 00:15:44 +00:00
{
2014-10-05 20:04:11 +00:00
ret [ 0 ] = iw ;
ret [ 1 ] = ih ;
2009-11-17 00:15:44 +00:00
ret [ 2 ] = 0 ;
}
else
{
ret [ 0 ] = 0 ;
ret [ 1 ] = 0 ;
ret [ 2 ] = 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
//vector getmousepos(void) = #66;
void QCBUILTIN PF_cl_getmousepos ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
float * ret = G_VECTOR ( OFS_RETURN ) ;
2013-10-08 14:28:11 +00:00
world_t * world = prinst - > parms - > user ;
unsigned int target = world - > keydestmask ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
2013-10-08 14:28:11 +00:00
if ( key_dest_absolutemouse & target )
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
{
ret [ 0 ] = mousecursor_x ;
ret [ 1 ] = mousecursor_y ;
}
else
{
ret [ 0 ] = mousemove_x ;
ret [ 1 ] = mousemove_y ;
}
mousemove_x = 0 ;
mousemove_y = 0 ;
// extern int mousecursor_x, mousecursor_y;
// ret[0] = mousecursor_x;
// ret[1] = mousecursor_y;
ret [ 2 ] = 0 ;
}
2013-08-21 07:14:39 +00:00
void QCBUILTIN PF_SubConGetSet ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
2014-03-30 08:55:06 +00:00
const char * conname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
const char * field = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
const char * value = ( prinst - > callargc > 2 ) ? PR_GetStringOfs ( prinst , OFS_PARM2 ) : NULL ;
2013-08-21 07:14:39 +00:00
console_t * con = Con_FindConsole ( conname ) ;
G_INT ( OFS_RETURN ) = 0 ;
if ( ! con )
{
//null if it doesn't exist
return ;
}
if ( ! strcmp ( field , " title " ) )
{
RETURN_TSTRING ( con - > title ) ;
if ( value )
Q_strncpyz ( con - > title , value , sizeof ( con - > title ) ) ;
}
else if ( ! strcmp ( field , " name " ) )
{
RETURN_TSTRING ( con - > name ) ;
if ( value & & * value & & * con - > name )
Q_strncpyz ( con - > name , value , sizeof ( con - > name ) ) ;
}
else if ( ! strcmp ( field , " next " ) )
{
con = con - > next ;
if ( con )
RETURN_TSTRING ( con - > name ) ;
}
else if ( ! strcmp ( field , " unseen " ) )
{
RETURN_TSTRING ( va ( " %i " , con - > unseentext ) ) ;
if ( value )
con - > unseentext = atoi ( value ) ;
}
2013-11-21 23:02:28 +00:00
else if ( ! strcmp ( field , " markup " ) )
{
int cur ;
if ( con - > parseflags & PFS_NOMARKUP )
cur = 0 ;
else if ( con - > parseflags & PFS_KEEPMARKUP )
cur = 2 ;
else
cur = 1 ;
RETURN_TSTRING ( va ( " %i " , cur ) ) ;
if ( value )
{
cur = atoi ( value ) ;
con - > parseflags & = ~ ( PFS_NOMARKUP | PFS_KEEPMARKUP ) ;
if ( cur = = 0 )
con - > parseflags | = PFS_NOMARKUP ;
else if ( cur = = 2 )
con - > parseflags | = PFS_KEEPMARKUP ;
}
}
else if ( ! strcmp ( field , " forceutf8 " ) )
{
RETURN_TSTRING ( ( con - > parseflags & PFS_FORCEUTF8 ) ? " 1 " : " 0 " ) ;
if ( value )
{
con - > parseflags & = ~ PFS_FORCEUTF8 ;
if ( atoi ( value ) )
con - > parseflags | = PFS_FORCEUTF8 ;
}
}
2014-04-24 01:53:01 +00:00
else if ( ! strcmp ( field , " close " ) )
{
RETURN_TSTRING ( " 0 " ) ; //meant to return the old state...
if ( value & & atoi ( value ) )
2016-07-12 00:40:13 +00:00
{
if ( con - > close & & atoi ( value ) ! = 2 & & ! con - > close ( con , true ) )
return ;
2014-04-24 01:53:01 +00:00
Con_Destroy ( con ) ;
2016-07-12 00:40:13 +00:00
}
2014-04-24 01:53:01 +00:00
}
else if ( ! strcmp ( field , " clear " ) )
{
RETURN_TSTRING ( con - > linecount ? " 0 " : " 1 " ) ;
if ( value & & atoi ( value ) )
Con_ClearCon ( con ) ;
}
2013-08-21 07:14:39 +00:00
else if ( ! strcmp ( field , " hidden " ) )
{
2015-04-14 23:12:17 +00:00
RETURN_TSTRING ( ( con - > flags & CONF_HIDDEN ) ? " 1 " : " 0 " ) ;
2013-08-21 07:14:39 +00:00
if ( value )
2015-04-14 23:12:17 +00:00
con - > flags = ( con - > flags & ~ CONF_HIDDEN ) | ( atoi ( value ) ? CONF_HIDDEN : 0 ) ;
2013-08-21 07:14:39 +00:00
}
else if ( ! strcmp ( field , " linecount " ) )
{
RETURN_TSTRING ( va ( " %i " , con - > linecount ) ) ;
if ( value )
con - > unseentext = atoi ( value ) ;
}
2015-08-22 02:59:01 +00:00
else if ( ! strcmp ( field , " backimage " ) )
{
RETURN_TSTRING ( con - > backshader ? con - > backshader - > name : con - > backimage ) ;
if ( value )
{
Q_strncpyz ( con - > backimage , value , sizeof ( con - > backimage ) ) ;
if ( con - > backshader )
R_UnloadShader ( con - > backshader ) ;
}
}
else if ( ! strcmp ( field , " backvideomap " ) )
{
RETURN_TSTRING ( con - > backshader ? con - > backshader - > name : con - > backimage ) ;
if ( value )
{
Q_strncpyz ( con - > backimage , " " , sizeof ( con - > backimage ) ) ;
if ( con - > backshader )
R_UnloadShader ( con - > backshader ) ;
con - > backshader = R_RegisterCustom ( va ( " consolevid_%s " , con - > name ) , SUF_NONE , Shader_DefaultCinematic , value ) ;
}
}
2013-08-21 07:14:39 +00:00
}
void QCBUILTIN PF_SubConPrintf ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
char outbuf [ 4096 ] ;
2014-03-30 08:55:06 +00:00
const char * conname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
const char * fmt = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2013-08-21 07:14:39 +00:00
console_t * con = Con_FindConsole ( conname ) ;
if ( ! con )
return ;
PF_sprintf_internal ( prinst , pr_globals , fmt , 2 , outbuf , sizeof ( outbuf ) ) ;
2014-10-05 20:04:11 +00:00
Con_PrintCon ( con , outbuf , con - > parseflags ) ;
2013-08-21 07:14:39 +00:00
}
void QCBUILTIN PF_SubConDraw ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
2014-03-30 08:55:06 +00:00
const char * conname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2013-08-21 07:14:39 +00:00
float * pos = G_VECTOR ( OFS_PARM1 ) ;
float * size = G_VECTOR ( OFS_PARM2 ) ;
float fontsize = G_FLOAT ( OFS_PARM3 ) ;
console_t * con = Con_FindConsole ( conname ) ;
2013-10-08 14:28:11 +00:00
world_t * world = prinst - > parms - > user ;
2013-08-21 07:14:39 +00:00
if ( ! con )
return ;
2013-10-08 14:28:11 +00:00
if ( world - > g . drawfontscale )
{
// szx *= world->g.drawfontscale[0];
fontsize * = world - > g . drawfontscale [ 1 ] ;
}
2016-07-12 00:40:13 +00:00
Con_DrawOneConsole ( con , con - > flags & CONF_KEYFOCUSED , PR_CL_ChooseFont ( world - > g . drawfont , fontsize , fontsize ) , pos [ 0 ] , pos [ 1 ] , size [ 0 ] , size [ 1 ] , 0 ) ;
2013-08-21 07:14:39 +00:00
}
qboolean Key_Console ( console_t * con , unsigned int unicode , int key ) ;
void Key_ConsoleRelease ( console_t * con , unsigned int unicode , int key ) ;
void QCBUILTIN PF_SubConInput ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
2014-03-30 08:55:06 +00:00
const char * conname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2013-08-21 07:14:39 +00:00
int ie = G_FLOAT ( OFS_PARM1 ) ;
float pa = G_FLOAT ( OFS_PARM2 ) ;
float pb = G_FLOAT ( OFS_PARM3 ) ;
2014-02-13 23:54:57 +00:00
// float pc = G_FLOAT(OFS_PARM4);
2013-08-21 07:14:39 +00:00
console_t * con = Con_FindConsole ( conname ) ;
G_FLOAT ( OFS_RETURN ) = 0 ;
if ( ! con )
return ;
switch ( ie )
{
case CSIE_KEYDOWN :
//scan, char
2013-08-27 13:18:09 +00:00
if ( ( pa & & qcinput_scan ! = pa ) | | ( pb & & pb ! = qcinput_unicode ) )
G_FLOAT ( OFS_RETURN ) = 0 ;
else
G_FLOAT ( OFS_RETURN ) = Key_Console ( con , pb , MP_TranslateQCtoFTECodes ( pa ) ) ;
2013-08-21 07:14:39 +00:00
break ;
case CSIE_KEYUP :
//scan, char
Key_ConsoleRelease ( con , MP_TranslateQCtoFTECodes ( pa ) , pb ) ;
G_FLOAT ( OFS_RETURN ) = 0 ; //does not inhibit
break ;
case CSIE_MOUSEABS :
//x, y
2013-10-08 14:28:11 +00:00
if ( con = = con_current & & ( key_dest_mask & kdm_console ) )
2013-08-21 07:14:39 +00:00
break ; //no interfering with the main console!
con - > mousecursor [ 0 ] = pa ;
con - > mousecursor [ 1 ] = pb ;
G_FLOAT ( OFS_RETURN ) = true ;
break ;
case CSIE_FOCUS :
//mouse, key
if ( pb > = 0 )
{
con - > flags = ( con - > flags & ~ CONF_KEYFOCUSED ) | ( pb ? CONF_KEYFOCUSED : 0 ) ;
G_FLOAT ( OFS_RETURN ) = true ;
}
break ;
}
}
2009-11-17 00:15:44 +00:00
# endif
# ifdef MENU_DAT
typedef struct menuedict_s
{
2016-07-12 00:40:13 +00:00
enum ereftype_e ereftype ;
float freetime ; // sv.time when the object was freed
int entnum ;
unsigned int fieldsize ;
pbool readonly ; //world
void * fields ;
2009-11-17 00:15:44 +00:00
} menuedict_t ;
2014-05-30 03:57:30 +00:00
static struct
{
evalc_t chain ;
evalc_t model ;
evalc_t mins ;
evalc_t maxs ;
evalc_t origin ;
evalc_t angles ;
evalc_t skin ;
evalc_t colormap ;
evalc_t frame1 ;
evalc_t frame2 ;
evalc_t lerpfrac ;
evalc_t frame1time ;
evalc_t frame2time ;
evalc_t renderflags ;
2015-06-04 06:15:14 +00:00
evalc_t skinobject ;
2014-05-30 03:57:30 +00:00
} menuc_eval ;
static playerview_t menuview ;
2009-11-17 00:15:44 +00:00
int menuentsize ;
// cvars
# define MENUPROGSGROUP "Menu progs control"
2016-09-08 19:04:35 +00:00
cvar_t forceqmenu = CVAR ( " forceqmenu " , " 0 " ) ;
cvar_t pr_menuqc_coreonerror = CVAR ( " pr_menuqc_coreonerror " , " 1 " ) ;
2009-11-17 00:15:44 +00:00
//new generic functions.
2014-03-30 08:55:06 +00:00
const char * RemapCvarNameFromDPToFTE ( const char * name )
2009-11-17 00:15:44 +00:00
{
if ( ! stricmp ( name , " vid_bitsperpixel " ) )
return " vid_bpp " ;
if ( ! stricmp ( name , " _cl_playermodel " ) )
return " model " ;
if ( ! stricmp ( name , " _cl_playerskin " ) )
return " skin " ;
if ( ! stricmp ( name , " _cl_color " ) )
return " topcolor " ;
if ( ! stricmp ( name , " _cl_name " ) )
return " name " ;
if ( ! stricmp ( name , " v_contrast " ) )
return " v_contrast " ;
if ( ! stricmp ( name , " v_hwgamma " ) )
return " vid_hardwaregamma " ;
if ( ! stricmp ( name , " showfps " ) )
return " show_fps " ;
if ( ! stricmp ( name , " sv_progs " ) )
return " progs " ;
return name ;
2009-05-24 10:11:17 +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
static void QCBUILTIN PF_menu_cvar ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2008-11-09 22:29:28 +00:00
{
2009-11-17 00:15:44 +00:00
cvar_t * var ;
2014-03-30 08:55:06 +00:00
const char * str ;
2011-05-29 04:26:29 +00:00
2009-11-17 00:15:44 +00:00
str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2012-11-27 03:23:19 +00:00
if ( ! strcmp ( str , " vid_conwidth " ) )
G_FLOAT ( OFS_RETURN ) = vid . width ;
else if ( ! strcmp ( str , " vid_conheight " ) )
G_FLOAT ( OFS_RETURN ) = vid . height ;
2013-03-12 22:44:00 +00:00
else if ( ! strcmp ( str , " vid_pixwidth " ) )
G_FLOAT ( OFS_RETURN ) = vid . pixelwidth ;
else if ( ! strcmp ( str , " vid_pixheight " ) )
G_FLOAT ( OFS_RETURN ) = vid . pixelheight ;
2012-11-27 03:23:19 +00:00
else
2009-05-24 10:11:17 +00:00
{
2012-11-27 03:23:19 +00:00
str = RemapCvarNameFromDPToFTE ( str ) ;
var = Cvar_Get ( str , " " , 0 , " menu cvars " ) ;
2014-09-20 04:11:39 +00:00
if ( var & & ! ( var - > flags & CVAR_NOUNSAFEEXPAND ) )
2012-11-27 03:23:19 +00:00
{
2014-09-20 04:11:39 +00:00
//menuqc sees desired settings, not latched settings.
2012-11-27 03:23:19 +00:00
if ( var - > latched_string )
G_FLOAT ( OFS_RETURN ) = atof ( var - > latched_string ) ;
else
G_FLOAT ( OFS_RETURN ) = var - > value ;
}
else
G_FLOAT ( OFS_RETURN ) = 0 ;
2009-05-24 10:11:17 +00:00
}
2008-11-09 22:29:28 +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
static void QCBUILTIN PF_menu_cvar_set ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
2014-03-30 08:55:06 +00:00
const char * var_name , * val ;
2009-11-17 00:15:44 +00:00
cvar_t * var ;
2008-11-09 22:29:28 +00:00
2009-11-17 00:15:44 +00:00
var_name = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
var_name = RemapCvarNameFromDPToFTE ( var_name ) ;
val = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2008-11-09 22:29:28 +00:00
2009-11-17 00:15:44 +00:00
var = Cvar_Get ( var_name , val , 0 , " QC variables " ) ;
2014-09-20 04:11:39 +00:00
if ( var - > flags & CVAR_NOTFROMSERVER )
{
//fixme: menuqc needs some way to display a prompt to allow it anyway.
return ;
}
2009-11-17 00:15:44 +00:00
Cvar_Set ( var , val ) ;
}
------------------------------------------------------------------------
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
static void QCBUILTIN PF_menu_cvar_string ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-04 21:16:50 +00:00
{
2014-03-30 08:55:06 +00:00
const char * str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2009-11-17 00:15:44 +00:00
cvar_t * cv = Cvar_Get ( RemapCvarNameFromDPToFTE ( str ) , " " , 0 , " QC variables " ) ;
2014-04-24 01:53:01 +00:00
if ( ! cv )
G_INT ( OFS_RETURN ) = 0 ;
2014-09-20 04:11:39 +00:00
else if ( cv - > flags & CVAR_NOUNSAFEEXPAND )
G_INT ( OFS_RETURN ) = 0 ;
2014-04-24 01:53:01 +00:00
else if ( cv - > latched_string )
2014-09-20 04:11:39 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_TempString ( prinst , cv - > latched_string ) ;
2014-04-24 01:53:01 +00:00
else
2014-09-20 04:11:39 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_TempString ( prinst , cv - > string ) ;
2009-11-04 21:16:50 +00:00
}
2008-11-09 22:29:28 +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 QCBUILTIN PF_nonfatalobjerror ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
char * s ;
struct edict_s * ed ;
eval_t * selfp ;
2011-05-29 04:26:29 +00:00
2009-11-17 00:15:44 +00:00
s = PF_VarString ( prinst , 0 , pr_globals ) ;
2008-11-09 22:29:28 +00:00
2014-05-30 03:57:30 +00:00
PR_StackTrace ( prinst , true ) ;
2008-11-09 22:29:28 +00:00
2011-05-20 04:10:46 +00:00
selfp = PR_FindGlobal ( prinst , " self " , PR_CURRENT , NULL ) ;
2009-11-17 00:15:44 +00:00
if ( selfp & & selfp - > _int )
2004-11-23 14:29:51 +00:00
{
2009-11-17 00:15:44 +00:00
ed = PROG_TO_EDICT ( prinst , selfp - > _int ) ;
2004-11-23 14:29:51 +00:00
2009-11-17 00:15:44 +00:00
PR_PrintEdict ( prinst , ed ) ;
2004-11-23 14:29:51 +00:00
2009-11-17 00:15:44 +00:00
if ( developer . value )
2015-02-02 08:01:53 +00:00
{ //enable tracing.
PR_RunWarning ( prinst , " ======OBJECT ERROR====== \n %s \n " , s ) ;
return ;
}
2009-11-17 00:15:44 +00:00
else
{
ED_Free ( prinst , ed ) ;
}
2004-11-23 14:29:51 +00:00
}
2009-11-17 00:15:44 +00:00
Con_Printf ( " ======OBJECT ERROR====== \n %s \n " , s ) ;
2004-11-23 14:29:51 +00:00
}
2005-10-01 03:09:17 +00:00
2009-11-17 00:15:44 +00:00
//float isserver(void) = #60;
------------------------------------------------------------------------
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 QCBUILTIN PF_isserver ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2009-11-17 00:15:44 +00:00
# ifdef CLIENTONLY
G_FLOAT ( OFS_RETURN ) = false ;
# else
G_FLOAT ( OFS_RETURN ) = sv . state ! = ss_dead ;
2005-10-01 03:09:17 +00:00
# endif
2004-11-23 14:29:51 +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 QCBUILTIN PF_isdemo ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-11-27 03:23:19 +00:00
{
G_FLOAT ( OFS_RETURN ) = ! ! cls . demoplayback ;
}
2005-07-05 23:46:10 +00:00
2009-11-17 00:15:44 +00:00
//float clientstate(void) = #62;
------------------------------------------------------------------------
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 QCBUILTIN PF_clientstate ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-07-05 23:46:10 +00:00
{
2015-04-14 23:12:17 +00:00
if ( isDedicated )
G_FLOAT ( OFS_RETURN ) = 0 ;
else
G_FLOAT ( OFS_RETURN ) = cls . state > = ca_connected ? 2 : 1 ; //fit in with netquake (we never run a menu.dat dedicated)
2009-11-17 00:15:44 +00:00
}
2005-07-16 17:04:36 +00:00
2009-11-17 00:15:44 +00:00
//too specific to the prinst's builtins.
------------------------------------------------------------------------
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
static void QCBUILTIN PF_Fixme ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
2015-02-02 08:01:53 +00:00
int binum ;
char fname [ MAX_QPATH ] ;
if ( ! prinst - > GetBuiltinCallInfo ( prinst , & binum , fname , sizeof ( fname ) ) )
{
binum = 0 ;
strcpy ( fname , " ?unknown? " ) ;
}
2005-07-14 01:57:34 +00:00
2015-02-02 08:01:53 +00:00
Con_Printf ( " \n " ) ;
prinst - > RunError ( prinst , " \n Builtin %i:%s not implemented. \n Menu is not compatible. " , binum , fname ) ;
2009-11-17 00:15:44 +00:00
PR_BIError ( prinst , " bulitin not implemented " ) ;
2005-07-05 23:46:10 +00:00
}
2016-01-18 05:22:07 +00:00
static void QCBUILTIN PF_checkbuiltin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
func_t funcref = G_INT ( OFS_PARM0 ) ;
char * funcname = NULL ;
int args ;
int builtinno ;
if ( prinst - > GetFunctionInfo ( prinst , funcref , & args , & builtinno , funcname , sizeof ( funcname ) ) )
{ //qc defines the function at least. nothing weird there...
if ( builtinno > 0 & & builtinno < prinst - > parms - > numglobalbuiltins )
{
if ( ! prinst - > parms - > globalbuiltins [ builtinno ] | | prinst - > parms - > globalbuiltins [ builtinno ] = = PF_Fixme )
G_FLOAT ( OFS_RETURN ) = false ; //the builtin with that number isn't defined.
else
{
G_FLOAT ( OFS_RETURN ) = true ; //its defined, within the sane range, mapped, everything. all looks good.
//we should probably go through the available builtins and validate that the qc's name matches what would be expected
//this is really intended more for builtins defined as #0 though, in such cases, mismatched assumptions are impossible.
}
}
else
G_FLOAT ( OFS_RETURN ) = false ; //not a valid builtin (#0 builtins get remapped according to the function name)
}
else
{ //not valid somehow.
G_FLOAT ( OFS_RETURN ) = false ;
}
}
2005-07-05 23:46:10 +00:00
2004-11-23 14:29:51 +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 QCBUILTIN PF_CL_precache_sound ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2009-11-17 00:15:44 +00:00
{
2014-03-30 08:55:06 +00:00
const char * str ;
2011-05-29 04:26:29 +00:00
2009-11-17 00:15:44 +00:00
str = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2006-03-23 19:22:12 +00:00
2009-11-17 00:15:44 +00:00
if ( S_PrecacheSound ( str ) )
G_INT ( OFS_RETURN ) = G_INT ( OFS_PARM0 ) ;
2004-11-23 14:29:51 +00:00
else
2009-11-17 00:15:44 +00:00
G_INT ( OFS_RETURN ) = 0 ;
2004-11-23 14:29:51 +00:00
}
//void setkeydest(float dest) = #601;
------------------------------------------------------------------------
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 QCBUILTIN PF_cl_setkeydest ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2015-07-14 14:47:00 +00:00
//these arguments are stupid
2004-11-23 14:29:51 +00:00
switch ( ( int ) G_FLOAT ( OFS_PARM0 ) )
{
case 0 :
// key_game
2015-07-14 14:47:00 +00:00
if ( Key_Dest_Has ( kdm_gmenu ) )
2014-04-24 01:53:01 +00:00
{
2015-07-14 14:47:00 +00:00
Key_Dest_Remove ( kdm_gmenu ) ;
2014-05-20 02:23:37 +00:00
// Key_Dest_Remove(kdm_message);
2015-07-14 14:47:00 +00:00
// if (cls.state == ca_disconnected)
// Key_Dest_Add(kdm_console);
2014-04-24 01:53:01 +00:00
}
2004-11-23 14:29:51 +00:00
break ;
case 2 :
// key_menu
2013-10-08 14:28:11 +00:00
Key_Dest_Remove ( kdm_message ) ;
2015-07-14 14:47:00 +00:00
if ( ! Key_Dest_Has ( kdm_gmenu ) )
2013-12-02 14:30:30 +00:00
Key_Dest_Remove ( kdm_console ) ;
2015-07-14 14:47:00 +00:00
Key_Dest_Add ( kdm_gmenu ) ;
2004-11-23 14:29:51 +00:00
break ;
case 1 :
// key_message
2013-10-08 14:28:11 +00:00
//Key_Dest_Remove(kdm_menu);
//Key_Dest_Add(kdm_message);
2004-11-23 14:29:51 +00:00
// break;
default :
PR_BIError ( prinst , " PF_setkeydest: wrong destination %i ! \n " , ( int ) G_FLOAT ( OFS_PARM0 ) ) ;
}
}
//float getkeydest(void) = #602;
------------------------------------------------------------------------
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 QCBUILTIN PF_cl_getkeydest ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2015-07-14 14:47:00 +00:00
if ( Key_Dest_Has ( kdm_emenu ) )
G_FLOAT ( OFS_RETURN ) = 3 ;
else if ( Key_Dest_Has ( kdm_gmenu ) )
G_FLOAT ( OFS_RETURN ) = 2 ;
2013-10-08 14:28:11 +00:00
// else if (Key_Dest_Has(kdm_message))
// G_FLOAT(OFS_RETURN) = 1;
else
G_FLOAT ( OFS_RETURN ) = 0 ;
2004-11-23 14:29:51 +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
static void QCBUILTIN PF_Remove_ ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2005-02-28 07:16:19 +00:00
menuedict_t * ed ;
2011-05-29 04:26:29 +00:00
2005-02-28 07:16:19 +00:00
ed = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2016-07-12 00:40:13 +00:00
if ( ed - > ereftype = = ER_FREE )
2004-11-23 14:29:51 +00:00
{
Con_DPrintf ( " Tried removing free entity \n " ) ;
2014-05-30 03:57:30 +00:00
PR_StackTrace ( prinst , false ) ;
2004-11-23 14:29:51 +00:00
return ;
}
2005-02-28 07:16:19 +00:00
ED_Free ( prinst , ( void * ) ed ) ;
2004-11-23 14:29:51 +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
static void QCBUILTIN PF_CopyEntity ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2005-03-28 07:05:38 +00:00
menuedict_t * in , * out ;
2004-11-23 14:29:51 +00:00
2005-03-28 07:05:38 +00:00
in = ( menuedict_t * ) G_EDICT ( prinst , OFS_PARM0 ) ;
out = ( menuedict_t * ) G_EDICT ( prinst , OFS_PARM1 ) ;
2004-11-23 14:29:51 +00:00
2005-03-28 07:05:38 +00:00
memcpy ( out - > fields , in - > fields , menuentsize ) ;
2004-11-23 14:29:51 +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 QCBUILTIN PF_menu_checkextension ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
2014-03-30 08:55:06 +00:00
const char * extname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
2013-03-12 22:35:33 +00:00
int i ;
2004-11-23 14:29:51 +00:00
G_FLOAT ( OFS_RETURN ) = 0 ;
2013-03-12 22:35:33 +00:00
for ( i = 0 ; i < QSG_Extensions_count ; i + + )
{
if ( ! QSG_Extensions [ i ] . name )
continue ;
if ( ! stricmp ( extname , QSG_Extensions [ i ] . name ) )
{
G_FLOAT ( OFS_RETURN ) = 1 ;
break ;
}
}
2004-11-23 14:29:51 +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 QCBUILTIN PF_CL_precache_file ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-23 14:29:51 +00:00
{
G_INT ( OFS_RETURN ) = G_INT ( OFS_PARM0 ) ;
}
2004-11-26 06:07:41 +00:00
//entity findchainstring(.string _field, string match) = #26;
------------------------------------------------------------------------
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 QCBUILTIN PF_menu_findchain ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-26 06:07:41 +00:00
{
int i , f ;
2014-03-30 08:55:06 +00:00
const char * s ;
2007-06-20 00:02:54 +00:00
string_t t ;
2005-03-28 07:05:38 +00:00
menuedict_t * ent , * chain ; //note, all edicts share the common header, but don't use it's fields!
2004-11-26 06:07:41 +00:00
eval_t * val ;
2005-03-28 07:05:38 +00:00
chain = ( menuedict_t * ) * prinst - > parms - > sv_edicts ;
2004-11-26 06:07:41 +00:00
f = G_INT ( OFS_PARM0 ) + prinst - > fieldadjust ;
s = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
for ( i = 1 ; i < * prinst - > parms - > sv_num_edicts ; i + + )
{
2005-03-28 07:05:38 +00:00
ent = ( menuedict_t * ) EDICT_NUM ( prinst , i ) ;
2016-07-12 00:40:13 +00:00
if ( ent - > ereftype = = ER_FREE )
2004-11-26 06:07:41 +00:00
continue ;
2007-06-20 00:02:54 +00:00
t = * ( string_t * ) & ( ( float * ) ent - > fields ) [ f ] ;
2004-11-26 06:07:41 +00:00
if ( ! t )
continue ;
2007-06-20 00:02:54 +00:00
if ( strcmp ( PR_GetString ( prinst , t ) , s ) )
2004-11-26 06:07:41 +00:00
continue ;
2016-07-12 00:40:13 +00:00
val = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " chain " , ev_entity , & menuc_eval . chain ) ;
2004-11-26 06:07:41 +00:00
if ( val )
2005-03-28 07:05:38 +00:00
val - > edict = EDICT_TO_PROG ( prinst , ( void * ) chain ) ;
2004-11-26 06:07:41 +00:00
chain = ent ;
}
2005-03-28 07:05:38 +00:00
RETURN_EDICT ( prinst , ( void * ) chain ) ;
2004-11-26 06:07:41 +00:00
}
//entity findchainfloat(.float _field, float match) = #27;
------------------------------------------------------------------------
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 QCBUILTIN PF_menu_findchainfloat ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-11-26 06:07:41 +00:00
{
int i , f ;
float s ;
2005-03-28 07:05:38 +00:00
menuedict_t * ent , * chain ; //note, all edicts share the common header, but don't use it's fields!
2004-11-26 06:07:41 +00:00
eval_t * val ;
2005-03-28 07:05:38 +00:00
chain = ( menuedict_t * ) * prinst - > parms - > sv_edicts ;
2004-11-26 06:07:41 +00:00
f = G_INT ( OFS_PARM0 ) + prinst - > fieldadjust ;
s = G_FLOAT ( OFS_PARM1 ) ;
for ( i = 1 ; i < * prinst - > parms - > sv_num_edicts ; i + + )
{
2005-03-28 07:05:38 +00:00
ent = ( menuedict_t * ) EDICT_NUM ( prinst , i ) ;
2016-07-12 00:40:13 +00:00
if ( ent - > ereftype = = ER_FREE )
2004-11-26 06:07:41 +00:00
continue ;
2005-03-28 07:05:38 +00:00
if ( ( ( float * ) ent - > fields ) [ f ] ! = s )
2004-11-26 06:07:41 +00:00
continue ;
2016-07-12 00:40:13 +00:00
val = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " chain " , ev_entity , & menuc_eval . chain ) ;
2004-11-26 06:07:41 +00:00
if ( val )
2005-03-28 07:05:38 +00:00
val - > edict = EDICT_TO_PROG ( prinst , ( void * ) chain ) ;
2004-11-26 06:07:41 +00:00
chain = ent ;
}
2005-03-28 07:05:38 +00:00
RETURN_EDICT ( prinst , ( void * ) chain ) ;
2004-11-26 06:07:41 +00:00
}
2013-03-12 22:35:33 +00:00
//entity findchainflags(.float _field, float match);
void QCBUILTIN PF_menu_findchainflags ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int i , f ;
int s ;
menuedict_t * ent , * chain ; //note, all edicts share the common header, but don't use it's fields!
eval_t * val ;
chain = ( menuedict_t * ) * prinst - > parms - > sv_edicts ;
f = G_INT ( OFS_PARM0 ) + prinst - > fieldadjust ;
s = G_FLOAT ( OFS_PARM1 ) ;
for ( i = 1 ; i < * prinst - > parms - > sv_num_edicts ; i + + )
{
ent = ( menuedict_t * ) EDICT_NUM ( prinst , i ) ;
2016-07-12 00:40:13 +00:00
if ( ent - > ereftype = = ER_FREE )
2013-03-12 22:35:33 +00:00
continue ;
if ( ( int ) ( ( float * ) ent - > fields ) [ f ] & s )
continue ;
2016-07-12 00:40:13 +00:00
val = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " chain " , ev_entity , & menuc_eval . chain ) ;
2013-03-12 22:35:33 +00:00
if ( val )
val - > edict = EDICT_TO_PROG ( prinst , ( void * ) chain ) ;
chain = ent ;
}
RETURN_EDICT ( prinst , ( void * ) chain ) ;
}
2004-11-26 06:07:41 +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 QCBUILTIN PF_etof ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-12-02 07:15:29 +00:00
{
G_FLOAT ( OFS_RETURN ) = G_EDICTNUM ( prinst , OFS_PARM0 ) ;
}
------------------------------------------------------------------------
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 QCBUILTIN PF_ftoe ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-12-08 04:14:52 +00:00
{
int entnum = G_FLOAT ( OFS_PARM0 ) ;
RETURN_EDICT ( prinst , EDICT_NUM ( prinst , entnum ) ) ;
}
------------------------------------------------------------------------
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 QCBUILTIN PF_IsNotNull ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2004-12-08 04:14:52 +00:00
{
int str = G_INT ( OFS_PARM0 ) ;
2005-02-17 03:33:36 +00:00
G_FLOAT ( OFS_RETURN ) = ! ! str ;
}
//float altstr_count(string str) = #82;
//returns number of single quoted strings in the string.
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void QCBUILTIN PF_altstr_count ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-17 03:33:36 +00:00
{
2014-03-30 08:55:06 +00:00
const char * s ;
2005-02-17 03:33:36 +00:00
int count = 0 ;
s = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
for ( ; * s ; s + + )
{
if ( * s = = ' \\ ' )
{
if ( ! * + + s )
break ;
}
else if ( * s = = ' \' ' )
count + + ;
}
G_FLOAT ( OFS_RETURN ) = count / 2 ;
}
//string altstr_prepare(string str) = #83;
------------------------------------------------------------------------
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 QCBUILTIN PF_altstr_prepare ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-17 03:33:36 +00:00
{
2007-03-11 16:51:45 +00:00
char outstr [ 8192 ] , * out ;
2014-03-30 08:55:06 +00:00
const char * instr , * in ;
2005-02-17 03:33:36 +00:00
int size ;
// VM_SAFEPARMCOUNT( 1, VM_altstr_prepare );
instr = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
//VM_CheckEmptyString( instr );
2007-03-11 16:51:45 +00:00
for ( out = outstr , in = instr , size = sizeof ( outstr ) - 1 ; size & & * in ; size - - , in + + , out + + )
{
if ( * in = = ' \' ' )
{
2005-02-17 03:33:36 +00:00
* out + + = ' \\ ' ;
* out = ' \' ' ;
size - - ;
2007-03-11 16:51:45 +00:00
}
else
2005-02-17 03:33:36 +00:00
* out = * in ;
2007-03-11 16:51:45 +00:00
}
2005-02-17 03:33:36 +00:00
* out = 0 ;
2007-03-11 16:51:45 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_TempString ( prinst , outstr ) ;
2005-02-17 03:33:36 +00:00
}
//string altstr_get(string str, float num) = #84;
------------------------------------------------------------------------
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 QCBUILTIN PF_altstr_get ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-17 03:33:36 +00:00
{
2014-03-30 08:55:06 +00:00
const char * altstr , * pos ;
char outstr [ 8192 ] , * out ;
2005-02-17 03:33:36 +00:00
int count , size ;
// VM_SAFEPARMCOUNT( 2, VM_altstr_get );
altstr = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
//VM_CheckEmptyString( altstr );
count = G_FLOAT ( OFS_PARM1 ) ;
count = count * 2 + 1 ;
for ( pos = altstr ; * pos & & count ; pos + + )
2007-03-11 16:51:45 +00:00
{
2005-02-17 03:33:36 +00:00
if ( * pos = = ' \\ ' & & ! * + + pos )
break ;
else if ( * pos = = ' \' ' )
count - - ;
2007-03-11 16:51:45 +00:00
}
2005-02-17 03:33:36 +00:00
2007-03-11 16:51:45 +00:00
if ( ! * pos )
{
2005-02-17 03:33:36 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_SetString ( prinst , " " ) ;
return ;
}
2007-03-11 16:51:45 +00:00
for ( out = outstr , size = sizeof ( outstr ) - 1 ; size & & * pos ; size - - , pos + + , out + + )
{
if ( * pos = = ' \\ ' )
{
2005-02-17 03:33:36 +00:00
if ( ! * + + pos )
break ;
* out = * pos ;
size - - ;
2007-03-11 16:51:45 +00:00
}
else if ( * pos = = ' \' ' )
2005-02-17 03:33:36 +00:00
break ;
else
* out = * pos ;
2007-03-11 16:51:45 +00:00
}
2005-02-17 03:33:36 +00:00
* out = 0 ;
2013-03-12 22:35:33 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_TempString ( prinst , outstr ) ;
2005-02-17 03:33:36 +00:00
}
//string altstr_set(string str, float num, string set) = #85
------------------------------------------------------------------------
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 QCBUILTIN PF_altstr_set ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2005-02-17 03:33:36 +00:00
{
int num ;
2014-03-30 08:55:06 +00:00
const char * altstr , * str ;
const char * in ;
2007-03-11 16:51:45 +00:00
char outstr [ 8192 ] , * out ;
2005-02-17 03:33:36 +00:00
// VM_SAFEPARMCOUNT( 3, VM_altstr_set );
altstr = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
//VM_CheckEmptyString( altstr );
num = G_FLOAT ( OFS_PARM1 ) ;
str = PR_GetStringOfs ( prinst , OFS_PARM2 ) ;
//VM_CheckEmptyString( str );
2007-03-11 16:51:45 +00:00
out = outstr ;
2005-02-17 03:33:36 +00:00
for ( num = num * 2 + 1 , in = altstr ; * in & & num ; * out + + = * in + + )
2007-03-11 16:51:45 +00:00
{
2005-02-17 03:33:36 +00:00
if ( * in = = ' \\ ' & & ! * + + in )
break ;
else if ( * in = = ' \' ' )
num - - ;
2007-03-11 16:51:45 +00:00
}
2005-02-17 03:33:36 +00:00
2007-03-11 16:51:45 +00:00
if ( ! in )
{
2005-02-17 03:33:36 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_SetString ( prinst , " " ) ;
return ;
}
// copy set in
2007-03-11 16:51:45 +00:00
for ( ; * str ; * out + + = * str + + )
;
2005-02-17 03:33:36 +00:00
// now jump over the old contents
for ( ; * in ; in + + )
2007-03-11 16:51:45 +00:00
{
2005-02-17 03:33:36 +00:00
if ( * in = = ' \' ' | | ( * in = = ' \\ ' & & ! * + + in ) )
break ;
2007-03-11 16:51:45 +00:00
}
2005-02-17 03:33:36 +00:00
if ( ! in ) {
G_INT ( OFS_RETURN ) = ( int ) PR_SetString ( prinst , " " ) ;
return ;
}
strcpy ( out , in ) ;
2007-03-11 16:51:45 +00:00
G_INT ( OFS_RETURN ) = ( int ) PR_TempString ( prinst , outstr ) ;
2005-02-17 03:33:36 +00:00
2004-12-08 04:14:52 +00:00
}
2004-12-02 07:15:29 +00:00
2012-11-27 03:23:19 +00:00
//string(string serveraddress) crypto_getkeyfp
------------------------------------------------------------------------
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 QCBUILTIN PF_crypto_getkeyfp ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-11-27 03:23:19 +00:00
{
//not supported.
G_INT ( OFS_RETURN ) = 0 ;
}
//string(string serveraddress) crypto_getidfp
------------------------------------------------------------------------
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 QCBUILTIN PF_crypto_getidfp ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-11-27 03:23:19 +00:00
{
//not supported.
G_INT ( OFS_RETURN ) = 0 ;
}
//string(string serveraddress) crypto_getencryptlevel
------------------------------------------------------------------------
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 QCBUILTIN PF_crypto_getencryptlevel ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-11-27 03:23:19 +00:00
{
//not supported.
G_INT ( OFS_RETURN ) = 0 ;
}
//string(float i) crypto_getmykeyfp
------------------------------------------------------------------------
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 QCBUILTIN PF_crypto_getmykeyfp ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-11-27 03:23:19 +00:00
{
//not supported.
G_INT ( OFS_RETURN ) = 0 ;
}
//string(float i) crypto_getmyidfp
------------------------------------------------------------------------
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 QCBUILTIN PF_crypto_getmyidfp ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
2012-11-27 03:23:19 +00:00
{
//not supported.
G_INT ( OFS_RETURN ) = 0 ;
}
2014-05-30 03:57:30 +00:00
static void QCBUILTIN PF_m_precache_model ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
const char * modelname = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
Mod_ForName ( modelname , MLV_WARN ) ;
}
static void QCBUILTIN PF_m_setmodel ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
menuedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
2015-02-02 08:01:53 +00:00
const char * modelname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
2016-07-12 00:40:13 +00:00
eval_t * modelval = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " model " , ev_string , & menuc_eval . model ) ;
eval_t * minsval = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " mins " , ev_vector , & menuc_eval . mins ) ;
eval_t * maxsval = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " maxs " , ev_vector , & menuc_eval . maxs ) ;
2015-02-02 08:01:53 +00:00
model_t * mod = Mod_ForName ( modelname , MLV_WARN ) ;
2014-05-30 03:57:30 +00:00
if ( modelval )
2015-02-02 08:01:53 +00:00
modelval - > string = G_INT ( OFS_PARM1 ) ; //lets hope garbage collection is enough.
2015-04-14 23:12:17 +00:00
if ( mod )
while ( mod - > loadstate = = MLS_LOADING )
COM_WorkerPartialSync ( mod , & mod - > loadstate , MLS_LOADING ) ;
2014-05-30 03:57:30 +00:00
if ( mod & & minsval )
VectorCopy ( mod - > mins , minsval - > _vector ) ;
if ( mod & & maxsval )
VectorCopy ( mod - > maxs , maxsval - > _vector ) ;
}
2015-06-04 06:15:14 +00:00
static void QCBUILTIN PF_m_setcustomskin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
menuedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
const char * fname = PR_GetStringOfs ( prinst , OFS_PARM1 ) ;
const char * skindata = PF_VarString ( prinst , 2 , pr_globals ) ;
2016-07-12 00:40:13 +00:00
eval_t * val = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " skinobject " , ev_string , & menuc_eval . skinobject ) ;
2015-06-04 06:15:14 +00:00
if ( ! val )
return ;
if ( val - > _float > 0 )
{
Mod_WipeSkin ( val - > _float ) ;
val - > _float = 0 ;
}
if ( * fname | | * skindata )
{
if ( * skindata )
val - > _float = Mod_ReadSkinFile ( fname , skindata ) ;
else
val - > _float = - ( int ) Mod_RegisterSkinFile ( fname ) ;
}
}
2014-05-30 03:57:30 +00:00
//trivially basic
static void QCBUILTIN PF_m_setorigin ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
menuedict_t * ent = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
float * org = G_VECTOR ( OFS_PARM1 ) ;
2016-07-12 00:40:13 +00:00
eval_t * val = prinst - > GetEdictFieldValue ( prinst , ( void * ) ent , " origin " , ev_vector , & menuc_eval . origin ) ;
2014-05-30 03:57:30 +00:00
if ( val )
VectorCopy ( org , val - > _vector ) ;
}
static void QCBUILTIN PF_m_clearscene ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
// CL_DecayLights ();
# if defined(SKELETALOBJECTS) || defined(RAGDOLLS)
2017-01-13 00:39:50 +00:00
world_t * world = prinst - > parms - > user ;
if ( world )
skel_dodelete ( world ) ;
2014-05-30 03:57:30 +00:00
# endif
CL_ClearEntityLists ( ) ;
V_ClearRefdef ( & menuview ) ;
r_refdef . drawsbar = false ;
r_refdef . drawcrosshair = false ;
V_CalcRefdef ( & menuview ) ; //set up the defaults
r_refdef . flags | = RDF_NOWORLDMODEL ;
}
static qboolean CopyMenuEdictToEntity ( pubprogfuncs_t * prinst , menuedict_t * in , entity_t * out )
{
2016-07-12 00:40:13 +00:00
eval_t * modelval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " model " , ev_string , & menuc_eval . model ) ;
eval_t * originval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " origin " , ev_vector , & menuc_eval . origin ) ;
eval_t * anglesval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " angles " , ev_vector , & menuc_eval . angles ) ;
eval_t * skinval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " skin " , ev_float , & menuc_eval . skin ) ;
eval_t * frame1val = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " frame " , ev_float , & menuc_eval . frame1 ) ;
eval_t * frame2val = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " frame2 " , ev_float , & menuc_eval . frame2 ) ;
eval_t * lerpfracval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " lerpfrac " , ev_float , & menuc_eval . lerpfrac ) ;
eval_t * frame1timeval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " frame1time " , ev_float , & menuc_eval . frame1time ) ;
eval_t * frame2timeval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " frame2time " , ev_float , & menuc_eval . frame2time ) ;
eval_t * colormapval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " colormap " , ev_float , & menuc_eval . colormap ) ;
eval_t * renderflagsval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " renderflags " , ev_float , & menuc_eval . renderflags ) ;
eval_t * skinobjectval = prinst - > GetEdictFieldValue ( prinst , ( void * ) in , " skinobject " , ev_float , & menuc_eval . skinobject ) ;
2014-05-30 03:57:30 +00:00
int ival ;
int rflags ;
rflags = renderflagsval ? renderflagsval - > _float : 0 ;
memset ( out , 0 , sizeof ( * out ) ) ;
if ( modelval )
out - > model = Mod_ForName ( prinst - > StringToNative ( prinst , modelval - > _int ) , MLV_WARN ) ;
if ( originval )
VectorCopy ( originval - > _vector , out - > origin ) ;
if ( ! anglesval ) anglesval = ( eval_t * ) vec3_origin ;
AngleVectors ( anglesval - > _vector , out - > axis [ 0 ] , out - > axis [ 1 ] , out - > axis [ 2 ] ) ;
VectorInverse ( out - > axis [ 1 ] ) ;
out - > scale = 1 ;
out - > skinnum = skinval ? skinval - > _float : 0 ;
out - > framestate . g [ FS_REG ] . frame [ 0 ] = frame1val ? frame1val - > _float : 0 ;
out - > framestate . g [ FS_REG ] . frame [ 1 ] = frame2val ? frame2val - > _float : 0 ;
2015-02-02 08:01:53 +00:00
out - > framestate . g [ FS_REG ] . lerpweight [ 1 ] = lerpfracval ? lerpfracval - > _float : 0 ;
out - > framestate . g [ FS_REG ] . lerpweight [ 0 ] = 1 - out - > framestate . g [ FS_REG ] . lerpweight [ 1 ] ;
2014-05-30 03:57:30 +00:00
out - > framestate . g [ FS_REG ] . frametime [ 0 ] = frame1timeval ? frame1timeval - > _float : 0 ;
out - > framestate . g [ FS_REG ] . frametime [ 1 ] = frame2timeval ? frame2timeval - > _float : 0 ;
2015-06-04 06:15:14 +00:00
out - > customskin = skinobjectval ? skinobjectval - > _float : 0 ;
2014-05-30 03:57:30 +00:00
//FIXME: colourmap
ival = colormapval ? colormapval - > _float : 0 ;
out - > playerindex = - 1 ;
if ( ival > = 1024 )
{
//DP COLORMAP extension
out - > topcolour = ( ival > > 4 ) & 0x0f ;
out - > bottomcolour = ival & 0xf ;
}
/* else if (ival > 0 && ival <= MAX_CLIENTS)
{ //FIXME: tie to the current skin/topcolor/bottomcolor cvars somehow?
out - > playerindex = ival - 1 ;
out - > topcolour = cl . players [ ival - 1 ] . ttopcolor ;
out - > bottomcolour = cl . players [ ival - 1 ] . tbottomcolor ;
} */
else
{
out - > topcolour = TOP_DEFAULT ;
out - > bottomcolour = BOTTOM_DEFAULT ;
}
if ( rflags & CSQCRF_ADDITIVE )
out - > flags | = RF_ADDITIVE ;
if ( rflags & CSQCRF_DEPTHHACK )
out - > flags | = RF_DEPTHHACK ;
if ( out - > model )
return true ;
return false ;
}
static void QCBUILTIN PF_m_addentity ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
menuedict_t * in = ( void * ) G_EDICT ( prinst , OFS_PARM0 ) ;
entity_t ent ;
2016-07-12 00:40:13 +00:00
if ( in - > ereftype = = ER_FREE | | in - > entnum = = 0 )
2014-05-30 03:57:30 +00:00
{
Con_Printf ( " Tried drawing a free/removed/world entity \n " ) ;
return ;
}
if ( CopyMenuEdictToEntity ( prinst , in , & ent ) )
V_AddAxisEntity ( & ent ) ;
}
static void QCBUILTIN PF_m_renderscene ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
V_ApplyRefdef ( ) ;
R_RenderView ( ) ;
}
void QCBUILTIN PF_R_SetViewFlag ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals ) ;
void QCBUILTIN PF_R_GetViewFlag ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals ) ;
2015-02-02 08:01:53 +00:00
static void QCBUILTIN PF_menu_cprint ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
char * str = PF_VarString ( prinst , 0 , pr_globals ) ;
SCR_CenterPrint ( 0 , str , true ) ;
}
static void QCBUILTIN PF_cl_changelevel ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
# ifndef CLIENTONLY
const char * nextmap = PR_GetStringOfs ( prinst , OFS_PARM0 ) ;
if ( sv . active | | ! cls . state )
{
char buf [ 1024 ] ;
Cbuf_AddText ( va ( " changelevel %s \n " , COM_QuotedString ( nextmap , buf , sizeof ( buf ) , false ) ) , RESTRICT_INSECURE ) ;
}
# endif
}
static void QCBUILTIN PF_crash ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
int binum ;
char fname [ MAX_QPATH ] ;
//allow people to rename it or whatever
if ( ! prinst - > GetBuiltinCallInfo ( prinst , & binum , fname , sizeof ( fname ) ) )
{
binum = 0 ;
strcpy ( fname , " ?unknown? " ) ;
}
prinst - > RunError ( prinst , " \n %s called " , fname ) ;
}
static void QCBUILTIN PF_stackdump ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
prinst - > StackTrace ( prinst , true ) ;
}
# define PF_cl_clientcommand PF_Fixme
# define PF_altstr_ins PF_Fixme //insert after, apparently
2016-07-12 00:40:13 +00:00
static void MP_ConsoleCommand_f ( void )
{
char cmd [ 2048 ] ;
Q_snprintfz ( cmd , sizeof ( cmd ) , " %s %s " , Cmd_Argv ( 0 ) , Cmd_Args ( ) ) ;
MP_ConsoleCommand ( cmd ) ;
}
static void QCBUILTIN PF_menu_registercommand ( pubprogfuncs_t * prinst , struct globalvars_s * pr_globals )
{
char * str = PF_VarString ( prinst , 0 , pr_globals ) ;
if ( ! Cmd_Exists ( str ) )
Cmd_AddCommand ( str , MP_ConsoleCommand_f ) ;
}
2013-03-12 22:35:33 +00:00
static struct {
char * name ;
builtin_t bifunc ;
int ebfsnum ;
} BuiltinList [ ] = {
{ " checkextension " , PF_menu_checkextension , 1 } ,
2016-01-18 05:22:07 +00:00
{ " checkbuiltin " , PF_checkbuiltin , 0 } ,
2013-03-12 22:35:33 +00:00
{ " error " , PF_error , 2 } ,
{ " objerror " , PF_nonfatalobjerror , 3 } ,
{ " print " , PF_print , 4 } ,
2015-02-02 08:01:53 +00:00
{ " bprint " , PF_cl_bprint , 5 } ,
{ " msprint " , PF_cl_sprint , 6 } ,
{ " cprint " , PF_menu_cprint , 7 } ,
2013-03-12 22:35:33 +00:00
{ " normalize " , PF_normalize , 8 } ,
{ " vlen " , PF_vlen , 9 } ,
{ " vectoyaw " , PF_vectoyaw , 10 } ,
{ " vectoangles " , PF_vectoangles , 11 } ,
2016-07-29 20:25:48 +00:00
{ " crossproduct " , PF_crossproduct , 0 } ,
2013-03-12 22:35:33 +00:00
{ " random " , PF_random , 12 } ,
{ " localcmd " , PF_localcmd , 13 } ,
{ " cvar " , PF_menu_cvar , 14 } ,
{ " cvar_set " , PF_menu_cvar_set , 15 } ,
{ " dprint " , PF_dprint , 16 } ,
{ " ftos " , PF_ftos , 17 } ,
{ " fabs " , PF_fabs , 18 } ,
{ " vtos " , PF_vtos , 19 } ,
{ " etos " , PF_etos , 20 } ,
{ " stof " , PF_stof , 21 } ,
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
{ " stoi " , PF_stoi , 0 } ,
{ " itos " , PF_itos , 0 } ,
{ " stoh " , PF_stoh , 0 } ,
{ " htos " , PF_htos , 0 } ,
{ " ftoi " , PF_ftoi , 0 } ,
{ " itof " , PF_itof , 0 } ,
2013-03-12 22:35:33 +00:00
{ " spawn " , PF_Spawn , 22 } ,
{ " remove " , PF_Remove_ , 23 } ,
{ " find " , PF_FindString , 24 } ,
{ " findfloat " , PF_FindFloat , 25 } ,
2015-05-16 08:02:05 +00:00
{ " findentity " , PF_FindFloat , 25 } ,
2013-03-12 22:35:33 +00:00
{ " findchain " , PF_menu_findchain , 26 } ,
{ " findchainfloat " , PF_menu_findchainfloat , 27 } ,
{ " precache_file " , PF_CL_precache_file , 28 } ,
{ " precache_sound " , PF_CL_precache_sound , 29 } ,
{ " coredump " , PF_coredump , 30 } ,
{ " traceon " , PF_traceon , 31 } ,
{ " traceoff " , PF_traceoff , 32 } ,
{ " eprint " , PF_eprint , 33 } ,
{ " rint " , PF_rint , 34 } ,
{ " floor " , PF_floor , 35 } ,
{ " ceil " , PF_ceil , 36 } ,
{ " nextent " , PF_nextent , 37 } ,
{ " sin " , PF_Sin , 38 } ,
{ " cos " , PF_Cos , 39 } ,
{ " sqrt " , PF_Sqrt , 40 } ,
{ " randomvector " , PF_randomvector , 41 } ,
{ " registercvar " , PF_registercvar , 42 } ,
{ " min " , PF_min , 43 } ,
{ " max " , PF_max , 44 } ,
{ " bound " , PF_bound , 45 } ,
{ " pow " , PF_pow , 46 } ,
2015-08-10 18:28:23 +00:00
{ " logarithm " , PF_Logarithm , 0 } ,
2015-09-06 03:30:28 +00:00
{ " entityprotection " , PF_entityprotection , 0 } ,
2013-03-12 22:35:33 +00:00
{ " copyentity " , PF_CopyEntity , 47 } ,
{ " fopen " , PF_fopen , 48 } ,
{ " fclose " , PF_fclose , 49 } ,
{ " fgets " , PF_fgets , 50 } ,
{ " fputs " , PF_fputs , 51 } ,
2016-07-12 00:40:13 +00:00
{ " fread " , PF_fread , 0 } ,
{ " fwrite " , PF_fwrite , 0 } ,
2016-08-25 00:12:14 +00:00
{ " fseek " , PF_fseek , 0 } ,
{ " fsize " , PF_fsize , 0 } ,
2013-03-12 22:35:33 +00:00
{ " strlen " , PF_strlen , 52 } ,
{ " strcat " , PF_strcat , 53 } ,
{ " substring " , PF_substring , 54 } ,
{ " stov " , PF_stov , 55 } ,
2015-01-21 18:18:37 +00:00
{ " strzone " , PF_strzone , 56 } ,
{ " strunzone " , PF_strunzone , 57 } ,
2013-03-12 22:35:33 +00:00
{ " tokenize " , PF_Tokenize , 58 } ,
{ " argv " , PF_ArgV , 59 } ,
{ " isserver " , PF_isserver , 60 } ,
2015-02-02 08:01:53 +00:00
{ " clientcount " , PF_cl_clientcount , 61 } , //float clientcount(void) = #61;
2013-03-12 22:35:33 +00:00
{ " clientstate " , PF_clientstate , 62 } ,
2015-02-02 08:01:53 +00:00
{ " clientcommand " , PF_cl_clientcommand , 63 } , //void clientcommand(float client, string s) = #63;
{ " changelevel " , PF_cl_changelevel , 64 } , //void changelevel(string map) = #64;
2016-07-12 00:40:13 +00:00
{ " localsound " , PF_cl_localsound , 65 } ,
2013-03-12 22:35:33 +00:00
{ " getmousepos " , PF_cl_getmousepos , 66 } ,
{ " gettime " , PF_gettime , 67 } ,
{ " loadfromdata " , PF_loadfromdata , 68 } ,
{ " loadfromfile " , PF_loadfromfile , 69 } ,
{ " mod " , PF_mod , 70 } ,
{ " cvar_string " , PF_menu_cvar_string , 71 } ,
2015-02-02 08:01:53 +00:00
{ " crash " , PF_crash , 72 } , //void crash(void) = #72;
{ " stackdump " , PF_stackdump , 73 } , //void stackdump(void) = #73;
2013-03-12 22:35:33 +00:00
{ " search_begin " , PF_search_begin , 74 } ,
{ " search_end " , PF_search_end , 75 } ,
{ " search_getsize " , PF_search_getsize , 76 } ,
{ " search_getfilename " , PF_search_getfilename , 77 } ,
2015-02-02 08:01:53 +00:00
{ " search_getfilesize " , PF_search_getfilesize , 0 } ,
{ " search_getfilemtime " , PF_search_getfilemtime , 0 } ,
2013-03-12 22:35:33 +00:00
{ " chr2str " , PF_chr2str , 78 } ,
{ " etof " , PF_etof , 79 } ,
{ " ftoe " , PF_ftoe , 80 } ,
{ " validstring " , PF_IsNotNull , 81 } ,
{ " altstr_count " , PF_altstr_count , 82 } ,
{ " altstr_prepare " , PF_altstr_prepare , 83 } ,
{ " altstr_get " , PF_altstr_get , 84 } ,
{ " altstr_set " , PF_altstr_set , 85 } ,
2015-02-02 08:01:53 +00:00
{ " altstr_ins " , PF_altstr_ins , 86 } ,
2013-03-12 22:35:33 +00:00
{ " findflags " , PF_FindFlags , 87 } ,
{ " findchainflags " , PF_menu_findchainflags , 88 } ,
{ " mcvar_defstring " , PF_cvar_defstring , 89 } ,
2014-05-30 03:57:30 +00:00
{ " setmodel " , PF_m_setmodel , 90 } ,
{ " precache_model " , PF_m_precache_model , 91 } ,
{ " setorigin " , PF_m_setorigin , 92 } ,
2013-03-12 22:35:33 +00:00
//gap
{ " abort " , PF_Abort , 211 } ,
//gap
{ " strstrofs " , PF_strstrofs , 221 } ,
{ " str2chr " , PF_str2chr , 222 } ,
{ " chr2str " , PF_chr2str , 223 } ,
{ " strconv " , PF_strconv , 224 } ,
{ " strpad " , PF_strpad , 225 } ,
{ " infoadd " , PF_infoadd , 226 } ,
{ " infoget " , PF_infoget , 227 } ,
2013-06-23 02:17:02 +00:00
{ " strcmp " , PF_strncmp , 228 } ,
2013-03-12 22:35:33 +00:00
{ " strncmp " , PF_strncmp , 228 } ,
2013-06-23 02:17:02 +00:00
{ " strcasecmp " , PF_strncasecmp , 229 } ,
2013-03-12 22:35:33 +00:00
{ " strncasecmp " , PF_strncasecmp , 230 } ,
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
{ " strtrim " , PF_strtrim , 0 } ,
2013-03-12 22:35:33 +00:00
//gap
{ " shaderforname " , PF_shaderforname , 238 } ,
//gap
2013-05-03 04:28:08 +00:00
{ " hash_createtab " , PF_hash_createtab , 287 } ,
{ " hash_destroytab " , PF_hash_destroytab , 288 } ,
{ " hash_add " , PF_hash_add , 289 } ,
{ " hash_get " , PF_hash_get , 290 } ,
{ " hash_delete " , PF_hash_delete , 291 } ,
{ " hash_getkey " , PF_hash_getkey , 292 } ,
2013-08-21 07:14:39 +00:00
{ " hash_getcb " , PF_hash_getcb , 293 } ,
{ " checkcommand " , PF_checkcommand , 294 } ,
2014-05-30 03:57:30 +00:00
{ " argescape " , PF_argescape , 295 } ,
2013-05-03 04:28:08 +00:00
//gap
2014-05-30 03:57:30 +00:00
{ " clearscene " , PF_m_clearscene , 300 } ,
//no addentities
{ " addentity " , PF_m_addentity , 302 } , //FIXME: needs setmodel, origin, angles, colormap(eep), frame etc, skin,
{ " setproperty " , PF_R_SetViewFlag , 303 } , //should be okay to share
{ " renderscene " , PF_m_renderscene , 304 } , //too module-specific
// {"dynamiclight_add", PF_R_DynamicLight_Add, 305},//should be okay to share
{ " R_BeginPolygon " , PF_R_PolygonBegin , 306 } , //useful for 2d stuff
{ " R_PolygonVertex " , PF_R_PolygonVertex , 307 } ,
{ " R_EndPolygon " , PF_R_PolygonEnd , 308 } ,
{ " getproperty " , PF_R_GetViewFlag , 309 } , //should be okay to share
//unproject 310
//project 311
2013-12-08 20:06:55 +00:00
{ " print_csqc " , PF_print , 339 } ,
2013-06-23 02:17:02 +00:00
{ " keynumtostring_csqc " , PF_cl_keynumtostring , 340 } ,
2014-01-13 02:42:25 +00:00
{ " stringtokeynum_csqc " , PF_cl_stringtokeynum , 341 } ,
2013-03-12 22:53:23 +00:00
{ " getkeybind " , PF_cl_getkeybind , 342 } ,
2015-07-31 13:23:32 +00:00
{ " setcursormode " , PF_cl_setcursormode , 343 } ,
{ " getcursormode " , PF_cl_getcursormode , 0 } ,
2013-03-12 22:53:23 +00:00
//gap
2013-03-12 22:35:33 +00:00
{ " isdemo " , PF_isdemo , 349 } ,
2016-07-12 00:40:13 +00:00
{ " registercommand " , PF_menu_registercommand , 352 } ,
2013-03-12 22:35:33 +00:00
//gap
{ " findfont " , PF_CL_findfont , 356 } ,
{ " loadfont " , PF_CL_loadfont , 357 } ,
//gap
2015-06-04 06:15:14 +00:00
// {"dynamiclight_get", PF_R_DynamicLight_Get, 372},
// {"dynamiclight_set", PF_R_DynamicLight_Set, 373},
{ " setcustomskin " , PF_m_setcustomskin , 376 } ,
//gap
2013-03-12 22:35:33 +00:00
{ " memalloc " , PF_memalloc , 384 } ,
{ " memfree " , PF_memfree , 385 } ,
{ " memcpy " , PF_memcpy , 386 } ,
2013-05-03 04:28:08 +00:00
{ " memfill8 " , PF_memfill8 , 387 } ,
{ " memgetval " , PF_memgetval , 388 } ,
{ " memsetval " , PF_memsetval , 389 } ,
{ " memptradd " , PF_memptradd , 390 } ,
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
{ " memstrsize " , PF_memstrsize , 0 } ,
2014-05-30 03:57:30 +00:00
{ " con_getset " , PF_SubConGetSet , 391 } ,
{ " con_printf " , PF_SubConPrintf , 392 } ,
{ " con_draw " , PF_SubConDraw , 393 } ,
{ " con_input " , PF_SubConInput , 394 } ,
2015-04-14 23:12:17 +00:00
{ " cvars_haveunsaved " , PF_cvars_haveunsaved , 0 } ,
2013-03-12 22:35:33 +00:00
//gap
{ " buf_create " , PF_buf_create , 440 } ,
{ " buf_del " , PF_buf_del , 441 } ,
{ " buf_getsize " , PF_buf_getsize , 442 } ,
{ " buf_copy " , PF_buf_copy , 443 } ,
{ " buf_sort " , PF_buf_sort , 444 } ,
{ " buf_implode " , PF_buf_implode , 445 } ,
{ " bufstr_get " , PF_bufstr_get , 446 } ,
{ " bufstr_set " , PF_bufstr_set , 447 } ,
{ " bufstr_add " , PF_bufstr_add , 448 } ,
{ " bufstr_free " , PF_bufstr_free , 449 } ,
2014-05-30 03:57:30 +00:00
//450
2013-12-02 14:30:30 +00:00
{ " iscachedpic " , PF_CL_is_cached_pic , 451 } ,
2013-03-12 22:35:33 +00:00
{ " precache_pic " , PF_CL_precache_pic , 452 } ,
{ " free_pic " , PF_CL_free_pic , 453 } ,
{ " drawcharacter " , PF_CL_drawcharacter , 454 } ,
{ " drawrawstring " , PF_CL_drawrawstring , 455 } ,
{ " drawpic " , PF_CL_drawpic , 456 } ,
2015-02-02 08:01:53 +00:00
{ " drawrotpic " , PF_CL_drawrotpic , 0 } ,
2013-03-12 22:35:33 +00:00
{ " drawfill " , PF_CL_drawfill , 457 } ,
{ " drawsetcliparea " , PF_CL_drawsetcliparea , 458 } ,
{ " drawresetcliparea " , PF_CL_drawresetcliparea , 459 } ,
{ " drawgetimagesize " , PF_CL_drawgetimagesize , 460 } ,
2017-02-21 20:22:07 +00:00
# ifdef HAVE_MEDIA_DECODER
2016-07-12 00:40:13 +00:00
{ " cin_open " , PF_cs_media_create , 461 } ,
{ " cin_close " , PF_cs_media_destroy , 462 } ,
{ " cin_setstate " , PF_cs_media_setstate , 463 } ,
{ " cin_getstate " , PF_cs_media_getstate , 464 } ,
{ " cin_restart " , PF_cs_media_restart , 465 } ,
# endif
2013-03-12 22:35:33 +00:00
{ " drawline " , PF_drawline , 466 } ,
{ " drawstring " , PF_CL_drawcolouredstring , 467 } ,
{ " stringwidth " , PF_CL_stringwidth , 468 } ,
{ " drawsubpic " , PF_CL_drawsubpic , 469 } ,
2015-02-02 08:01:53 +00:00
{ " drawrotsubpic " , PF_CL_drawrotsubpic , 0 } ,
2015-04-27 06:19:33 +00:00
{ " drawtextfield " , PF_CL_DrawTextField , 0 } ,
2014-05-30 03:57:30 +00:00
//470
------------------------------------------------------------------------
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
//MERGES WITH CLIENT+SERVER BUILTIN MAPPINGS BELOW
2013-03-12 22:35:33 +00:00
{ " asin " , PF_asin , 471 } ,
{ " acos " , PF_acos , 472 } ,
{ " atan " , PF_atan , 473 } ,
{ " atan2 " , PF_atan2 , 474 } ,
{ " tan " , PF_tan , 475 } ,
{ " strlennocol " , PF_strlennocol , 476 } ,
{ " strdecolorize " , PF_strdecolorize , 477 } ,
{ " strftime " , PF_strftime , 478 } ,
{ " tokenizebyseparator " , PF_tokenizebyseparator , 479 } ,
{ " strtolower " , PF_strtolower , 480 } ,
{ " strtoupper " , PF_strtoupper , 481 } ,
{ " cvar_defstring " , PF_cvar_defstring , 482 } ,
2014-05-30 03:57:30 +00:00
//483
2013-03-12 22:35:33 +00:00
{ " strreplace " , PF_strreplace , 484 } ,
{ " strireplace " , PF_strireplace , 485 } ,
2014-05-30 03:57:30 +00:00
//486
2017-02-21 20:22:07 +00:00
# ifdef HAVE_MEDIA_DECODER
2016-07-12 00:40:13 +00:00
{ " gecko_create " , PF_cs_media_create , 487 } ,
2015-02-02 08:01:53 +00:00
{ " gecko_destroy " , PF_cs_media_destroy , 488 } ,
{ " gecko_navigate " , PF_cs_media_command , 489 } ,
{ " gecko_keyevent " , PF_cs_media_keyevent , 490 } ,
{ " gecko_mousemove " , PF_cs_media_mousemove , 491 } ,
{ " gecko_resize " , PF_cs_media_resize , 492 } ,
{ " gecko_get_texture_extent " , PF_cs_media_get_texture_extent , 493 } ,
2016-07-12 00:40:13 +00:00
{ " gecko_getproperty " , PF_cs_media_getproperty } ,
# endif
2013-03-12 22:35:33 +00:00
{ " crc16 " , PF_crc16 , 494 } ,
{ " cvar_type " , PF_cvar_type , 495 } ,
{ " numentityfields " , PF_numentityfields , 496 } ,
2015-02-02 08:01:53 +00:00
{ " findentityfield " , PF_findentityfield , 0 } ,
{ " entityfieldref " , PF_entityfieldref , 0 } ,
2013-03-12 22:35:33 +00:00
{ " entityfieldname " , PF_entityfieldname , 497 } ,
{ " entityfieldtype " , PF_entityfieldtype , 498 } ,
{ " getentityfieldstring " , PF_getentityfieldstring , 499 } ,
{ " putentityfieldstring " , PF_putentityfieldstring , 500 } ,
{ " whichpack " , PF_whichpack , 503 } ,
//gap
{ " uri_escape " , PF_uri_escape , 510 } ,
{ " uri_unescape " , PF_uri_unescape , 511 } ,
{ " num_for_edict " , PF_etof , 512 } ,
{ " uri_get " , PF_uri_get , 513 } ,
2015-05-14 03:06:58 +00:00
{ " uri_post " , PF_uri_get , 513 } ,
2013-03-12 22:35:33 +00:00
{ " tokenize_console " , PF_tokenize_console , 514 } ,
{ " argv_start_index " , PF_argv_start_index , 515 } ,
{ " argv_end_index " , PF_argv_end_index , 516 } ,
{ " buf_cvarlist " , PF_buf_cvarlist , 517 } ,
{ " cvar_description " , PF_cvar_description , 518 } ,
//gap
2015-08-10 18:28:23 +00:00
{ " log " , PF_Logarithm , 532 } ,
//gap
2013-03-12 23:24:15 +00:00
{ " soundlength " , PF_soundlength , 534 } ,
2013-06-23 02:17:02 +00:00
{ " buf_loadfile " , PF_buf_loadfile , 535 } ,
{ " buf_writefile " , PF_buf_writefile , 536 } ,
2013-03-12 23:24:15 +00:00
//gap
2013-03-12 22:35:33 +00:00
{ " setkeydest " , PF_cl_setkeydest , 601 } ,
{ " getkeydest " , PF_cl_getkeydest , 602 } ,
{ " setmousetarget " , PF_cl_setmousetarget , 603 } ,
{ " getmousetarget " , PF_cl_getmousetarget , 604 } ,
{ " callfunction " , PF_callfunction , 605 } ,
{ " writetofile " , PF_writetofile , 606 } ,
{ " isfunction " , PF_isfunction , 607 } ,
{ " getresolution " , PF_cl_getresolution , 608 } ,
{ " keynumtostring " , PF_cl_keynumtostring , 609 } ,
{ " findkeysforcommand " , PF_cl_findkeysforcommand , 610 } ,
2013-03-12 22:53:23 +00:00
{ " gethostcachevalue " , PF_cl_gethostcachevalue , 611 } ,
{ " gethostcachestring " , PF_cl_gethostcachestring , 612 } ,
2013-03-12 22:35:33 +00:00
{ " parseentitydata " , PF_parseentitydata , 613 } ,
2016-07-12 00:40:13 +00:00
{ " generateentitydata " , PF_generateentitydata , 0 } ,
2013-03-12 22:35:33 +00:00
{ " stringtokeynum " , PF_cl_stringtokeynum , 614 } ,
2013-03-12 22:53:23 +00:00
{ " resethostcachemasks " , PF_cl_resethostcachemasks , 615 } ,
{ " sethostcachemaskstring " , PF_cl_sethostcachemaskstring , 616 } ,
{ " sethostcachemasknumber " , PF_cl_sethostcachemasknumber , 617 } ,
{ " resorthostcache " , PF_cl_resorthostcache , 618 } ,
{ " sethostcachesort " , PF_cl_sethostcachesort , 619 } ,
{ " refreshhostcache " , PF_cl_refreshhostcache , 620 } ,
{ " gethostcachenumber " , PF_cl_gethostcachenumber , 621 } ,
{ " gethostcacheindexforkey " , PF_cl_gethostcacheindexforkey , 622 } ,
{ " addwantedhostcachekey " , PF_cl_addwantedhostcachekey , 623 } ,
2013-03-12 23:09:25 +00:00
# ifdef CL_MASTER
2013-03-12 22:53:23 +00:00
{ " getextresponse " , PF_cl_getextresponse , 624 } ,
2013-03-12 23:09:25 +00:00
# endif
2013-03-12 22:35:33 +00:00
{ " netaddress_resolve " , PF_netaddress_resolve , 625 } ,
//gap
{ " sprintf " , PF_sprintf , 627 } ,
//gap
{ " setkeybind " , PF_Fixme , 630 } ,
2013-03-12 22:53:23 +00:00
{ " getbindmaps " , PF_cl_GetBindMap , 631 } ,
{ " setbindmaps " , PF_cl_SetBindMap , 632 } ,
2013-03-12 22:35:33 +00:00
{ " crypto_getkeyfp " , PF_crypto_getkeyfp , 633 } ,
{ " crypto_getidfp " , PF_crypto_getidfp , 634 } ,
{ " crypto_getencryptlevel " , PF_crypto_getencryptlevel , 635 } ,
{ " crypto_getmykeyfp " , PF_crypto_getmykeyfp , 636 } ,
{ " crypto_getmyidfp " , PF_crypto_getmyidfp , 637 } ,
{ " digest_hex " , PF_digest_hex , 639 } ,
2013-03-12 22:40:16 +00:00
{ " crypto_getmyidstatus " , PF_crypto_getmyidfp , 641 } ,
{ NULL }
2004-11-23 14:29:51 +00:00
} ;
2015-02-02 08:01:53 +00:00
static builtin_t menu_builtins [ 1024 ] ;
2004-11-23 14:29:51 +00:00
2013-03-12 22:35:33 +00:00
int MP_BuiltinValid ( char * name , int num )
{
int i ;
for ( i = 0 ; BuiltinList [ i ] . name ; i + + )
{
if ( BuiltinList [ i ] . ebfsnum = = num )
{
if ( ! strcmp ( BuiltinList [ i ] . name , name ) )
{
if ( /*BuiltinList[i].bifunc == PF_NoMenu ||*/ BuiltinList [ i ] . bifunc = = PF_Fixme )
return false ;
else
return true ;
}
}
}
return false ;
}
2004-11-23 14:29:51 +00:00
2013-03-12 22:35:33 +00:00
static void MP_SetupBuiltins ( void )
{
int i ;
for ( i = 0 ; i < sizeof ( menu_builtins ) / sizeof ( menu_builtins [ 0 ] ) ; i + + )
menu_builtins [ i ] = PF_Fixme ;
for ( i = 0 ; BuiltinList [ i ] . bifunc ; i + + )
{
if ( BuiltinList [ i ] . ebfsnum )
menu_builtins [ BuiltinList [ i ] . ebfsnum ] = BuiltinList [ i ] . bifunc ;
}
}
2004-11-23 14:29:51 +00:00
2015-02-02 08:01:53 +00:00
static int PDECL PR_Menu_MapNamedBuiltin ( pubprogfuncs_t * progfuncs , int headercrc , const char * builtinname )
{
int i , binum ;
for ( i = 0 ; BuiltinList [ i ] . name ; i + + )
{
if ( ! strcmp ( BuiltinList [ i ] . name , builtinname ) & & BuiltinList [ i ] . bifunc ! = PF_Fixme )
{
for ( binum = sizeof ( menu_builtins ) / sizeof ( menu_builtins [ 0 ] ) ; - - binum ; )
{
if ( menu_builtins [ binum ] & & menu_builtins [ binum ] ! = PF_Fixme & & BuiltinList [ i ] . bifunc )
continue ;
menu_builtins [ binum ] = BuiltinList [ i ] . bifunc ;
return binum ;
}
Con_Printf ( " No more builtin slots to allocate for %s \n " , builtinname ) ;
break ;
}
}
Con_DPrintf ( " Unknown menu builtin: %s \n " , builtinname ) ;
return 0 ;
}
2013-03-12 22:35:33 +00:00
void M_Init_Internal ( void ) ;
2004-11-23 14:29:51 +00:00
void M_DeInit_Internal ( void ) ;
int inmenuprogs ;
progparms_t menuprogparms ;
menuedict_t * menu_edicts ;
int num_menu_edicts ;
2013-03-12 22:53:23 +00:00
world_t menu_world ;
2004-11-23 14:29:51 +00:00
func_t mp_init_function ;
func_t mp_shutdown_function ;
func_t mp_draw_function ;
2017-01-24 10:27:39 +00:00
func_t mp_drawloading_function ;
2004-11-23 14:29:51 +00:00
func_t mp_keydown_function ;
func_t mp_keyup_function ;
2016-11-02 08:01:21 +00:00
func_t mp_inputevent_function ;
2004-11-23 14:29:51 +00:00
func_t mp_toggle_function ;
2016-07-12 00:40:13 +00:00
func_t mp_consolecommand_function ;
2004-11-23 14:29:51 +00:00
jmp_buf mp_abort ;
void MP_Shutdown ( void )
{
func_t temp ;
2013-03-12 22:53:23 +00:00
if ( ! menu_world . progs )
2004-11-23 14:29:51 +00:00
return ;
2005-09-08 22:52:46 +00:00
/*
{
char * buffer ;
int size = 1024 * 1024 * 8 ;
buffer = Z_Malloc ( size ) ;
menuprogs - > save_ents ( menuprogs , buffer , & size , 1 ) ;
COM_WriteFile ( " menucore.txt " , buffer , size ) ;
Z_Free ( buffer ) ;
}
*/
2004-11-23 14:29:51 +00:00
temp = mp_shutdown_function ;
mp_shutdown_function = 0 ;
if ( temp & & ! inmenuprogs )
2013-03-12 22:53:23 +00:00
PR_ExecuteProgram ( menu_world . progs , temp ) ;
2004-11-23 14:29:51 +00:00
2013-03-12 22:53:23 +00:00
PR_Common_Shutdown ( menu_world . progs , false ) ;
menu_world . progs - > CloseProgs ( menu_world . progs ) ;
memset ( & menu_world , 0 , sizeof ( menu_world ) ) ;
2015-07-14 14:47:00 +00:00
PR_ReleaseFonts ( kdm_gmenu ) ;
2004-11-23 14:29:51 +00:00
2012-11-27 03:23:19 +00:00
# ifdef CL_MASTER
Master_ClearMasks ( ) ;
# endif
2016-07-12 00:40:13 +00:00
Cmd_RemoveCommands ( MP_ConsoleCommand_f ) ;
2015-07-14 14:47:00 +00:00
Key_Dest_Remove ( kdm_gmenu ) ;
key_dest_absolutemouse & = ~ kdm_gmenu ;
2004-11-23 14:29:51 +00:00
}
2005-04-19 21:09:29 +00:00
void * VARGS PR_CB_Malloc ( int size ) ; //these functions should be tracked by the library reliably, so there should be no need to track them ourselves.
void VARGS PR_CB_Free ( void * mem ) ;
2004-11-23 14:29:51 +00:00
//Any menu builtin error or anything like that will come here.
void VARGS Menu_Abort ( char * format , . . . )
{
va_list argptr ;
char string [ 1024 ] ;
va_start ( argptr , format ) ;
2006-03-06 01:41:09 +00:00
vsnprintf ( string , sizeof ( string ) - 1 , format , argptr ) ;
2004-11-23 14:29:51 +00:00
va_end ( argptr ) ;
Con_Printf ( " Menu_Abort: %s \n Shutting down menu.dat \n " , string ) ;
2005-08-19 19:06:22 +00:00
if ( pr_menuqc_coreonerror . value )
2005-07-28 14:33:18 +00:00
{
char * buffer ;
2016-01-18 05:22:07 +00:00
size_t size = 1024 * 1024 * 8 ;
2005-07-28 14:33:18 +00:00
buffer = Z_Malloc ( size ) ;
2013-08-21 07:14:39 +00:00
menu_world . progs - > save_ents ( menu_world . progs , buffer , & size , size , 3 ) ;
2015-06-04 06:15:14 +00:00
COM_WriteFile ( " menucore.txt " , FS_GAMEONLY , buffer , size ) ;
2005-07-29 18:48:55 +00:00
Z_Free ( buffer ) ;
2005-07-28 14:33:18 +00:00
}
2004-12-08 04:14:52 +00:00
2004-11-23 14:29:51 +00:00
MP_Shutdown ( ) ;
2013-03-12 22:35:33 +00:00
M_Init_Internal ( ) ;
2012-11-27 03:23:19 +00:00
if ( inmenuprogs ) //something in the menu caused the problem, so...
{
inmenuprogs = 0 ;
longjmp ( mp_abort , 1 ) ;
}
2004-11-23 14:29:51 +00:00
}
2011-05-20 04:10:46 +00:00
void MP_CvarChanged ( cvar_t * var )
{
2013-03-12 22:53:23 +00:00
if ( menu_world . progs )
2011-05-20 04:10:46 +00:00
{
2013-03-12 22:53:23 +00:00
PR_AutoCvar ( menu_world . progs , var ) ;
2011-05-20 04:10:46 +00:00
}
}
2014-10-05 20:04:11 +00:00
pbool PDECL Menu_CheckHeaderCrc ( pubprogfuncs_t * inst , progsnum_t idx , int crc )
{
2016-07-12 00:40:13 +00:00
if ( crc = = 10020 )
return true ; //its okay
Con_Printf ( " progs crc is invalid for menuqc \n " ) ;
return false ;
2014-10-05 20:04:11 +00:00
}
2015-10-11 11:34:58 +00:00
static int QDECL MP_PRFileSize ( const char * path )
{
flocation_t loc ;
if ( FS_FLocateFile ( path , FSLF_IFFOUND | FSLF_SECUREONLY , & loc ) )
return loc . len ;
else
return - 1 ;
}
2004-11-23 14:29:51 +00:00
double menutime ;
2010-07-12 22:46:37 +00:00
qboolean MP_Init ( void )
2004-11-23 14:29:51 +00:00
{
2015-07-27 08:21:34 +00:00
struct key_cursor_s * m = & key_customcursor [ kc_menu ] ;
2010-02-06 01:25:04 +00:00
if ( qrenderer = = QR_NONE )
2004-11-23 14:29:51 +00:00
{
2010-07-12 22:46:37 +00:00
return false ;
2004-11-23 14:29:51 +00:00
}
2005-08-19 19:06:22 +00:00
if ( forceqmenu . value )
2014-05-18 23:02:04 +00:00
{
Con_DPrintf ( " menu.dat disabled \n " ) ;
2010-07-12 22:46:37 +00:00
return false ;
2014-05-18 23:02:04 +00:00
}
2004-11-23 14:29:51 +00:00
2013-03-12 22:35:33 +00:00
MP_SetupBuiltins ( ) ;
2014-05-30 03:57:30 +00:00
memset ( & menuc_eval , 0 , sizeof ( menuc_eval ) ) ;
2007-06-20 00:02:54 +00:00
2004-11-23 14:29:51 +00:00
menuprogparms . progsversion = PROGSTRUCT_VERSION ;
menuprogparms . ReadFile = COM_LoadStackFile ; //char *(*ReadFile) (char *fname, void *buffer, int *len);
2015-10-11 11:34:58 +00:00
menuprogparms . FileSize = MP_PRFileSize ; //int (*FileSize) (char *fname); //-1 if file does not exist
2004-11-23 14:29:51 +00:00
menuprogparms . WriteFile = QC_WriteFile ; //bool (*WriteFile) (char *name, void *data, int len);
------------------------------------------------------------------------
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
menuprogparms . Printf = ( void * ) Con_Printf ; //Con_Printf;//void (*printf) (char *, ...);
2016-12-09 09:09:12 +00:00
menuprogparms . Printf = ( void * ) Con_DPrintf ; //Con_DPrintf;//void (*dprintf) (char *, ...);
2004-11-23 14:29:51 +00:00
menuprogparms . Sys_Error = Sys_Error ;
menuprogparms . Abort = Menu_Abort ;
2014-10-05 20:04:11 +00:00
menuprogparms . CheckHeaderCrc = Menu_CheckHeaderCrc ;
2004-11-23 14:29:51 +00:00
menuprogparms . edictsize = sizeof ( menuedict_t ) ;
menuprogparms . entspawn = NULL ; //void (*entspawn) (struct edict_s *ent); //ent has been spawned, but may not have all the extra variables (that may need to be set) set
menuprogparms . entcanfree = NULL ; //bool (*entcanfree) (struct edict_s *ent); //return true to stop ent from being freed
menuprogparms . stateop = NULL ; //StateOp;//void (*stateop) (float var, func_t func);
menuprogparms . cstateop = NULL ; //CStateOp;
menuprogparms . cwstateop = NULL ; //CWStateOp;
menuprogparms . thinktimeop = NULL ; //ThinkTimeOp;
2015-02-02 08:01:53 +00:00
menuprogparms . MapNamedBuiltin = PR_Menu_MapNamedBuiltin ;
2004-11-23 14:29:51 +00:00
menuprogparms . loadcompleate = NULL ; //void (*loadcompleate) (int edictsize); //notification to reset any pointers.
2005-04-19 21:09:29 +00:00
menuprogparms . memalloc = PR_CB_Malloc ; //void *(*memalloc) (int size); //small string allocation malloced and freed randomly
menuprogparms . memfree = PR_CB_Free ; //void (*memfree) (void * mem);
2004-11-23 14:29:51 +00:00
menuprogparms . globalbuiltins = menu_builtins ; //builtin_t *globalbuiltins; //these are available to all progs
2013-03-12 22:35:33 +00:00
menuprogparms . numglobalbuiltins = sizeof ( menu_builtins ) / sizeof ( menu_builtins [ 0 ] ) ;
2004-11-23 14:29:51 +00:00
2009-04-01 22:03:56 +00:00
menuprogparms . autocompile = PR_COMPILEIGNORE ; //PR_COMPILEEXISTANDCHANGED;//enum {PR_NOCOMPILE, PR_COMPILENEXIST, PR_COMPILECHANGED, PR_COMPILEALWAYS} autocompile;
2004-11-23 14:29:51 +00:00
menuprogparms . gametime = & menutime ;
2008-11-09 22:29:28 +00:00
menuprogparms . sv_edicts = ( struct edict_s * * ) & menu_edicts ;
2004-11-23 14:29:51 +00:00
menuprogparms . sv_num_edicts = & num_menu_edicts ;
2012-11-27 03:23:19 +00:00
menuprogparms . useeditor = QCEditor ; //void (*useeditor) (char *filename, int line, int nump, char **parms);
2013-03-12 22:53:23 +00:00
menuprogparms . user = & menu_world ;
2015-07-14 14:47:00 +00:00
menu_world . keydestmask = kdm_gmenu ;
2004-11-23 14:29:51 +00:00
2015-07-27 08:21:34 +00:00
//default to free mouse+hidden cursor, to match dp's default setting, and because its generally the right thing for a menu.
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
key_dest_absolutemouse | = kdm_gmenu ;
2015-07-27 08:21:34 +00:00
Q_strncpyz ( m - > name , " none " , sizeof ( m - > name ) ) ;
m - > hotspot [ 0 ] = 0 ;
m - > hotspot [ 1 ] = 0 ;
m - > scale = 1 ;
m - > dirty = true ;
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-11-23 14:29:51 +00:00
menutime = Sys_DoubleTime ( ) ;
2013-03-12 22:53:23 +00:00
if ( ! menu_world . progs )
2004-11-23 14:29:51 +00:00
{
2013-11-21 23:02:28 +00:00
int mprogs ;
2005-05-08 06:04:28 +00:00
Con_DPrintf ( " Initializing menu.dat \n " ) ;
2013-03-12 22:53:23 +00:00
menu_world . progs = InitProgs ( & menuprogparms ) ;
2014-04-24 01:53:01 +00:00
PR_Configure ( menu_world . progs , 64 * 1024 * 1024 , 1 , pr_enable_profiling . ival ) ;
2015-02-02 08:01:53 +00:00
mprogs = PR_LoadProgs ( menu_world . progs , " menu.dat " ) ;
2013-11-21 23:02:28 +00:00
if ( mprogs < 0 ) //no per-progs builtins.
2004-11-23 14:29:51 +00:00
{
//failed to load or something
2013-03-12 22:53:23 +00:00
// CloseProgs(menu_world.progs);
2005-05-08 06:04:28 +00:00
// menuprogs = NULL;
2010-07-12 22:46:37 +00:00
return false ;
2004-11-23 14:29:51 +00:00
}
if ( setjmp ( mp_abort ) )
{
2005-05-08 06:04:28 +00:00
Con_DPrintf ( " Failed to initialize menu.dat \n " ) ;
inmenuprogs = false ;
2010-07-12 22:46:37 +00:00
return false ;
2004-11-23 14:29:51 +00:00
}
inmenuprogs + + ;
2014-03-30 08:55:06 +00:00
M_DeInit_Internal ( ) ;
2013-03-12 22:53:23 +00:00
PF_InitTempStrings ( menu_world . progs ) ;
2005-05-20 03:32:53 +00:00
2016-07-12 00:40:13 +00:00
menu_world . g . self = ( int * ) PR_FindGlobal ( menu_world . progs , " self " , 0 , NULL ) ;
2014-05-18 23:02:04 +00:00
menu_world . g . time = ( float * ) PR_FindGlobal ( menu_world . progs , " time " , 0 , NULL ) ;
if ( menu_world . g . time )
* menu_world . g . time = Sys_DoubleTime ( ) ;
2014-05-30 03:57:30 +00:00
menu_world . g . frametime = ( float * ) PR_FindGlobal ( menu_world . progs , " frametime " , 0 , NULL ) ;
2004-11-23 14:29:51 +00:00
2013-03-12 22:53:23 +00:00
menu_world . g . drawfont = ( float * ) PR_FindGlobal ( menu_world . progs , " drawfont " , 0 , NULL ) ;
menu_world . g . drawfontscale = ( float * ) PR_FindGlobal ( menu_world . progs , " drawfontscale " , 0 , NULL ) ;
2011-05-20 04:10:46 +00:00
2013-11-21 23:02:28 +00:00
PR_ProgsAdded ( menu_world . progs , mprogs , " menu.dat " ) ;
2013-03-12 22:35:33 +00:00
2013-03-12 22:53:23 +00:00
menuentsize = PR_InitEnts ( menu_world . progs , 8192 ) ;
2004-11-23 14:29:51 +00:00
//'world' edict
2013-03-12 22:53:23 +00:00
// EDICT_NUM(menu_world.progs, 0)->readonly = true;
2016-07-12 00:40:13 +00:00
EDICT_NUM ( menu_world . progs , 0 ) - > ereftype = ER_ENTITY ;
2004-11-23 14:29:51 +00:00
2013-03-12 22:53:23 +00:00
mp_init_function = PR_FindFunction ( menu_world . progs , " m_init " , PR_ANY ) ;
mp_shutdown_function = PR_FindFunction ( menu_world . progs , " m_shutdown " , PR_ANY ) ;
mp_draw_function = PR_FindFunction ( menu_world . progs , " m_draw " , PR_ANY ) ;
2017-01-24 10:27:39 +00:00
mp_drawloading_function = PR_FindFunction ( menu_world . progs , " m_drawloading " , PR_ANY ) ;
2016-11-02 08:01:21 +00:00
mp_inputevent_function = PR_FindFunction ( menu_world . progs , " Menu_InputEvent " , PR_ANY ) ;
2013-03-12 22:53:23 +00:00
mp_keydown_function = PR_FindFunction ( menu_world . progs , " m_keydown " , PR_ANY ) ;
mp_keyup_function = PR_FindFunction ( menu_world . progs , " m_keyup " , PR_ANY ) ;
mp_toggle_function = PR_FindFunction ( menu_world . progs , " m_toggle " , PR_ANY ) ;
2016-07-12 00:40:13 +00:00
mp_consolecommand_function = PR_FindFunction ( menu_world . progs , " m_consolecommand " , PR_ANY ) ;
2004-11-23 14:29:51 +00:00
if ( mp_init_function )
2013-03-12 22:53:23 +00:00
PR_ExecuteProgram ( menu_world . progs , mp_init_function ) ;
2004-11-23 14:29:51 +00:00
inmenuprogs - - ;
2005-05-08 06:04:28 +00:00
2013-12-08 20:06:55 +00:00
EDICT_NUM ( menu_world . progs , 0 ) - > readonly = true ;
2005-05-08 06:04:28 +00:00
Con_DPrintf ( " Initialized menu.dat \n " ) ;
2010-07-12 22:46:37 +00:00
return true ;
2004-11-23 14:29:51 +00:00
}
2010-07-13 09:49:38 +00:00
return false ;
2004-11-23 14:29:51 +00:00
}
2013-03-12 22:35:33 +00:00
static void MP_GameCommand_f ( void )
{
void * pr_globals ;
func_t gamecommand ;
2013-03-12 22:53:23 +00:00
if ( ! menu_world . progs )
2013-03-12 22:35:33 +00:00
return ;
2013-03-12 22:53:23 +00:00
gamecommand = PR_FindFunction ( menu_world . progs , " GameCommand " , PR_ANY ) ;
2013-03-12 22:35:33 +00:00
if ( ! gamecommand )
return ;
2013-12-07 00:30:48 +00:00
if ( setjmp ( mp_abort ) )
return ;
inmenuprogs + + ;
2013-03-12 22:53:23 +00:00
pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( menu_world . progs , Cmd_Args ( ) ) ) ;
PR_ExecuteProgram ( menu_world . progs , gamecommand ) ;
2013-12-07 00:30:48 +00:00
inmenuprogs - - ;
2013-03-12 22:35:33 +00:00
}
2016-07-12 00:40:13 +00:00
qboolean MP_ConsoleCommand ( char * cmdtext )
{
void * pr_globals ;
if ( ! menu_world . progs )
return false ;
if ( ! mp_consolecommand_function )
return false ;
if ( setjmp ( mp_abort ) )
return true ;
inmenuprogs + + ;
pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
( ( ( string_t * ) pr_globals ) [ OFS_PARM0 ] = PR_TempString ( menu_world . progs , cmdtext ) ) ;
PR_ExecuteProgram ( menu_world . progs , mp_consolecommand_function ) ;
inmenuprogs - - ;
return G_FLOAT ( OFS_RETURN ) ;
}
2006-09-17 00:59:22 +00:00
void MP_CoreDump_f ( void )
2005-08-16 18:35:43 +00:00
{
2013-03-12 22:53:23 +00:00
if ( ! menu_world . progs )
2005-08-16 18:35:43 +00:00
{
Con_Printf ( " Can't core dump, you need to be running the CSQC progs first. " ) ;
return ;
}
{
2016-01-18 05:22:07 +00:00
size_t size = 1024 * 1024 * 8 ;
2005-08-16 18:35:43 +00:00
char * buffer = BZ_Malloc ( size ) ;
2013-08-21 07:14:39 +00:00
menu_world . progs - > save_ents ( menu_world . progs , buffer , & size , size , 3 ) ;
2015-06-04 06:15:14 +00:00
COM_WriteFile ( " menucore.txt " , FS_GAMEONLY , buffer , size ) ;
2005-08-16 18:35:43 +00:00
BZ_Free ( buffer ) ;
}
}
2006-09-17 00:59:22 +00:00
void MP_Reload_f ( void )
{
2017-03-04 19:36:06 +00:00
M_Shutdown ( false ) ;
2013-03-12 22:35:33 +00:00
M_Reinit ( ) ;
2006-09-17 00:59:22 +00:00
}
2014-04-24 01:53:01 +00:00
static void MP_Poke_f ( void )
{
2014-10-05 20:04:11 +00:00
/*if (!SV_MayCheat())
2014-04-24 01:53:01 +00:00
Con_TPrintf ( " Please set sv_cheats 1 and restart the map first. \n " ) ;
2014-10-05 20:04:11 +00:00
else */ if ( menu_world . progs & & menu_world . progs - > EvaluateDebugString )
Con_TPrintf ( " Result: %s \n " , menu_world . progs - > EvaluateDebugString ( menu_world . progs , Cmd_Args ( ) ) ) ;
2014-04-24 01:53:01 +00:00
else
Con_TPrintf ( " not supported. \n " ) ;
}
2013-03-12 22:44:00 +00:00
void MP_Breakpoint_f ( void )
{
int wasset ;
int isset ;
char * filename = Cmd_Argv ( 1 ) ;
int line = atoi ( Cmd_Argv ( 2 ) ) ;
2013-03-12 22:53:23 +00:00
if ( ! menu_world . progs )
2013-03-12 22:44:00 +00:00
{
Con_Printf ( " Menu not running \n " ) ;
return ;
}
2013-03-12 22:53:23 +00:00
wasset = menu_world . progs - > ToggleBreak ( menu_world . progs , filename , line , 3 ) ;
isset = menu_world . progs - > ToggleBreak ( menu_world . progs , filename , line , 2 ) ;
2013-03-12 22:44:00 +00:00
if ( wasset = = isset )
Con_Printf ( " Breakpoint was not valid \n " ) ;
else if ( isset )
Con_Printf ( " Breakpoint has been set \n " ) ;
else
Con_Printf ( " Breakpoint has been cleared \n " ) ;
2014-05-10 13:42:13 +00:00
Cvar_Set ( Cvar_FindVar ( " pr_debugger " ) , " 1 " ) ;
2013-03-12 22:44:00 +00:00
}
2005-08-16 18:35:43 +00:00
void MP_RegisterCvarsAndCmds ( void )
{
2006-09-17 00:59:22 +00:00
Cmd_AddCommand ( " coredump_menuqc " , MP_CoreDump_f ) ;
2007-06-20 00:02:54 +00:00
Cmd_AddCommand ( " menu_restart " , MP_Reload_f ) ;
2013-03-12 22:35:33 +00:00
Cmd_AddCommand ( " menu_cmd " , MP_GameCommand_f ) ;
2013-03-12 22:44:00 +00:00
Cmd_AddCommand ( " breakpoint_menu " , MP_Breakpoint_f ) ;
2013-12-29 22:48:28 +00:00
Cmd_AddCommand ( " loadfont " , CL_LoadFont_f ) ;
2005-08-19 19:06:22 +00:00
2014-04-24 01:53:01 +00:00
Cmd_AddCommand ( " poke_menuqc " , MP_Poke_f ) ;
2005-08-19 19:06:22 +00:00
Cvar_Register ( & forceqmenu , MENUPROGSGROUP ) ;
Cvar_Register ( & pr_menuqc_coreonerror , MENUPROGSGROUP ) ;
if ( COM_CheckParm ( " -qmenu " ) )
Cvar_Set ( & forceqmenu , " 1 " ) ;
2005-08-16 18:35:43 +00:00
}
2017-01-24 10:27:39 +00:00
qboolean MP_UsingGamecodeLoadingScreen ( void )
{
return menu_world . progs & & mp_drawloading_function ;
}
2004-11-23 14:29:51 +00:00
void MP_Draw ( void )
{
2017-01-24 10:27:39 +00:00
extern qboolean scr_drawloading ;
globalvars_t * pr_globals ;
2013-03-12 22:53:23 +00:00
if ( ! menu_world . progs )
2007-06-20 00:02:54 +00:00
return ;
2004-11-23 14:29:51 +00:00
if ( setjmp ( mp_abort ) )
return ;
menutime = Sys_DoubleTime ( ) ;
2014-05-18 23:02:04 +00:00
if ( menu_world . g . time )
* menu_world . g . time = menutime ;
2014-05-30 03:57:30 +00:00
if ( menu_world . g . frametime )
* menu_world . g . frametime = host_frametime ;
2004-11-23 14:29:51 +00:00
inmenuprogs + + ;
2017-01-24 10:27:39 +00:00
pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
( ( float * ) pr_globals ) [ OFS_PARM0 + 0 ] = vid . width ;
( ( float * ) pr_globals ) [ OFS_PARM0 + 1 ] = vid . height ;
( ( float * ) pr_globals ) [ OFS_PARM0 + 2 ] = 0 ;
2017-01-24 20:15:14 +00:00
if ( mp_drawloading_function & & ( scr_drawloading | | scr_disabled_for_loading ) )
{
( ( float * ) pr_globals ) [ OFS_PARM1 ] = scr_disabled_for_loading ;
2017-01-24 10:27:39 +00:00
PR_ExecuteProgram ( menu_world . progs , mp_drawloading_function ) ;
2017-01-24 20:15:14 +00:00
}
2017-01-24 10:27:39 +00:00
else if ( mp_draw_function )
2013-03-12 22:53:23 +00:00
PR_ExecuteProgram ( menu_world . progs , mp_draw_function ) ;
2004-11-23 14:29:51 +00:00
inmenuprogs - - ;
}
2015-07-14 14:47:00 +00:00
2016-11-02 08:01:21 +00:00
qboolean MP_Keydown ( int key , int unicode , unsigned int devid )
2004-11-23 14:29:51 +00:00
{
2016-11-02 08:01:21 +00:00
qboolean result = false ;
2006-10-05 21:59:43 +00:00
extern qboolean keydown [ K_MAX ] ;
2012-11-27 03:23:19 +00:00
# ifdef TEXTEDITOR
if ( editormodal )
2016-11-02 08:01:21 +00:00
return true ;
2012-11-27 03:23:19 +00:00
# endif
2004-11-23 14:29:51 +00:00
if ( setjmp ( mp_abort ) )
2016-11-02 08:01:21 +00:00
return true ;
2004-11-23 14:29:51 +00:00
if ( key = = ' c ' )
{
2013-05-11 14:02:55 +00:00
if ( keydown [ K_LCTRL ] | | keydown [ K_RCTRL ] )
2004-11-23 14:29:51 +00:00
{
MP_Shutdown ( ) ;
2013-03-12 22:35:33 +00:00
M_Init_Internal ( ) ;
2016-11-02 08:01:21 +00:00
return true ;
2004-11-23 14:29:51 +00:00
}
}
2015-07-14 14:47:00 +00:00
mpkeysdown [ key > > 3 ] | = ( 1 < < ( key & 7 ) ) ;
2004-11-23 14:29:51 +00:00
menutime = Sys_DoubleTime ( ) ;
2014-05-18 23:02:04 +00:00
if ( menu_world . g . time )
* menu_world . g . time = menutime ;
2004-11-23 14:29:51 +00:00
inmenuprogs + + ;
2016-11-02 08:01:21 +00:00
if ( mp_inputevent_function )
{
void * pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_KEYDOWN ;
G_FLOAT ( OFS_PARM1 ) = MP_TranslateFTEtoQCCodes ( key ) ;
G_FLOAT ( OFS_PARM2 ) = unicode ;
G_FLOAT ( OFS_PARM3 ) = devid ;
PR_ExecuteProgram ( menu_world . progs , mp_inputevent_function ) ;
result = G_FLOAT ( OFS_RETURN ) ;
}
else if ( mp_keydown_function )
2004-11-23 14:29:51 +00:00
{
2013-03-12 22:53:23 +00:00
void * pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
2013-05-03 04:28:08 +00:00
G_FLOAT ( OFS_PARM0 ) = MP_TranslateFTEtoQCCodes ( key ) ;
2009-07-25 11:05:06 +00:00
G_FLOAT ( OFS_PARM1 ) = unicode ;
2013-03-12 22:53:23 +00:00
PR_ExecuteProgram ( menu_world . progs , mp_keydown_function ) ;
2016-12-21 15:47:18 +00:00
result = true ; //doesn't have a return value, so if the menu is set up for key events, all events are considered eaten.
2004-11-23 14:29:51 +00:00
}
inmenuprogs - - ;
2016-11-02 08:01:21 +00:00
return result ;
2004-11-23 14:29:51 +00:00
}
2016-11-02 08:01:21 +00:00
void MP_Keyup ( int key , int unicode , unsigned int devid )
2004-11-23 14:29:51 +00:00
{
2012-11-27 03:23:19 +00:00
# ifdef TEXTEDITOR
if ( editormodal )
return ;
# endif
2004-11-23 14:29:51 +00:00
if ( setjmp ( mp_abort ) )
return ;
2015-07-14 14:47:00 +00:00
if ( key & & ! ( mpkeysdown [ key > > 3 ] & ( 1 < < ( key & 7 ) ) ) )
return ;
mpkeysdown [ key > > 3 ] & = ~ ( 1 < < ( key & 7 ) ) ;
2004-11-23 14:29:51 +00:00
menutime = Sys_DoubleTime ( ) ;
2014-05-18 23:02:04 +00:00
if ( menu_world . g . time )
* menu_world . g . time = menutime ;
2004-11-23 14:29:51 +00:00
inmenuprogs + + ;
2016-11-02 08:01:21 +00:00
if ( mp_inputevent_function )
{
void * pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_KEYUP ;
G_FLOAT ( OFS_PARM1 ) = MP_TranslateFTEtoQCCodes ( key ) ;
G_FLOAT ( OFS_PARM2 ) = unicode ;
G_FLOAT ( OFS_PARM3 ) = devid ;
PR_ExecuteProgram ( menu_world . progs , mp_inputevent_function ) ;
}
else if ( mp_keyup_function )
2004-11-23 14:29:51 +00:00
{
2013-03-12 22:53:23 +00:00
void * pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
2013-05-03 04:28:08 +00:00
G_FLOAT ( OFS_PARM0 ) = MP_TranslateFTEtoQCCodes ( key ) ;
2009-07-25 11:05:06 +00:00
G_FLOAT ( OFS_PARM1 ) = unicode ;
2013-03-12 22:53:23 +00:00
PR_ExecuteProgram ( menu_world . progs , mp_keyup_function ) ;
2004-11-23 14:29:51 +00:00
}
inmenuprogs - - ;
}
2016-11-02 08:01:21 +00:00
qboolean MP_MousePosition ( float xabs , float yabs , unsigned int devid )
{
void * pr_globals ;
if ( ! menu_world . progs | | ! mp_inputevent_function )
return false ;
if ( setjmp ( mp_abort ) )
return false ;
inmenuprogs + + ;
pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_MOUSEABS ;
G_FLOAT ( OFS_PARM1 ) = ( xabs * vid . width ) / vid . pixelwidth ;
G_FLOAT ( OFS_PARM2 ) = ( yabs * vid . height ) / vid . pixelheight ;
G_FLOAT ( OFS_PARM3 ) = devid ;
PR_ExecuteProgram ( menu_world . progs , mp_inputevent_function ) ;
inmenuprogs - - ;
return G_FLOAT ( OFS_RETURN ) ;
}
qboolean MP_MouseMove ( float xdelta , float ydelta , unsigned int devid )
{
void * pr_globals ;
if ( ! menu_world . progs | | ! mp_inputevent_function )
return false ;
if ( setjmp ( mp_abort ) )
return false ;
inmenuprogs + + ;
pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_MOUSEDELTA ;
G_FLOAT ( OFS_PARM1 ) = ( xdelta * vid . width ) / vid . pixelwidth ;
G_FLOAT ( OFS_PARM2 ) = ( ydelta * vid . height ) / vid . pixelheight ;
G_FLOAT ( OFS_PARM3 ) = devid ;
PR_ExecuteProgram ( menu_world . progs , mp_inputevent_function ) ;
inmenuprogs - - ;
return G_FLOAT ( OFS_RETURN ) ;
}
qboolean MP_JoystickAxis ( int axis , float value , unsigned int devid )
{
void * pr_globals ;
if ( ! menu_world . progs | | ! mp_inputevent_function )
return false ;
if ( setjmp ( mp_abort ) )
return false ;
inmenuprogs + + ;
pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
G_FLOAT ( OFS_PARM0 ) = CSIE_JOYAXIS ;
G_FLOAT ( OFS_PARM1 ) = axis ;
G_FLOAT ( OFS_PARM2 ) = value ;
G_FLOAT ( OFS_PARM3 ) = devid ;
PR_ExecuteProgram ( menu_world . progs , mp_inputevent_function ) ;
inmenuprogs - - ;
return G_FLOAT ( OFS_RETURN ) ;
}
2015-07-27 08:21:34 +00:00
qboolean MP_Toggle ( int mode )
2004-11-23 14:29:51 +00:00
{
2013-03-12 22:53:23 +00:00
if ( ! menu_world . progs )
2004-11-23 14:29:51 +00:00
return false ;
2012-11-27 03:23:19 +00:00
# ifdef TEXTEDITOR
if ( editormodal )
return false ;
# endif
2004-11-23 14:29:51 +00:00
2015-07-27 08:21:34 +00:00
if ( ! mode & & ! Key_Dest_Has ( kdm_gmenu ) )
return false ;
2004-11-23 14:29:51 +00:00
if ( setjmp ( mp_abort ) )
return false ;
menutime = Sys_DoubleTime ( ) ;
2014-05-18 23:02:04 +00:00
if ( menu_world . g . time )
* menu_world . g . time = menutime ;
2004-11-23 14:29:51 +00:00
inmenuprogs + + ;
if ( mp_toggle_function )
2013-03-12 22:35:33 +00:00
{
2013-03-12 22:53:23 +00:00
void * pr_globals = PR_globals ( menu_world . progs , PR_CURRENT ) ;
2015-07-27 08:21:34 +00:00
G_FLOAT ( OFS_PARM0 ) = mode ;
2013-03-12 22:53:23 +00:00
PR_ExecuteProgram ( menu_world . progs , mp_toggle_function ) ;
2013-03-12 22:35:33 +00:00
}
2004-11-23 14:29:51 +00:00
inmenuprogs - - ;
return true ;
2004-11-29 01:21:00 +00:00
}
# endif