Commit Graph

12 Commits

Author SHA1 Message Date
Ozkan Sezer 3405b87ee0 pr_exec.c, MAX_STACK_DEPTH: increase from 32 to 64
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1415 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-06-23 15:47:01 +00:00
Ozkan Sezer b9032b7815 copyright years, general tidy-up, remove unused d_ifacea.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1059 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 08:55:46 +00:00
Ozkan Sezer 1f6e608267 pr_cmds.c, pr_exec.c, pr_edict.c, sv_main.c: Changed several Sys_Error()
calls to Host_Error(). ED_PrintEdict_f(),ED_PrintEdicts() and ED_Count()
require an active server to print any infos. ED_PrintEdict_f cannot work
with a negative argument.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@788 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-15 17:30:43 +00:00
Ozkan Sezer 396167e0c7 pr_exec.c (PR_ExecuteProgram): Implemented some of LordHavoc's
optimizations mostly by removing the temporary eval_t *a,*b and *c
variables and replacing them by OPA, OPB and OPC macros. Removed
the statement index s and used the statement pointer instead,
updating the pr_xstatement global whenever necessary. In OP_STATE,
stored OPA->_float to ed->v.frame without comparing them (I don't
understand the significance to the comparison.)  Casted st->a, b
and c to unsigned short instead of using them signed as they are
as the pr_globals index value. Updated profiling code.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@505 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 09:03:34 +00:00
Ozkan Sezer 9ba7acffc4 pr_comp.h, pr_edict.c, progs.h, pr_cmds.c, pr_exec.c: made some of the
variables and functions private and did some whitespace tidy-ups.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@504 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 08:56:25 +00:00
Ozkan Sezer e08d6cf1e3 replaced all usess of vsprintf by q_vsnprintf
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@320 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-31 16:57:12 +00:00
Ozkan Sezer 906df3f650 const correctness changes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@300 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 02:22:55 +00:00
Ozkan Sezer b2b771b19f gl_model.c (Mod_LoadTextures): Don't use "min" or "max" as a var name.
net_dgrm.c (Net_Test_f): Likewise.
pr_cmds.c (SetMinMaxSize, PF_setsize): Likewise.
pr_exec.c (PR_Profile_f): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@178 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-06-01 12:10:49 +00:00
Ozkan Sezer 53746a85c9 Constified Con_DebugLog, Con_Print, Con_Printf, Con_Warning, Con_DPrintf,
Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, Con_LogCenterPrint,
Con_NotifyBox, PL_ErrorDialog, PR_RunError, Host_EndGame, Host_Error,
SV_ClientPrintf, SV_BroadcastPrintf, Host_ClientCommands, Sys_DebugLog,
Sys_Error, Sys_Printf, BOPS_Error and va. Added noreturn attribute to
Sys_Error, Sys_Quit, BOPS_Error, PR_RunError, Host_EndGame and Host_Error.
Added format printf attribute to Con_DebugLog, Con_Printf, Con_Warning,
Con_DPrintf, Con_DPrintf2, Con_SafePrintf, Con_CenterPrintf, PL_ErrorDialog,
PR_RunError, Host_EndGame, Host_Error, SV_ClientPrintf, SV_BroadcastPrintf,
Host_ClientCommands, Sys_DebugLog, Sys_Error, Sys_Printf and va. Adjusted
Host_Status_f and NET_Ban_f for the new attributes. Fixed broken format
strings in Con_Dump_f, Mod_LoadTexinfo, PR_AllocStringSlots and FloorDivMod.
Defined __attribute__ macros in quakedef.h so that we don't break non-gcc
compilers.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@154 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-26 16:30:40 +00:00
Ozkan Sezer a3bae85fe6 pr_exec.c (PR_Profile_f): the profile command can only be run when the server is active.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@67 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 00:00:40 +00:00
Ozkan Sezer 89e17301c9 64 bit compatibility effort, 4/nn: x86_64 works just fine now, yey!
the QuakeC interpreter used to use string pointer offsets from pr_strings
even when the pointers lead to engine data which is often well out of
32bit range on a 64bit architecture and they lead to crashes.  they now
go through the new PR_SetEngineString and PR_GetString functions which
turn any address outside the pr_strings area into an index into a table
of engine string addresses, adding new string addresses to the table as
needed. the engine strings table is allocated with 256 entries at first
(see the PR_STRING_ALLOCSLOTS definition in pr_edict.c) and its size is
incremented by 256 as needed and re-allocated on the zone. managing that
allocation and reallocation is accomplished by the recently added Z_Realloc
function. implementation based on the uhexen2 (hexen2: hammer of thyrion)
engine which, in turn, is loosely based on twilight and quakeforge engines.
pr_strings range check is from tyrquake.
pr_edict.c: added the new PR_SetEngineString, PR_GetString, PR_AllocString
public functions and the new private PR_AllocStringSlots function. made
ED_NewString private to pr_edict.c and reworked it to return an index to a
newly allocated string.
progs.h: added prototypes for the new public PR_SetEngineString, PR_GetString
and PR_AllocString functions.
host_cmd.c, pr_cmds.c, pr_edict.c, pr_exec.c, progs.h, sv_main.c, sv_phys.c:
modifed to use the new PR_SetEngineString and PR_GetString functions.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@38 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-17 15:04:50 +00:00
Ozkan Sezer db613ab35d initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00