Typedefs | |
typedef int | pr_load_func_t (progs_t *pr) |
Type of functions that are called at progs load. More... | |
Functions | |
void | PR_AddLoadFinishFunc (progs_t *pr, pr_load_func_t *func) |
Register a secondary function to be called after the progs code has been loaded. More... | |
void | PR_AddLoadFunc (progs_t *pr, pr_load_func_t *func) |
Register a primary function to be called after the progs code has been loaded. More... | |
void | PR_BoundsCheck (progs_t *pr, int addr, etype_t type) |
void | PR_BoundsCheckSize (progs_t *pr, pointer_t addr, unsigned size) |
int | PR_Check_Opcodes (progs_t *pr) |
Validate the opcodes and statement addresses in the progs. More... | |
void | PR_LoadProgs (progs_t *pr, const char *progsname, int max_edicts, int zone) |
Convenience wrapper for PR_LoadProgsFile() and PR_RunLoadFuncs(). More... | |
void | PR_LoadProgsFile (progs_t *pr, struct QFile_s *file, int size, int max_edicts, int zone) |
Initialize a progs_t VM struct from an already open file. More... | |
int | PR_RunLoadFuncs (progs_t *pr) |
Run all load functions. More... | |
Type of functions that are called at progs load.
pr | pointer to progs_t VM struct |
void PR_AddLoadFinishFunc | ( | progs_t * | pr, |
pr_load_func_t * | func | ||
) |
Register a secondary function to be called after the progs code has been loaded.
These functions will be forgotten after each load. They will be called in reverse order of being registered.
pr | pointer to progs_t VM struct |
func | function to call |
void PR_AddLoadFunc | ( | progs_t * | pr, |
pr_load_func_t * | func | ||
) |
Register a primary function to be called after the progs code has been loaded.
These functions are remembered across progs loads. They will be called in order of registration.
pr | pointer to progs_t VM struct |
func | function to call |
Convenience wrapper for PR_LoadProgsFile() and PR_RunLoadFuncs().
Searches for the specified file in the Quake filesystem.
pr | pointer to progs_t VM struct |
progsname | name of the file to load as progs data |
max_edicts | number of entities to allocate space for |
zone | minimum size of dynamic memory to allocate space for |
Initialize a progs_t VM struct from an already open file.
pr | pointer to progs_t VM struct |
file | handle of file to read progs data from |
size | bytes of file to read |
max_edicts | number of entities to allocate space for |
zone | minimum size of dynamic memory to allocate space for dynamic memory (bytes). |
zone
is of sufficient size. So far, 1MB has proven more than sufficient for Quakeword, even when using Ruamoko objects. Run all load functions.
Any load function returning false will abort the load operation.
pr | pointer to progs_t VM struct |
Calls the first set of internal load functions followed by the supplied symbol resolution function, if any (progs_t::resolve), the second set of internal load functions. After that, any primary load functions are called in order of registration followed by any .ctor functions in the progs, then any secondary load functions the primary load functions registered in reverse order of registration.