Commit Graph

15 Commits

Author SHA1 Message Date
Bill Currie 0f5f2a125a Use a reliable reference for calculating progs offsets.
Now that pr->zone can be null, it cannot be used as a reference. Fixes
random crashes when using qfprogs (random due to heap randomization).
2018-10-13 23:23:45 +09:00
Bill Currie b7aa5bb8fe Fix an oops messing up edict size. 2018-10-12 14:33:26 +09:00
Bill Currie 364c2d2c2b Add a stack and push and pop instructions.
The stack is for data, not return addresses.
2018-10-11 13:24:03 +09:00
Bill Currie 61185813fa Cleaner handling of zone_size/zone. 2018-10-11 10:22:10 +09:00
Bill Currie 82809eb856 Simplify the call to PR_LoadProgsFile.
I've decided that setting pr.max_edicts and pr.zone_size as part of the
local progs initialization rather than in PR_LoadProgsFile makes more
sense. For one, it is unlikely for the limits to change every time progs is
reloaded. Also, they seem to be a property of the VM rather than the progs.
However, there is nothing stopping the caller from updating max_edicts and
zone_size every call.
2018-10-11 10:06:48 +09:00
Bill Currie 0de0eb2fc7 Fix a bunch of bit-rot. 2018-06-08 13:21:30 +09:00
Bill Currie 3efb0c538f Separate file search from loading.
QFS_LoadFile (and its wrappers) now  take a file handle rather than a
path. This will make vpath usage a little cleaner to implement.
2014-01-28 16:22:05 +09:00
Bill Currie ec42bde527 Make hash tables more const correct.
And clean up the resulting mess :/
2012-10-27 11:44:31 +09:00
Bill Currie 106257d6e9 Allow reconstructed builtins to be found by name.
Certain versions of qcc (fteqcc comes to mind :P) strip the names from
builtin functions. This breaks saved games that happen to have a builtin
function in a saved function variable. The earlier builtin name
reconstruction patch happened to fix the writing of save games for such
progs, and this one fixes the reading.
2012-07-20 16:17:26 +09:00
Bill Currie a9adc94aa8 Force builtin function descriptors to have a name.
That is, the descriptors loaded from the progs file. Some compilers (eg,
fteqcc :P) strip builtin names from the progs, which makes debugging
difficult.
2012-07-13 10:22:25 +09:00
Bill Currie ce16750b04 Cache the max_edicts value in the progs struct.
Makes checks a little easier.
2012-07-09 15:06:42 +09:00
Bill Currie e91b06a144 Better name for the edict count parameter to PR_LoadProgsFile. 2012-07-09 15:02:49 +09:00
Bill Currie 0036a5e113 Ensure edict_size is never 0.
Avoids division by / in NUM_FOR_EDICT
2012-05-06 21:35:42 +09:00
Bill Currie bc1b483525 Nuke the rcsid stuff.
It's pretty useless in git.
2012-04-22 10:56:32 +09:00
Bill Currie b5019c8e33 Nuke the engine dicrectory from gamecode.
Not the contents, of course :) Anyway, finally, that totally useless
directory is gone.
2012-02-06 23:44:52 +09:00
Renamed from libs/gamecode/engine/pr_load.c (Browse further)