Commit Graph

21 Commits

Author SHA1 Message Date
Ozkan Sezer 33c00bf0db minor whitespace/style tidy-up. 2022-09-05 23:56:40 +03:00
Ozkan Sezer 947c782f64 Un-revert the model scale patch.
See https://github.com/sezero/quakespasm/pull/32 for the followup discussions,
and https://github.com/sezero/quakespasm/pull/36 for the followup patches.
2022-09-05 23:56:20 +03:00
Ozkan Sezer e4e914c8a6 reverted the model scale patch :
see https://github.com/sezero/quakespasm/pull/32 for the issues
associated with it.
2022-08-11 01:32:00 +03:00
JosiahJack 6ebf6f097a Add support for model scale 2022-08-08 08:55:00 +03:00
Ozkan Sezer e50415c8ff constified pr_builtins and pr_numbuiltins 2022-04-27 17:00:02 +03:00
Ozkan Sezer 530cbecc7d update PR_PatchRereleaseBuiltins further:
invent and use an exbuiltin_t table. a good side-effect of this is that
it makes sure that the ex_??? builtins' first_statement is actually 0.
2022-04-21 11:33:32 +03:00
Ozkan Sezer 3cefb58d5d move the watcom 'aborts' pragma after function declarations.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1503 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-16 19:50:12 +00:00
Ozkan Sezer b99a823965 noreturn functions: use the 'aborts' aux pragma with Watcom
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1447 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 20:11:03 +00:00
Ozkan Sezer 3cf6946ebd revise the function attributes usage: do not use the gcc __attribute__
directly, but define proper macros for each attribute we do or may use.
also support MSC along the way for example with the noreturn attribute.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1440 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-07-28 12:50:10 +00:00
Eric Wasylishen 8011b3f9fd Host_Loadgame_f: rewritten version loads the whole .sav into memory
+ avoids "Loadgame buffer overflow" when loading saves from QS-Spike/DarkPlaces containing large comments
+ removes ugly } hack
+ should be a bit faster as we avoid calling fgetc for every byte

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1398 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-16 02:53:06 +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
Eric Wasylishen 9894c0b00d Raise MAX_ENT_LEAFS from 16 to 32, fixes disappearing/flickering bmodels in some situations. In particular fixes an elevator in fort_driant-fullvis.bsp, and a grate (func_door) in jam1_ionous.bsp.
From what I understand, if an entity touches more than MAX_ENT_LEAFS, it will only be visible
if the player happens to be standing in one of the first 'MAX_ENT_LEAFS' (so essentially random).

See discussion of MAX_ENT_LEAFS here:
http://celephais.net/board/view_thread.php?id=60310

For more detail (mh has an alternate fix, used in DirectQ/RMQEngine, haven't looked in to what he did):
http://forums.inside3d.com/viewtopic.php?t=2376&postdays=0&postorder=asc&start=23

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@967 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-08-13 06:40:07 +00:00
Ozkan Sezer 300987aa0e progs.h: leafnums array in edict_t needs to be int, not short. patch from Eric Wasylishen.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@899 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-04-13 09:03:48 +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 2fa48afa9c progs.h (PR_RunError): Mark the function as noreturn.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@468 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-08 17:27:44 +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 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 088fb98279 Don't explicitly expose pr_strings to the whole engine, make it static
to pr_edict.c. Assign a static array of zeroes to sv.model_precache[0]
and sv.sound_precache[0], instead of pr_strings, in sv_main.c.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@109 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-09 14:11:10 +00:00
Ozkan Sezer 16b9fd13ea bspfile.h, cdaudio.h, client.h, cmd.h, common.h, console.h, crc.h, cvar.h,
d_ifacea.h, draw.h, gl_texmgr.h, glquake.h, image.h, input.h, keys.h, mathlib.h,
menu.h, modelgen.h, net.h, net_dgrm.h, net_loop.h, net_sdlnet.h, net_udp.h,
net_wins.h, platform.h, pr_comp.h, progdefs.h, progs.h, protocol.h, quakedef.h,
render.h, resource.h, sbar.h, screen.h, server.h, sound.h, spritegn.h, sys.h,
vid.h, view.h, wad.h, world.h, zone.h: added include guards to the headers.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@84 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-21 00:01:08 +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