2004-08-21 01:25:48 +00:00
/*
Copyright ( C ) 1996 - 1997 Id Software , Inc .
This program is free software ; you can redistribute it and / or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
2011-07-01 07:27:38 +00:00
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .
2004-08-21 01:25:48 +00:00
See the GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*/
// comndef.h -- general definitions
2011-06-29 18:39:11 +00:00
# include <stdio.h>
//make shared
# ifndef QDECL
# ifdef _MSC_VER
# define QDECL _cdecl
# else
# define QDECL
# endif
# endif
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
2016-07-12 00:40:13 +00:00
# if __STDC_VERSION__ >= 199901L || defined(__GNUC__)
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
//C99 has a stdint header which hopefully contains an intptr_t
//its optional... but if its not in there then its unlikely you'll actually be able to get the engine to a stage where it *can* load anything
# include <stdint.h>
# define qintptr_t intptr_t
# define quintptr_t uintptr_t
2017-10-12 12:02:25 +00:00
# define qint16_t int16_t
# define quint16_t uint16_t
2016-07-12 00:40:13 +00:00
# define qint32_t int32_t
# define quint32_t uint32_t
# define qint64_t int64_t
# define quint64_t uint64_t
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
# else
2017-10-12 12:02:25 +00:00
# define qint16_t short
# define quint16_t unsigned short
2016-02-15 06:01:17 +00:00
# define qint32_t int
# define quint32_t unsigned qint32_t
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
# if defined(_WIN64)
# define qintptr_t __int64
# define FTE_WORDSIZE 64
# define quintptr_t unsigned qintptr_t
2016-02-15 06:01:17 +00:00
# define qint64_t __int64
# define quint64_t unsigned __int64
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
# elif defined(_WIN32)
2016-08-25 00:12:14 +00:00
# if !defined(_MSC_VER) || _MSC_VER < 1300
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
# define __w64
# endif
typedef __int32 __w64 qintptr_t ; //add __w64 if you need msvc to shut up about unsafe type conversions
typedef unsigned __int32 __w64 quintptr_t ;
// #define qintptr_t __int32
// #define quintptr_t unsigned qintptr_t
2016-02-15 06:01:17 +00:00
# define qint64_t __int64
# define quint64_t unsigned __int64
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
# define FTE_WORDSIZE 32
# else
2016-02-15 06:01:17 +00:00
# ifdef __LP64__
2018-03-04 14:41:16 +00:00
# define qintptr_t long int
# define qint64_t long int
2016-02-15 06:01:17 +00:00
# define FTE_WORDSIZE 64
# elif __WORDSIZE == 64
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
# define qintptr_t long long
2016-02-15 06:01:17 +00:00
# define qint64_t long long
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
# define FTE_WORDSIZE 64
# else
# define qintptr_t long
2016-02-15 06:01:17 +00:00
# define qint64_t long long
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
# define FTE_WORDSIZE 32
# endif
# define quintptr_t unsigned qintptr_t
2016-02-15 06:01:17 +00:00
# define quint64_t unsigned qint64_t
Reworked client support for DPP5+. less code now, its much more graceful.
added waterfog command. waterfog overrides regular fog only when the view is in water.
fixed 64bit printf format specifiers. should work better on winxp64.
fixed some spec angle weirdness.
fixed viewsize 99.99 weirdness with ezhud.
fixed extra offset on the console (exhibited in 64bit builds, but not limited to).
fixed .avi playback, can now actually display frames again.
reimplemented line sparks.
fixed r_editlights_save flipping the light's pitch.
fixed issue with oggs failing to load.
fixed condump to cope with unicode properly.
made sv_bigcoords default except in quake. hexen2 kinda needs it for bsp angle precision.
fixed nq server to not stall weirdly on map changes.
fixed qwprogs svc_cdtrack not bugging out with nq clients on the server.
fixed restart command to load the last map run by the server, instead of start.bsp (when idle)
optimised d3d9 renderer a little. now uses less draw calls, especially with complex scenes. seems to get higher framerates than opengl now.
fixed d3d9 renderer to not bug out quite so much when run fullscreen (shader subsystem is now correctly initialised).
fixed a couple of bugs from font change. also now supports utf-8 in a few more places.
r_editlights_reload no longer generates rtlights inside the void. this resolves a few glitches (but should also help framerates a little).
fixed so corona-only lights won't generate shadowmaps and waste lots of time.
removed lots of #defines from qclib. I should never have made them in the first place, but I was lazy. obviously there's more left that I cba to remove yet.
fixed nested calls with variant-vectors. this fixes csaddon's light editor.
fixed qcc hc calling conventions using redundant stores.
disabled keywords can still be used by using __keyword instead.
fixed ftegccgui grep feature.
fixed motionless-dog qcc bug.
tweaked qcc warnings a little. -Wall is now a viable setting. you should be able to fix all those warnings.
fixed qw svc_intermission + dpp5+ clients bug.
fixed annoying spam about disconnecting in hexen2.
rewrote status command a little to cope with ipv6 addresses more gracefully
fixed significant stall when hibernating/debugging a server with a player sitting on it.
fixed truelightning.
fixed rocketlight overriding pflags.
fixed torches vanishing on vid_restart.
fixed issue with decal scaling.
fixed findentityfield builtin.
fixed fteqcc issue with ptr+1
fixed use of arrays inside class functions.
fixed/implemented fteqcc emulation of pointer opcodes.
added __inout keyword to fteqcc, so that it doesn't feel so horrendous.
fixed sizeof(*foo)
fixed *struct = struct;
fixed recursive structs.
fixed fteqcc warning report.
fixed sdl2 controller support, hopefully.
attempted to implement xinput, including per-player audio playback.
slightly fixed relaxed attitude to mouse focus when running fullscreen.
fixed weird warnings/errors with 'ent.arrayhead' terms. now generates sane errors.
implemented bindmaps (for csqc).
fixed crashing bug with eprint builtin.
implemented subset of music_playlist_* functionality. significant changes to music playback.
fixed some more dpcsqc compat.
fixed binds menu. now displays and accepts modifiers.
fixed issues with huge lightmaps.
fixed protocol determinism with dp clients connecting to fte servers. the initial getchallenge request now inhibits vanilla nq connection requests.
implemented support for 'dupe' userinfo key, allowing clients to request client->server packet duplication. should probably queue them tbh.
implemented sv_saveentfile command.
fixed resume after breaking inside a stepped-over function.
fixed erroneous footer after debugging.
(I wonder just how many things I broke with these fixes)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4946 fc73d0e0-1445-4013-8a0c-d673dee63da5
2015-07-26 10:56:18 +00:00
# endif
# endif
# ifndef FTE_WORDSIZE
2016-07-12 00:40:13 +00:00
# ifdef __WORDSIZE
# define FTE_WORDSIZE __WORDSIZE
# elif defined(_WIN64)
# define FTE_WORDSIZE 64
# else
# define FTE_WORDSIZE 32
# endif
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
# endif
2016-08-25 00:12:14 +00:00
# ifdef _MSC_VER
# if _MSC_VER >= 1310
# define strtoull _strtoui64
# else
# define strtoull strtoul //hopefully this won't cause too many issues
# define DWORD_PTR DWORD //32bit only
# define ULONG_PTR ULONG
# endif
# endif
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-08-21 01:25:48 +00:00
typedef unsigned char qbyte ;
// KJB Undefined true and false defined in SciTech's DEBUG.H header
# undef true
# undef false
# ifdef __cplusplus
2005-03-28 00:11:59 +00:00
typedef enum { qfalse , qtrue } qboolean ; //false and true are forcivly defined.
# define true qtrue
# define false qfalse
2004-08-21 01:25:48 +00:00
# else
typedef enum { false , true } qboolean ;
2018-10-11 10:31:23 +00:00
# define qtrue true
# define qfalse false
2004-08-21 01:25:48 +00:00
# endif
2011-06-16 02:03:57 +00:00
# define STRINGIFY2(s) #s
# define STRINGIFY(s) STRINGIFY2(s)
2013-07-13 12:14:32 +00:00
# define BASIC_INFO_STRING 196 //regular quakeworld. Sickening isn't it.
2005-03-07 08:58:26 +00:00
# define EXTENDED_INFO_STRING 1024
# define MAX_SERVERINFO_STRING 1024 //standard quake has 512 here.
2004-08-21 01:25:48 +00:00
# define MAX_LOCALINFO_STRING 32768
2018-12-28 00:04:36 +00:00
# ifdef HAVE_CLIENT
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define cls_state cls.state
2018-12-28 00:04:36 +00:00
# else
# define cls_state 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
# endif
2018-12-28 00:04:36 +00:00
# ifdef HAVE_SERVER
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define sv_state sv.state
2018-12-28 00:04:36 +00:00
# else
# define sv_state 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
# endif
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
struct netprim_s
{
2015-12-28 17:41:39 +00:00
qbyte coordsize ;
qbyte anglesize ;
2016-07-12 00:40:13 +00:00
# define NPQ2_ANG16 (1u<<0)
# define NPQ2_SOLID32 (1u<<1)
2016-10-22 07:06:51 +00:00
# define NPQ2_R1Q2_UCMD (1u<<2)
2016-07-12 00:40:13 +00:00
qbyte flags ;
2015-12-28 17:41:39 +00:00
qbyte pad ;
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
} ;
2004-08-21 01:25:48 +00:00
//============================================================================
2004-12-24 08:45:56 +00:00
typedef enum {
SZ_BAD ,
SZ_RAWBYTES ,
SZ_RAWBITS ,
SZ_HUFFMAN //q3 style packets are horrible.
} sbpacking_t ;
2004-08-21 01:25:48 +00:00
typedef struct sizebuf_s
{
qboolean allowoverflow ; // if false, do a Sys_Error
qboolean overflowed ; // set to true if the buffer size failed
2018-11-19 06:37:25 +00:00
qbyte * data ;
int maxsize ; //storage size of data
int cursize ; //assigned size of data
sbpacking_t packing ; //required for q3
int currentbit ; //ignored for rawbytes
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
2018-11-19 06:37:25 +00:00
struct netprim_s prim ; //for unsized write/read coord/angles
2004-08-21 01:25:48 +00:00
} sizebuf_t ;
void SZ_Clear ( sizebuf_t * buf ) ;
void * SZ_GetSpace ( sizebuf_t * buf , int length ) ;
void SZ_Write ( sizebuf_t * buf , const void * data , int length ) ;
void SZ_Print ( sizebuf_t * buf , const char * data ) ; // strcats onto the sizebuf
//============================================================================
typedef struct link_s
{
struct link_s * prev , * next ;
} link_t ;
2017-08-29 02:29:06 +00:00
# ifdef USEAREAGRID
typedef struct
{
link_t l ;
void * ed ;
} areagridlink_t ;
# endif
2004-08-21 01:25:48 +00:00
void ClearLink ( link_t * l ) ;
void RemoveLink ( link_t * l ) ;
void InsertLinkBefore ( link_t * l , link_t * before ) ;
void InsertLinkAfter ( link_t * l , link_t * after ) ;
// (type *)STRUCT_FROM_LINK(link_t *link, type, member)
// ent = STRUCT_FROM_LINK(link,entity_t,order)
// FIXME: remove this mess!
2010-07-11 10:53:13 +00:00
# define STRUCT_FROM_LINK(l,t,m) ((t *)((qbyte *)l - (qbyte*)&(((t *)0)->m)))
2004-08-21 01:25:48 +00:00
2014-09-02 02:44:43 +00:00
# define FOR_EACH_LINK(l,node) for (l = node.next ; l != &node ; l = l->next)
2004-08-21 01:25:48 +00:00
//============================================================================
# ifndef NULL
# define NULL ((void *)0)
# endif
# define Q_MAXCHAR ((char)0x7f)
# define Q_MAXSHORT ((short)0x7fff)
# define Q_MAXINT ((int)0x7fffffff)
# define Q_MAXLONG ((int)0x7fffffff)
# define Q_MAXFLOAT ((int)0x7fffffff)
# define Q_MINCHAR ((char)0x80)
# define Q_MINSHORT ((short)0x8000)
# define Q_MININT ((int)0x80000000)
# define Q_MINLONG ((int)0x80000000)
# define Q_MINFLOAT ((int)0x7fffffff)
//============================================================================
2006-07-08 22:35:15 +00:00
extern qboolean bigendian ;
2004-08-21 01:25:48 +00:00
extern short ( * BigShort ) ( short l ) ;
extern short ( * LittleShort ) ( short l ) ;
extern int ( * BigLong ) ( int l ) ;
extern int ( * LittleLong ) ( int l ) ;
extern float ( * BigFloat ) ( float l ) ;
extern float ( * LittleFloat ) ( float l ) ;
2005-07-29 22:26:43 +00:00
short ShortSwap ( short l ) ;
int LongSwap ( int l ) ;
2006-06-04 01:43:52 +00:00
void COM_CharBias ( signed char * c , int size ) ;
void COM_SwapLittleShortBlock ( short * s , int size ) ;
2004-08-21 01:25:48 +00:00
//============================================================================
struct usercmd_s ;
extern struct usercmd_s nullcmd ;
2004-11-17 17:34:14 +00:00
typedef union { //note: reading from packets can be misaligned
char b [ 4 ] ;
short b2 ;
int b4 ;
float f ;
} coorddata ;
float MSG_FromCoord ( coorddata c , int bytes ) ;
coorddata MSG_ToCoord ( float f , int bytes ) ;
2009-11-15 03:20:17 +00:00
coorddata MSG_ToAngle ( float f , int bytes ) ;
2004-11-17 17:34:14 +00:00
2004-08-21 01:25:48 +00:00
void MSG_WriteChar ( sizebuf_t * sb , int c ) ;
void MSG_WriteByte ( sizebuf_t * sb , int c ) ;
void MSG_WriteShort ( sizebuf_t * sb , int c ) ;
void MSG_WriteLong ( sizebuf_t * sb , int c ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
void MSG_WriteEntity ( sizebuf_t * sb , unsigned int e ) ;
2004-08-21 01:25:48 +00:00
void MSG_WriteFloat ( sizebuf_t * sb , float f ) ;
2005-03-28 00:11:59 +00:00
void MSG_WriteString ( sizebuf_t * sb , const char * s ) ;
2004-08-21 01:25:48 +00:00
void MSG_WriteCoord ( sizebuf_t * sb , float f ) ;
void MSG_WriteBigCoord ( sizebuf_t * sb , float f ) ;
void MSG_WriteAngle ( sizebuf_t * sb , float f ) ;
2005-06-14 04:52:10 +00:00
void MSG_WriteAngle8 ( sizebuf_t * sb , float f ) ;
2004-08-21 01:25:48 +00:00
void MSG_WriteAngle16 ( sizebuf_t * sb , float f ) ;
void MSG_WriteDeltaUsercmd ( sizebuf_t * sb , struct usercmd_s * from , struct usercmd_s * cmd ) ;
void MSG_WriteDir ( sizebuf_t * sb , float * dir ) ;
extern int msg_readcount ;
extern qboolean msg_badread ; // set if a read goes beyond end of message
2013-03-12 23:09:25 +00:00
extern struct netprim_s msg_nullnetprim ;
2004-08-21 01:25:48 +00:00
Fixes, workarounds, and breakages. Hexen2 should work much better (-hexen2 says no mission pack, -portals says h2mp). Started working on splitting bigcoords per client, far too much work still to go on that. Removed gl_ztrick entirely. Enabled csprogs download by default. Added client support for fitzquake's 666 protocol, needs testing, some cleanup for dp protocols too, no server support, couldn't selectively enable it anyway. Now attempting to cache shadow meshes for explosions and stuff. Played with lightmaps a little, should potentially run a little faster on certain (intel?) cards. Tweeked npfte a little to try to avoid deadlocks and crashes. Fixed sky worldspawn parsing. Added h2mp's model format. Fixed baseline issue in q2 client, made servers generate q2 baselines. MOVETYPE_PUSH will not rotate extra if rotation is forced. Made status command show allowed client types. Changed lighting on weapons - should now be shaded.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3572 fc73d0e0-1445-4013-8a0c-d673dee63da5
2010-08-11 03:36:31 +00:00
void MSG_BeginReading ( struct netprim_s prim ) ;
void MSG_ChangePrimitives ( struct netprim_s prim ) ;
2004-08-21 01:25:48 +00:00
int MSG_GetReadCount ( void ) ;
int MSG_ReadChar ( void ) ;
2005-02-12 18:56:04 +00:00
int MSG_ReadBits ( int bits ) ;
2004-08-21 01:25:48 +00:00
int MSG_ReadByte ( void ) ;
int MSG_ReadShort ( void ) ;
int MSG_ReadLong ( void ) ;
2013-03-12 22:30:22 +00:00
struct client_s ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
unsigned int MSGSV_ReadEntity ( struct client_s * fromclient ) ;
unsigned int MSGCL_ReadEntity ( void ) ;
2004-08-21 01:25:48 +00:00
float MSG_ReadFloat ( void ) ;
2014-03-30 08:55:06 +00:00
char * MSG_ReadStringBuffer ( char * out , size_t outsize ) ;
2004-08-21 01:25:48 +00:00
char * MSG_ReadString ( void ) ;
char * MSG_ReadStringLine ( void ) ;
float MSG_ReadCoord ( void ) ;
2017-12-28 16:24:50 +00:00
float MSG_ReadCoordFloat ( void ) ;
2004-08-21 01:25:48 +00:00
void MSG_ReadPos ( float * pos ) ;
float MSG_ReadAngle ( void ) ;
float MSG_ReadAngle16 ( void ) ;
2017-10-12 12:02:25 +00:00
void MSG_ReadDeltaUsercmd ( struct usercmd_s * from , struct usercmd_s * cmd , int qwprotocolver ) ;
2004-08-21 01:25:48 +00:00
void MSGQ2_ReadDeltaUsercmd ( struct usercmd_s * from , struct usercmd_s * move ) ;
void MSG_ReadData ( void * data , int len ) ;
2010-07-18 08:42:59 +00:00
void MSG_ReadSkip ( int len ) ;
2004-08-21 01:25:48 +00:00
2016-07-12 00:40:13 +00:00
int MSG_ReadSize16 ( sizebuf_t * sb ) ;
void MSG_WriteSize16 ( sizebuf_t * sb , int sz ) ;
void COM_DecodeSize ( int solid , float * mins , float * maxs ) ;
int COM_EncodeSize ( float * mins , float * maxs ) ;
2004-08-21 01:25:48 +00:00
//============================================================================
2009-04-01 22:03:56 +00:00
char * Q_strcpyline ( char * out , const char * in , int maxlen ) ; //stops at '\n' (and '\r')
2004-08-21 01:25:48 +00:00
2006-05-19 03:45:44 +00:00
void Q_ftoa ( char * str , float in ) ;
2005-01-24 23:47:32 +00:00
char * Q_strlwr ( char * str ) ;
2009-04-01 22:03:56 +00:00
int wildcmp ( const char * wild , const char * string ) ; //1 if match
2005-01-24 23:47:32 +00:00
2004-08-21 01:25:48 +00:00
# define Q_memset(d, f, c) memset((d), (f), (c))
# define Q_memcpy(d, s, c) memcpy((d), (s), (c))
2010-05-17 02:01:58 +00:00
# define Q_memmove(d, s, c) memmove((d), (s), (c))
2004-08-21 01:25:48 +00:00
# define Q_memcmp(m1, m2, c) memcmp((m1), (m2), (c))
# define Q_strcpy(d, s) strcpy((d), (s))
# define Q_strncpy(d, s, n) strncpy((d), (s), (n))
# define Q_strlen(s) ((int)strlen(s))
# define Q_strrchr(s, c) strrchr((s), (c))
# define Q_strcat(d, s) strcat((d), (s))
# define Q_strcmp(s1, s2) strcmp((s1), (s2))
# define Q_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
2012-11-27 03:23:19 +00:00
void VARGS Q_snprintfz ( char * dest , size_t size , const char * fmt , . . . ) LIKEPRINTF ( 3 ) ;
void VARGS Q_vsnprintfz ( char * dest , size_t size , const char * fmt , va_list args ) ;
2011-07-01 07:27:38 +00:00
int VARGS Com_sprintf ( char * buffer , int size , const char * format , . . . ) LIKEPRINTF ( 3 ) ;
2005-04-16 16:21:27 +00:00
2004-08-21 01:25:48 +00:00
# define Q_strncpyS(d, s, n) do{const char *____in=(s);char *____out=(d);int ____i; for (____i=0;*(____in); ____i++){if (____i == (n))break;*____out++ = *____in++;}if (____i < (n))*____out='\0';}while(0) //only use this when it should be used. If undiciided, use N
# define Q_strncpyN(d, s, n) do{if (n < 0)Sys_Error("Bad length in strncpyz");Q_strncpyS((d), (s), (n));((char *)(d))[n] = '\0';}while(0) //this'll stop me doing buffer overflows. (guarenteed to overflow if you tried the wrong size.)
2005-04-16 16:21:27 +00:00
//#define Q_strncpyNCHECKSIZE(d, s, n) do{if (n < 1)Sys_Error("Bad length in strncpyz");Q_strncpyS((d), (s), (n));((char *)(d))[n-1] = '\0';((char *)(d))[n] = '255';}while(0) //This forces nothing else to be within the buffer. Should be used for testing and nothing else.
#if 0
2004-08-21 01:25:48 +00:00
# define Q_strncpyz(d, s, n) Q_strncpyN(d, s, (n)-1)
2005-04-16 16:21:27 +00:00
# else
2011-06-29 18:39:11 +00:00
void QDECL Q_strncpyz ( char * d , const char * s , int n ) ;
2005-04-26 16:04:12 +00:00
# define Q_strncatz(dest, src, sizeofdest) \
do { \
strncat ( dest , src , sizeofdest - strlen ( dest ) - 1 ) ; \
2015-01-21 18:18:37 +00:00
( dest ) [ sizeofdest - 1 ] = 0 ; \
2005-04-26 16:04:12 +00:00
} while ( 0 )
# define Q_strncatz2(dest, src) Q_strncatz(dest, src, sizeof(dest))
2005-04-16 16:21:27 +00:00
# endif
2004-08-21 01:25:48 +00:00
//#define Q_strncpy Please remove all strncpys
2011-07-01 07:27:38 +00:00
/*#ifndef strncpy
2004-08-21 01:25:48 +00:00
# define strncpy Q_strncpy
# endif* /
2014-10-05 20:04:11 +00:00
/*replacement functions which do not care for locale in text formatting ('C' locale), or are non-standard*/
char * Q_strcasestr ( const char * haystack , const char * needle ) ;
2011-06-29 18:39:11 +00:00
int Q_strncasecmp ( const char * s1 , const char * s2 , int n ) ;
int Q_strcasecmp ( const char * s1 , const char * s2 ) ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
int Q_strstopcasecmp ( const char * s1start , const char * s1end , const char * s2 ) ;
2009-04-01 22:03:56 +00:00
int Q_atoi ( const char * str ) ;
float Q_atof ( const char * str ) ;
2014-03-30 08:55:06 +00:00
void deleetstring ( char * result , const char * leet ) ;
2004-08-21 01:25:48 +00:00
//============================================================================
2014-02-14 09:59:32 +00:00
extern char com_token [ 65536 ] ;
2004-08-21 01:25:48 +00:00
2018-07-05 16:21:44 +00:00
typedef enum com_tokentype_e { TTP_UNKNOWN , TTP_STRING , TTP_LINEENDING , TTP_RAWTOKEN , TTP_EOF , TTP_PUNCTUATION } com_tokentype_t ;
2004-08-21 01:25:48 +00:00
extern com_tokentype_t com_tokentype ;
2009-04-01 22:03:56 +00:00
//these cast away the const for the return value.
//char *COM_Parse (const char *data);
# define COM_Parse(d) COM_ParseOut(d,com_token, sizeof(com_token))
2015-01-07 13:34:05 +00:00
# define COM_ParseOut(d,o,l) COM_ParseType(d,o,l,NULL)
char * COM_ParseType ( const char * data , char * out , int outlen , com_tokentype_t * toktype ) ;
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
char * COM_ParseStringSet ( const char * data , char * out , size_t outlen ) ; //whitespace or semi-colon separators
char * COM_ParseStringSetSep ( const char * data , char sep , char * out , size_t outsize ) ; //single-char-separator, no whitespace
2013-11-21 23:02:28 +00:00
char * COM_ParseCString ( const char * data , char * out , size_t maxoutlen , size_t * writtenlen ) ;
2011-02-25 04:22:14 +00:00
char * COM_StringParse ( const char * data , char * token , unsigned int tokenlen , qboolean expandmacros , qboolean qctokenize ) ;
2017-04-18 11:12:17 +00:00
# define COM_ParseToken(data,punct) COM_ParseTokenOut(data, punct, com_token, sizeof(com_token), &com_tokentype)
char * COM_ParseTokenOut ( const char * data , const char * punctuation , char * token , size_t tokenlen , com_tokentype_t * tokentype ) ; //note that line endings are a special type of token.
2014-10-05 20:04:11 +00:00
char * COM_TrimString ( char * str , char * buffer , int buffersize ) ;
2015-01-02 05:20:56 +00:00
const char * COM_QuotedString ( const char * string , char * buf , int buflen , qboolean omitquotes ) ; //inverse of COM_StringParse
2004-08-21 01:25:48 +00:00
extern int com_argc ;
2009-04-01 22:03:56 +00:00
extern const char * * com_argv ;
2004-08-21 01:25:48 +00:00
2013-08-21 07:14:39 +00:00
int COM_CheckParm ( const char * parm ) ; //WARNING: Legacy arguments should be listed in CL_ArgumentOverrides!
2009-04-01 22:03:56 +00:00
int COM_CheckNextParm ( const char * parm , int last ) ;
void COM_AddParm ( const char * parm ) ;
2004-08-21 01:25:48 +00:00
2017-01-24 10:27:39 +00:00
void COM_Shutdown ( void ) ;
2004-08-21 01:25:48 +00:00
void COM_Init ( void ) ;
2009-04-01 22:03:56 +00:00
void COM_InitArgv ( int argc , const char * * argv ) ;
2014-10-05 20:04:11 +00:00
void COM_ParsePlusSets ( qboolean docbuf ) ;
2004-08-21 01:25:48 +00:00
2009-05-24 10:11:17 +00:00
typedef unsigned int conchar_t ;
2016-07-12 00:40:13 +00:00
char * COM_DeFunString ( conchar_t * str , conchar_t * stop , char * out , int outsize , qboolean ignoreflags , qboolean forceutf8 ) ;
2014-10-05 20:04:11 +00:00
# define PFS_KEEPMARKUP 1 //leave markup in the final string (but do parse it)
# define PFS_FORCEUTF8 2 //force utf-8 decoding
# define PFS_NOMARKUP 4 //strip markup completely
2018-07-22 11:49:37 +00:00
# ifndef NOLEGACY
2014-10-05 20:04:11 +00:00
# define PFS_EZQUAKEMARKUP 8 //aim for compat with ezquake instead of q3 compat
2018-07-22 11:49:37 +00:00
# endif
2016-01-18 05:22:07 +00:00
# define PFS_CENTERED 16 //flag used by console prints (text should remain centered)
# define PFS_NONOTIFY 32 //flag used by console prints (text won't be visible other than by looking at the console)
2013-03-12 22:44:00 +00:00
conchar_t * COM_ParseFunString ( conchar_t defaultflags , const char * str , conchar_t * out , int outsize , int keepmarkup ) ; //ext is usually CON_WHITEMASK, returns its null terminator
2018-11-27 16:48:19 +00:00
unsigned int utf8_decode ( int * error , const void * in , char const * * out ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
unsigned int utf8_encode ( void * out , unsigned int unicode , int maxlen ) ;
2014-01-13 02:42:25 +00:00
unsigned int iso88591_encode ( char * out , unsigned int unicode , int maxlen , qboolean markup ) ;
unsigned int qchar_encode ( char * out , unsigned int unicode , int maxlen , qboolean markup ) ;
2016-01-18 05:22:07 +00:00
unsigned int COM_DeQuake ( unsigned int unichar ) ;
2009-05-24 10:11:17 +00:00
2014-08-15 02:20:41 +00:00
void COM_BiDi_Shutdown ( void ) ;
2014-03-30 08:55:06 +00:00
//small macro to tell COM_ParseFunString (and related functions like con_printf) that the input is a utf-8 string.
2015-09-06 03:30:28 +00:00
# define U8(s) "^`u8:"s"`="
2014-03-30 08:55:06 +00:00
2013-05-03 04:28:08 +00:00
//handles whatever charset is active, including ^U stuff.
2014-03-30 08:55:06 +00:00
unsigned int unicode_byteofsfromcharofs ( const char * str , unsigned int charofs , qboolean markup ) ;
unsigned int unicode_charofsfrombyteofs ( const char * str , unsigned int byteofs , qboolean markup ) ;
2014-01-13 02:42:25 +00:00
unsigned int unicode_encode ( char * out , unsigned int unicode , int maxlen , qboolean markup ) ;
2018-11-27 16:48:19 +00:00
unsigned int unicode_decode ( int * error , const void * in , char const * * out , qboolean markup ) ;
2014-03-30 08:55:06 +00:00
size_t unicode_strtolower ( const char * in , char * out , size_t outsize , qboolean markup ) ;
size_t unicode_strtoupper ( const char * in , char * out , size_t outsize , qboolean markup ) ;
unsigned int unicode_charcount ( const char * in , size_t buffersize , qboolean markup ) ;
2018-08-13 06:27:29 +00:00
void unicode_strpad ( char * out , size_t outsize , const char * in , qboolean leftalign , size_t minwidth , size_t maxwidth , qboolean markup ) ;
2013-05-03 04:28:08 +00:00
2009-04-01 22:03:56 +00:00
char * COM_SkipPath ( const char * pathname ) ;
2014-04-24 01:53:01 +00:00
void QDECL COM_StripExtension ( const char * in , char * out , int outlen ) ;
2016-02-10 23:23:43 +00:00
void COM_StripAllExtensions ( const char * in , char * out , int outlen ) ;
2009-04-01 22:03:56 +00:00
void COM_FileBase ( const char * in , char * out , int outlen ) ;
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-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 QDECL COM_FileSize ( const char * path ) ;
2016-02-10 23:23:43 +00:00
void COM_DefaultExtension ( char * path , const char * extension , int maxlen ) ;
qboolean COM_RequireExtension ( char * path , const char * extension , int maxlen ) ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
char * COM_FileExtension ( const char * in , char * result , size_t sizeofresult ) ; //copies the extension, without the dot
const char * COM_GetFileExtension ( const char * in , const char * term ) ; //returns the extension WITH the dot, allowing for scanning backwards.
2005-03-18 06:13:36 +00:00
void COM_CleanUpPath ( char * str ) ;
2004-08-21 01:25:48 +00:00
2013-11-29 14:36:47 +00:00
char * VARGS va ( const char * format , . . . ) LIKEPRINTF ( 1 ) ;
2004-08-21 01:25:48 +00:00
// does a varargs printf into a temp buffer
//============================================================================
struct cache_user_s ;
2014-03-30 08:55:06 +00:00
extern char com_gamepath [ MAX_OSPATH ] ;
extern char com_homepath [ MAX_OSPATH ] ;
2005-12-21 03:07:33 +00:00
extern char com_configdir [ MAX_OSPATH ] ; //dir to put cfg_save configs in
//extern char *com_basedir;
2004-08-21 01:25:48 +00:00
2014-02-07 08:38:40 +00:00
//qofs_Make is used to 'construct' a variable of qofs_t type. this is so the code can merge two 32bit ints on old systems and use a long long type internally without generating warnings about bit shifts when qofs_t is only 32bit instead.
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
//#if defined(__amd64__) || defined(_AMD64_) || __WORDSIZE == 64
# if !defined(FTE_TARGET_WEB) && !defined(NACL)
2016-08-25 00:12:14 +00:00
# if !defined(_MSC_VER) || _MSC_VER > 1200
# define FS_64BIT
# endif
2014-02-07 08:38:40 +00:00
# endif
2016-07-12 00:40:13 +00:00
# ifdef FS_64BIT
2018-03-24 04:02:09 +00:00
//we should probably use off_t here, but then we have fun as to whether its actually 64bit or not, which results in warnings and problems with printf etc.
2016-02-15 06:01:17 +00:00
typedef quint64_t qofs_t ; //type to use for a file offset
2014-02-07 08:38:40 +00:00
# define qofs_Make(low,high) (low | (((qofs_t)(high))<<32))
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
# define qofs_Low(ofs) ((ofs)&0xffffffffu)
# define qofs_High(ofs) ((ofs)>>32)
# define qofs_Error(ofs) ((ofs) == ~(quint64_t)0u)
# define PRIxQOFS PRIx64
# define PRIuQOFS PRIu64
2014-02-07 08:38:40 +00:00
# else
2016-02-15 06:01:17 +00:00
typedef quint32_t qofs_t ; //type to use for a file offset
2014-02-07 08:38:40 +00:00
# define qofs_Make(low,high) (low)
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
# define qofs_Low(ofs) (ofs)
# define qofs_High(ofs) (0)
# define qofs_Error(ofs) ((ofs) == ~0ul)
# define PRIxQOFS "x"
# define PRIuQOFS "u"
2014-02-07 08:38:40 +00:00
# endif
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
# define qofs_ErrorValue() (~(qofs_t)0u)
2014-02-07 08:38:40 +00:00
2014-10-11 19:39:45 +00:00
typedef struct searchpathfuncs_s searchpathfuncs_t ;
typedef struct searchpath_s
{
searchpathfuncs_t * handle ;
unsigned int flags ;
char logicalpath [ MAX_OSPATH ] ; //printable hunam-readable location of the package. generally includes a system path, including nested packages.
char purepath [ 256 ] ; //server tracks the path used to load them so it can tell the client
2016-07-12 00:40:13 +00:00
char prefix [ MAX_QPATH ] ; //prefix to add to each file within the archive. may also be ".." to mean ignore the top-level path.
2014-10-11 19:39:45 +00:00
int crc_check ; //client sorts packs according to this checksum
int crc_reply ; //client sends a different crc back to the server, for the paks it's actually loaded.
int orderkey ; //used to check to see if the paths were actually changed or not.
struct searchpath_s * next ;
struct searchpath_s * nextpure ;
} searchpath_t ;
2004-08-21 01:25:48 +00:00
typedef struct {
2014-02-07 08:38:40 +00:00
struct searchpath_s * search ; //used to say which filesystem driver to open the file from
2017-02-19 00:15:42 +00:00
void * fhandle ; //used by the filesystem driver as a simple reference to the file
2014-02-07 08:38:40 +00:00
char rawname [ MAX_OSPATH ] ; //blank means not readable directly
qofs_t offset ; //only usable if rawname is set.
qofs_t len ; //uncompressed length
2004-08-21 01:25:48 +00:00
} flocation_t ;
2008-11-09 22:29:28 +00:00
struct vfsfile_s ;
2004-08-21 01:25:48 +00:00
2016-07-12 00:40:13 +00:00
# define FSLF_IFFOUND 0 //
# define FSLF_DEEPONFAILURE (1u<<0) //upon failure, report that the file is so far into the filesystem as to be irrelevant
# define FSLF_DEPTH_INEXPLICIT (1u<<1) //depth is incremented for EVERY package, not just system/explicit paths.
# define FSLF_IGNOREBASEDEPTH (1u<<3) //depth is incremented for explicit mod paths, but not id1/qw/fte/paks/pk3s
2015-10-11 11:34:58 +00:00
# define FSLF_SECUREONLY (1u<<4) //ignore files from downloaded packages (ie: configs)
# define FSLF_DONTREFERENCE (1u<<5) //don't add any reference flags to packages
# define FSLF_IGNOREPURE (1u<<6) //use only the client's package list, ignore any lists obtained from the server (including any reordering)
# define FSLF_IGNORELINKS (1u<<7) //ignore any pak/pk3 symlinks. system ones may still be followed.
2004-08-21 01:25:48 +00:00
//if loc is valid, loc->search is always filled in, the others are filled on success.
2016-07-12 00:40:13 +00:00
//standard return value is 0 on failure, or depth on success.
2015-10-11 11:34:58 +00:00
int FS_FLocateFile ( const char * filename , unsigned int flags , flocation_t * loc ) ;
2008-11-09 22:29:28 +00:00
struct vfsfile_s * FS_OpenReadLocation ( flocation_t * location ) ;
2013-12-17 22:45:37 +00:00
char * FS_WhichPackForLocation ( flocation_t * loc , qboolean makereferenced ) ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
qboolean FS_GetLocMTime ( flocation_t * location , time_t * modtime ) ;
2016-07-12 00:40:13 +00:00
char * FS_GetPackageDownloadFilename ( flocation_t * loc ) ;
2008-11-09 22:29:28 +00:00
2012-01-24 04:24:14 +00:00
qboolean FS_GetPackageDownloadable ( const char * package ) ;
2006-01-28 02:35:40 +00:00
char * FS_GetPackHashes ( char * buffer , int buffersize , qboolean referencedonly ) ;
2011-12-05 15:23:40 +00:00
char * FS_GetPackNames ( char * buffer , int buffersize , int referencedonly , qboolean ext ) ;
2016-08-25 00:12:14 +00:00
qboolean FS_GenCachedPakName ( const char * pname , const char * crc , char * local , int llen ) ; //returns false if the name is invalid.
2011-12-05 15:23:40 +00:00
void FS_ReferenceControl ( unsigned int refflag , unsigned int resetflags ) ;
2004-08-21 01:25:48 +00:00
2017-11-23 07:46:39 +00:00
# define FDEPTH_MISSING 0x7fffffff
2016-07-12 00:40:13 +00:00
# define COM_FDepthFile(filename,ignorepacks) FS_FLocateFile(filename,FSLF_DONTREFERENCE|FSLF_DEEPONFAILURE|(ignorepacks?0:FSLF_DEPTH_INEXPLICIT), NULL)
2015-10-11 11:34:58 +00:00
# define COM_FCheckExists(filename) FS_FLocateFile(filename,FSLF_IFFOUND, NULL)
2004-08-21 01:25:48 +00:00
2013-05-03 04:28:08 +00:00
typedef struct vfsfile_s
{
int ( QDECL * ReadBytes ) ( struct vfsfile_s * file , void * buffer , int bytestoread ) ;
2018-10-23 07:09:06 +00:00
int ( QDECL * WriteBytes ) ( struct vfsfile_s * file , const void * buffer , int bytestowrite ) ;
2014-02-07 08:38:40 +00:00
qboolean ( QDECL * Seek ) ( struct vfsfile_s * file , qofs_t pos ) ; //returns false for error
qofs_t ( QDECL * Tell ) ( struct vfsfile_s * file ) ;
qofs_t ( QDECL * GetLen ) ( struct vfsfile_s * file ) ; //could give some lag
2014-03-30 08:55:06 +00:00
qboolean ( QDECL * Close ) ( struct vfsfile_s * file ) ; //returns false if there was some error.
2013-05-03 04:28:08 +00:00
void ( QDECL * Flush ) ( struct vfsfile_s * file ) ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
enum
{
SS_SEEKABLE ,
SS_SLOW , //probably readonly, its fine for an occasional seek, its just really. really. slow.
SS_PIPE , //read can be seeked, write appends only.
SS_UNSEEKABLE
} seekstyle ;
2013-05-03 04:28:08 +00:00
2012-07-05 19:42:36 +00:00
# ifdef _DEBUG
char dbgname [ MAX_QPATH ] ;
# endif
2005-12-21 03:07:33 +00:00
} vfsfile_t ;
2014-03-30 08:55:06 +00:00
# define VFS_CLOSE(vf) ((vf)->Close(vf))
# define VFS_TELL(vf) ((vf)->Tell(vf))
# define VFS_GETLEN(vf) ((vf)->GetLen(vf))
# define VFS_SEEK(vf,pos) ((vf)->Seek(vf,pos))
# define VFS_READ(vf,buffer,buflen) ((vf)->ReadBytes(vf,buffer,buflen))
# define VFS_WRITE(vf,buffer,buflen) ((vf)->WriteBytes(vf,buffer,buflen))
# define VFS_FLUSH(vf) do{if((vf)->Flush)(vf)->Flush(vf);}while(0)
# define VFS_PUTS(vf,s) do{const char *t=s;(vf)->WriteBytes(vf,t,strlen(t));}while(0)
2018-05-21 13:47:53 +00:00
char * VFS_GETS ( vfsfile_t * vf , char * buffer , size_t buflen ) ;
void VARGS VFS_PRINTF ( vfsfile_t * vf , const char * fmt , . . . ) LIKEPRINTF ( 2 ) ;
2009-04-01 22:03:56 +00:00
enum fs_relative {
2013-05-03 04:28:08 +00:00
FS_BINARYPATH , //for dlls and stuff
2018-12-06 04:55:35 +00:00
FS_ROOT , //./ (effective -homedir if enabled, otherwise effective -basedir arg)
2017-02-19 00:15:42 +00:00
FS_SYSTEM , //a system path. absolute paths are explicitly allowed and expected, but not required.
//after this point, all types must be relative to a gamedir
FS_GAME , //standard search (not generally valid for writing/save/rename/delete/etc)
2009-04-01 22:03:56 +00:00
FS_GAMEONLY , //$gamedir/
2015-06-12 14:44:50 +00:00
FS_BASEGAMEONLY , //fte/
FS_PUBGAMEONLY , //$gamedir/ or qw/ but not fte/
2017-02-19 00:15:42 +00:00
FS_PUBBASEGAMEONLY //qw/ (fixme: should be the last non-private basedir)
2009-04-01 22:03:56 +00:00
} ;
2005-12-21 03:07:33 +00:00
2015-06-04 06:15:14 +00:00
void COM_WriteFile ( const char * filename , enum fs_relative fsroot , const void * data , int len ) ;
2017-02-19 00:15:42 +00:00
void FS_FlushFSHashWritten ( const char * fname ) ;
void FS_FlushFSHashRemoved ( const char * fname ) ;
void FS_FlushFSHashFull ( void ) ; //too much/unknown changed...
2009-04-01 22:03:56 +00:00
void FS_CreatePath ( const char * pname , enum fs_relative relativeto ) ;
2012-04-24 07:59:11 +00:00
qboolean FS_Rename ( const char * oldf , const char * newf , enum fs_relative relativeto ) ; //0 on success, non-0 on error
qboolean FS_Rename2 ( const char * oldf , const char * newf , enum fs_relative oldrelativeto , enum fs_relative newrelativeto ) ;
qboolean FS_Remove ( const char * fname , enum fs_relative relativeto ) ; //0 on success, non-0 on error
2009-04-06 00:34:32 +00:00
qboolean FS_Copy ( const char * source , const char * dest , enum fs_relative relativesource , enum fs_relative relativedest ) ;
2009-04-01 22:03:56 +00:00
qboolean FS_NativePath ( const char * fname , enum fs_relative relativeto , char * out , int outlen ) ; //if you really need to fopen yourself
qboolean FS_WriteFile ( const char * filename , const void * data , int len , enum fs_relative relativeto ) ;
2014-06-30 21:57:35 +00:00
void * FS_MallocFile ( const char * filename , enum fs_relative relativeto , qofs_t * filesize ) ;
2018-06-02 08:55:57 +00:00
vfsfile_t * QDECL FS_OpenVFS ( const char * filename , const char * mode , enum fs_relative relativeto ) ;
2006-02-11 02:09:43 +00:00
vfsfile_t * FS_OpenTemp ( void ) ;
2013-03-31 04:21:08 +00:00
vfsfile_t * FS_OpenTCP ( const char * name , int defaultport ) ;
2013-06-23 02:17:02 +00:00
2015-06-14 01:28:01 +00:00
vfsfile_t * FS_OpenWithFriends ( const char * fname , char * sysname , size_t sysnamesize , int numfriends , . . . ) ;
2015-06-04 06:15:14 +00:00
# define countof(array) (sizeof(array) / sizeof(array[0]))
2015-05-14 03:06:58 +00:00
# ifdef _WIN32
//windows doesn't support utf-8. Which is a shame really, because that's the charset we expect from everything.
char * narrowen ( char * out , size_t outlen , wchar_t * wide ) ;
wchar_t * widen ( wchar_t * out , size_t outbytes , const char * utf8 ) ;
# define __L(x) L ## x
# define _L(x) __L(x)
2015-05-16 08:02:05 +00:00
int MyRegGetIntValue ( void * base , const char * keyname , const char * valuename , int defaultval ) ;
qboolean MyRegGetStringValue ( void * base , const char * keyname , const char * valuename , void * data , size_t datalen ) ; //data is utf8
qboolean MyRegGetStringValueMultiSz ( void * base , const char * keyname , const char * valuename , void * data , int datalen ) ;
qboolean MyRegSetValue ( void * base , const char * keyname , const char * valuename , int type , const void * data , int datalen ) ; //string values are utf8
void MyRegDeleteKeyValue ( void * base , const char * keyname , const char * valuename ) ;
2015-05-14 03:06:58 +00:00
# endif
2006-02-11 14:51:36 +00:00
void FS_UnloadPackFiles ( void ) ;
void FS_ReloadPackFiles ( void ) ;
2009-04-01 22:03:56 +00:00
char * FSQ3_GenerateClientPacksList ( char * buffer , int maxlen , int basechecksum ) ;
2014-06-12 23:08:42 +00:00
void FS_PureMode ( int mode , char * purenamelist , char * purecrclist , char * refnamelist , char * refcrclist , int seed ) ; //implies an fs_restart. ref package names are optional, for q3 where pure names don't contain usable paths
2018-09-01 04:18:08 +00:00
int FS_PureOkay ( void ) ;
2005-12-21 03:07:33 +00:00
2014-03-30 08:55:06 +00:00
//recursively tries to open files until it can get a zip.
vfsfile_t * CL_OpenFileInPackage ( searchpathfuncs_t * search , char * name ) ;
2017-07-12 08:15:27 +00:00
qboolean CL_ListFilesInPackage ( searchpathfuncs_t * search , char * name , int ( QDECL * func ) ( const char * fname , qofs_t fsize , time_t mtime , void * parm , searchpathfuncs_t * spath ) , void * parm , void * recursioninfo ) ;
2005-12-21 03:07:33 +00:00
2014-10-05 20:04:11 +00:00
qbyte * QDECL COM_LoadStackFile ( const char * path , void * buffer , int bufsize , size_t * fsize ) ;
2018-07-05 16:21:44 +00:00
qbyte * COM_LoadTempFile ( const char * path , unsigned int locateflags , size_t * fsize ) ;
2014-10-05 20:04:11 +00:00
qbyte * COM_LoadTempMoreFile ( const char * path , size_t * fsize ) ; //allocates a little bit more without freeing old temp
2013-07-14 12:22:51 +00:00
//qbyte *COM_LoadHunkFile (const char *path);
2013-06-23 02:17:02 +00:00
2014-09-20 04:11:39 +00:00
searchpathfuncs_t * COM_IteratePaths ( void * * iterator , char * pathbuffer , int pathbuffersize , char * dirname , int dirnamesize ) ;
2014-10-05 20:04:11 +00:00
void COM_FlushFSCache ( qboolean purge , qboolean domutex ) ; //a file was written using fopen
2010-07-11 02:22:39 +00:00
qboolean FS_Restarted ( unsigned int * since ) ;
2004-08-21 01:25:48 +00:00
2015-04-14 23:12:17 +00:00
enum manifestdeptype_e
{
mdt_invalid ,
mdt_singlepackage , //regular package, versioned.
2015-09-07 14:34:39 +00:00
mdt_installation //allowed to install to the root, only downloaded as part of an initial install.
2015-04-14 23:12:17 +00:00
} ;
2013-06-23 02:17:02 +00:00
typedef struct
{
2014-03-30 08:55:06 +00:00
qboolean blockupdate ; //set to block the updateurl from being used this session. this avoids recursive updates when manifests contain the same update url.
2017-03-04 19:36:06 +00:00
enum
{
MANIFEST_SECURITY_NOT , //don't trust it, don't even allow downloadsurl.
MANIFEST_SECURITY_DEFAULT , //the default.fmf file may suggest packages
MANIFEST_SECURITY_INSTALLER //built-in fmf files can force packages
} security ; //manifest was embedded in the engine. don't assume its already installed, but ask to install it (also, enable some extra permissions for writing dlls)
2014-03-30 08:55:06 +00:00
2015-09-07 14:34:39 +00:00
enum
{
MANIFEST_UNSPECIFIED = 0 ,
MANIFEST_CURRENTVER
} parsever ;
2014-03-30 08:55:06 +00:00
int minver ; //if the engine svn revision is lower than this, the manifest will not be used as an 'upgrade'.
int maxver ; //if not 0, the manifest will not be used
qboolean disablehomedir ;
2013-06-23 02:17:02 +00:00
char * updateurl ; //url to download an updated manifest file from.
2014-03-30 08:55:06 +00:00
char * updatefile ; //this is the file that needs to be written to update the manifest.
2013-06-23 02:17:02 +00:00
char * installation ; //optional hardcoded commercial name, used for scanning the registry to find existing installs.
char * formalname ; //the commercial name of the game. you'll get FULLENGINENAME otherwise.
2016-07-21 19:27:59 +00:00
char * downloadsurl ; //optional installable files (menu)
2016-08-25 00:12:14 +00:00
char * installupd ; //which download/updated package to install.
2013-06-23 02:17:02 +00:00
char * protocolname ; //the name used for purposes of dpmaster
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
char * defaultexec ; //execed after cvars are reset, to give game-specific engine-defaults.
char * defaultoverrides ; //execed after default.cfg, to give usable defaults even when the mod the user is running is shit.
2015-04-14 23:12:17 +00:00
char * eula ; //when running as an installer, the user will be presented with this as a prompt
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
char * rtcbroker ; //the broker to use for webrtc connections.
2018-10-11 10:31:23 +00:00
char * basedir ; //this is where we expect to find the data.
2013-06-23 02:17:02 +00:00
struct
{
qboolean base ;
char * path ;
} gamepath [ 8 ] ;
2015-04-14 23:12:17 +00:00
struct manpack_s
2013-06-23 02:17:02 +00:00
{
2015-04-14 23:12:17 +00:00
int type ;
2013-06-23 02:17:02 +00:00
char * path ; //the 'pure' name
2016-07-12 00:40:13 +00:00
char * prefix ;
2013-08-06 02:19:06 +00:00
qboolean crcknown ; //if the crc was specified
2013-06-23 02:17:02 +00:00
unsigned int crc ; //the public crc
2015-09-07 14:34:39 +00:00
char * mirrors [ 8 ] ; //a randomized (prioritized-on-load) list of mirrors to use. (may be 'prompt:game,package', 'unzip:file,url', 'xz:url', 'gz:url'
char * condition ; //only downloaded if this cvar is set | delimited allows multiple cvars.
2013-06-23 02:17:02 +00:00
int mirrornum ; //the index we last tried to download from, so we still work even if mirrors are down.
} package [ 64 ] ;
} ftemanifest_t ;
playdemo accepts https urls now. will start playing before the file has finished downloading, to avoid unnecessary delays.
reworked network addresses to separate address family and connection type. this should make banning people more reliable, as well as simplifying a whole load of logic (no need to check for ipv4 AND ipv6).
tcpconnect will keep trying to connect even if the connection wasn't instant, instead of giving up instantly.
rewrote tcp connections quite a bit. sv_port_tcp now handles qtv+qizmo+http+ws+rtcbroker+tls equivalents.
qtv_streamport is now a legacy cvar and now acts equivalently to sv_port_tcp (but still separate).
rewrote screenshot and video capture code to use strides. this solves image-is-upside down issues with vulkan.
ignore alt key in browser port. oh no! no more red text! oh no! no more alt-being-wrongly-down-and-being-unable-to-type-anything-without-forcing-alt-released!
reworked audio decoder interface. now has clearly defined success/unavailable/end-of-file results. this should solve a whole load of issues with audio streaming.
fixed various openal audio streaming issues too. openal also got some workarounds for emscripten's poor emulation.
fixed ogg decoder to retain sync properly if seeked.
updated menu_media a bit. now reads vorbis comments/id3v1 tags to get proper track names. also saves the playlist so you don't have to manually repopulate the list so it might actually be usable now (after how many years?)
r_stains now defaults to 0, and is no longer enabled by presets. use decals if you want that sort of thing.
added fs_noreexec cvar, so configs will not be reexeced on gamedir change. this also means defaults won't be reapplied, etc.
added 'nvvk' renderer on windows, using nvidia's vulkan-inside-opengl gl extension. mostly just to see how much slower it is.
fixed up the ftp server quite a lot. more complete, more compliant, and should do ipv6 properly to-boot. file transfers also threaded.
fixed potential crash inside runclientphys.
experimental sv_antilag=3 setting. totally untested. the aim is to avoid missing due to lagged knockbacks. may be expensive for the server.
browser port's websockets support fixed. experimental support for webrtc ('works for me', requires a broker server).
updated avplug(renamed to ffmpeg so people know what it is) to use ffmpeg 3.2.4 properly, with its new encoder api. should be much more robust... also added experimental audio decoder for game music etc (currently doesn't resample, so playback rates are screwed, disabled by cvar).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5097 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-05-10 02:08:58 +00:00
extern ftemanifest_t * fs_manifest ; //currently active manifest.
2013-06-23 02:17:02 +00:00
void FS_Manifest_Free ( ftemanifest_t * man ) ;
2014-03-30 08:55:06 +00:00
ftemanifest_t * FS_Manifest_Parse ( const char * fname , const char * data ) ;
2016-08-25 00:12:14 +00:00
void PM_Shutdown ( void ) ;
2016-11-20 20:52:41 +00:00
void PM_Command_f ( void ) ;
2018-06-06 09:09:14 +00:00
qboolean PM_CanInstall ( const char * packagename ) ;
2013-06-23 02:17:02 +00:00
void COM_InitFilesystem ( void ) ; //does not set up any gamedirs.
2015-04-14 23:12:17 +00:00
qboolean FS_DownloadingPackage ( void ) ;
qboolean FS_ChangeGame ( ftemanifest_t * newgame , qboolean allowreloadconfigs , qboolean allowbasedirchange ) ;
2009-11-04 21:16:50 +00:00
void FS_Shutdown ( void ) ;
2015-05-14 03:06:58 +00:00
struct gamepacks
{
char * path ;
char * url ;
2016-07-12 00:40:13 +00:00
char * subpath ; //within the package (for zips)
2015-05-14 03:06:58 +00:00
} ;
void COM_Gamedir ( const char * dir , const struct gamepacks * packagespaths ) ;
2014-03-30 08:55:06 +00:00
char * FS_GetGamedir ( qboolean publicpathonly ) ;
char * FS_GetManifestArgs ( void ) ;
2016-07-12 00:40:13 +00:00
int FS_GetManifestArgv ( char * * argv , int maxargs ) ;
2009-11-04 21:16:50 +00:00
2013-07-14 12:22:51 +00:00
struct zonegroup_s ;
2014-10-05 20:04:11 +00:00
void * FS_LoadMallocGroupFile ( struct zonegroup_s * ctx , char * path , size_t * fsize ) ;
qbyte * FS_LoadMallocFile ( const char * path , size_t * fsize ) ;
2014-03-30 08:55:06 +00:00
qofs_t FS_LoadFile ( const char * name , void * * file ) ;
2009-05-24 10:11:17 +00:00
void FS_FreeFile ( void * file ) ;
2018-07-05 16:21:44 +00:00
qbyte * COM_LoadFile ( const char * path , unsigned int locateflags , int usehunk , size_t * filesize ) ;
2011-03-12 13:51:40 +00:00
2014-02-07 08:38:40 +00:00
qboolean COM_LoadMapPackFile ( const char * name , qofs_t offset ) ;
2004-08-21 01:25:48 +00:00
void COM_FlushTempoaryPacks ( void ) ;
2015-02-02 08:01:53 +00:00
void COM_EnumerateFiles ( const char * match , int ( QDECL * func ) ( const char * fname , qofs_t fsize , time_t mtime , void * parm , searchpathfuncs_t * spath ) , void * parm ) ;
2004-08-21 01:25:48 +00:00
2015-04-14 23:12:17 +00:00
extern qboolean com_installer ; //says that the engine is running in an 'installer' mode, and that the correct basedir is not yet known.
2004-08-21 01:25:48 +00:00
extern struct cvar_s registered ;
2005-08-26 22:56:51 +00:00
extern qboolean standard_quake ; //fixme: remove
2004-08-21 01:25:48 +00:00
2016-07-12 00:40:13 +00:00
# ifdef NQPROT
void COM_Effectinfo_Enumerate ( int ( * cb ) ( const char * pname ) ) ;
# endif
2008-11-09 22:29:28 +00:00
2017-06-21 01:24:25 +00:00
struct model_s ;
unsigned int COM_RemapMapChecksum ( struct model_s * model , unsigned int checksum ) ;
2009-11-04 21:16:50 +00:00
2010-07-11 02:22:39 +00:00
# define MAX_INFO_KEY 256
2014-03-30 08:55:06 +00:00
char * Info_ValueForKey ( const char * s , const char * key ) ;
2005-03-28 00:11:59 +00:00
void Info_SetValueForKey ( char * s , const char * key , const char * value , int maxsize ) ;
void Info_SetValueForStarKey ( char * s , const char * key , const char * value , int maxsize ) ;
2018-07-05 16:21:44 +00:00
void Info_RemovePrefixedKeys ( char * start , char prefix ) ;
void Info_RemoveKey ( char * s , const char * key ) ;
char * Info_KeyForNumber ( const char * s , int num ) ;
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
void Info_Print ( const char * s , const char * lineprefix ) ;
2018-07-05 16:21:44 +00:00
/*
void Info_RemoveNonStarKeys ( char * start ) ;
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
void Info_Enumerate ( const char * s , void * ctx , void ( * cb ) ( void * ctx , const char * key , const char * value ) ) ;
2005-12-21 03:07:33 +00:00
void Info_WriteToFile ( vfsfile_t * f , char * info , char * commandname , int cvarflags ) ;
2018-07-05 16:21:44 +00:00
*/
/*
Info Buffers
Keynames are still length limited , and may not contain nulls , but neither restriction applies to values .
Using base64 encoding , we ' re able to encode problematic chars like quotes and newlines ( and nulls ) .
This allows mods to store image files inside userinfo .
*/
typedef struct
{
struct infokey_s
{
qbyte partial : 1 ; //partial values read as "".
qbyte large : 1 ; //requires partial/encoded transmission
char * name ;
size_t size ;
size_t buffersize ; //to avoid excessive reallocs
char * value ;
} * keys ;
size_t numkeys ;
size_t totalsize ; //so we can limit userinfo abuse.
void ( * ChangeCB ) ( void * context , const char * key ) ; //usually calls InfoSync_Add on all the interested parties.
void * ChangeCTX ;
} infobuf_t ;
typedef struct
{
struct
{
void * context ;
char * name ;
size_t syncpos ; //reset to 0 when dirty.
} * keys ;
size_t numkeys ;
} infosync_t ;
void InfoSync_Remove ( infosync_t * sync , size_t k ) ;
void InfoSync_Add ( infosync_t * sync , void * context , const char * name ) ;
void InfoSync_Clear ( infosync_t * sync ) ; //wipes all memory etc.
void InfoSync_Strip ( infosync_t * sync , void * context ) ; //Clears away all infos from that context.
extern const char * basicuserinfos [ ] ; //note: has a leading *
extern const char * privateuserinfos [ ] ; //key names that are not broadcast from the server
qboolean InfoBuf_FindKey ( infobuf_t * info , const char * key , size_t * idx ) ;
const char * InfoBuf_KeyForNumber ( infobuf_t * info , int num ) ;
const char * InfoBuf_BlobForKey ( infobuf_t * info , const char * key , size_t * blobsize ) ;
char * InfoBuf_ReadKey ( infobuf_t * info , const char * key , char * outbuf , size_t outsize ) ;
char * InfoBuf_ValueForKey ( infobuf_t * info , const char * key ) ;
qboolean InfoBuf_RemoveKey ( infobuf_t * info , const char * key ) ;
qboolean InfoBuf_SetKey ( infobuf_t * info , const char * key , const char * val ) ; //refuses to set *keys.
qboolean InfoBuf_SetStarKey ( infobuf_t * info , const char * key , const char * val ) ;
qboolean InfoBuf_SetStarBlobKey ( infobuf_t * info , const char * key , const char * val , size_t valsize ) ;
# define InfoBuf_SetValueForKey InfoBuf_SetKey
# define InfoBuf_SetValueForStarKey InfoBuf_SetStarKey
void InfoBuf_Clear ( infobuf_t * info , qboolean all ) ;
void InfoBuf_Clone ( infobuf_t * dest , infobuf_t * src ) ;
void InfoBuf_FromString ( infobuf_t * info , const char * infostring , qboolean append ) ;
char * InfoBuf_DecodeString ( const char * instart , const char * inend , size_t * sz ) ;
qboolean InfoBuf_EncodeString ( const char * n , size_t s , char * out , size_t outsize ) ;
size_t InfoBuf_ToString ( infobuf_t * info , char * infostring , size_t maxsize , const char * * priority , const char * * ignore , const char * * exclusive , infosync_t * sync , void * synccontext ) ; //_ and * can be used to indicate ALL such keys.
qboolean InfoBuf_SyncReceive ( infobuf_t * info , const char * key , size_t keysize , const char * val , size_t valsize , size_t offset , qboolean final ) ;
void InfoBuf_Print ( infobuf_t * info , const char * prefix ) ;
void InfoBuf_WriteToFile ( vfsfile_t * f , infobuf_t * info , const char * commandname , int cvarflags ) ;
void InfoBuf_Enumerate ( infobuf_t * info , void * ctx , void ( * cb ) ( void * ctx , const char * key , const char * value ) ) ;
2004-08-21 01:25:48 +00:00
2011-07-30 14:14:56 +00:00
void Com_BlocksChecksum ( int blocks , void * * buffer , int * len , unsigned char * outbuf ) ;
2014-03-30 08:55:06 +00:00
unsigned int Com_BlockChecksum ( const void * buffer , int length ) ;
void Com_BlockFullChecksum ( const void * buffer , int len , unsigned char * outbuf ) ;
2004-08-21 01:25:48 +00:00
qbyte COM_BlockSequenceCheckByte ( qbyte * base , int length , int sequence , unsigned mapchecksum ) ;
qbyte COM_BlockSequenceCRCByte ( qbyte * base , int length , int sequence ) ;
qbyte Q2COM_BlockSequenceCRCByte ( qbyte * base , int length , int sequence ) ;
2017-09-20 11:27:13 +00:00
typedef size_t hashfunc_t ( unsigned char * digest , size_t maxdigestsize , size_t numstrings , const unsigned char * * strings , size_t * stringlens ) ;
2018-10-23 07:09:06 +00:00
# define SHA1 SHA1_quake
# define HMAC HMAC_quake
2017-09-20 11:27:13 +00:00
hashfunc_t SHA1_m ;
//int SHA1_m(char *digest, size_t maxdigestsize, size_t numstrings, const char **strings, size_t *stringlens);
//#define SHA1(digest,maxdigestsize,string,stringlen) SHA1_m(digest, maxdigestsize, 1, &string, &stringlen)
2018-05-28 10:12:10 +00:00
size_t SHA1 ( unsigned char * digest , size_t maxdigestsize , const unsigned char * string , size_t stringlen ) ;
2017-09-20 11:27:13 +00:00
size_t HMAC ( hashfunc_t * hashfunc , unsigned char * digest , size_t maxdigestsize , const unsigned char * data , size_t datalen , const unsigned char * key , size_t keylen ) ;
2013-06-29 16:01:07 +00:00
2011-03-30 15:17:55 +00:00
int version_number ( void ) ;
char * version_string ( void ) ;
2004-08-21 01:25:48 +00:00
2016-11-20 20:52:41 +00:00
void TL_InitLanguages ( const char * langpath ) ; //langpath is where the .po files can be found
2012-07-05 19:42:36 +00:00
void TL_Shutdown ( void ) ;
2004-08-21 01:25:48 +00:00
void T_FreeStrings ( void ) ;
char * T_GetString ( int num ) ;
2010-08-16 02:03:02 +00:00
void T_FreeInfoStrings ( void ) ;
char * T_GetInfoString ( int num ) ;
2004-08-21 01:25:48 +00:00
2013-11-21 23:02:28 +00:00
struct po_s ;
2017-10-12 12:02:25 +00:00
struct po_s * PO_Create ( void ) ;
void PO_Merge ( struct po_s * po , vfsfile_t * file ) ;
2013-11-21 23:02:28 +00:00
const char * PO_GetText ( struct po_s * po , const char * msg ) ;
void PO_Close ( struct po_s * po ) ;
2007-08-07 14:41:23 +00:00
//
// log.c
//
typedef enum {
LOG_CONSOLE ,
LOG_PLAYER ,
2014-06-24 03:02:32 +00:00
LOG_RCON ,
2007-08-07 14:41:23 +00:00
LOG_TYPES
} logtype_t ;
2017-08-14 16:38:44 +00:00
void Log_String ( logtype_t lognum , const char * s ) ;
void Con_Log ( const char * s ) ;
2007-08-07 14:41:23 +00:00
void Log_Logfile_f ( void ) ;
void Log_Init ( void ) ;
2017-02-11 16:14:06 +00:00
void Log_ShutDown ( void ) ;
2018-11-19 06:37:25 +00:00
# ifdef IPLOG
2017-01-24 10:27:39 +00:00
void IPLog_Add ( const char * ip , const char * name ) ; //for associating player ip addresses with names.
2017-02-11 17:17:54 +00:00
qboolean IPLog_Merge_File ( const char * fname ) ;
2018-11-19 06:37:25 +00:00
# endif
2017-09-20 11:27:13 +00:00
qboolean CertLog_ConnectOkay ( const char * hostname , void * cert , size_t certsize ) ;
2011-06-29 18:39:11 +00:00
/*used by and for botlib and q3 gamecode*/
# define MAX_TOKENLENGTH 1024
typedef struct pc_token_s
{
int type ;
int subtype ;
int intvalue ;
float floatvalue ;
char string [ MAX_TOKENLENGTH ] ;
} pc_token_t ;
# define fileHandle_t int
# define fsMode_t int
2011-12-24 04:05:28 +00:00
typedef struct
{
int sec ;
int min ;
int hour ;
int day ;
int mon ;
int year ;
char str [ 128 ] ;
} date_t ;
void COM_TimeOfDay ( date_t * date ) ;