mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Better name for the edict count parameter to PR_LoadProgsFile.
This commit is contained in:
parent
fc88c829bc
commit
e91b06a144
2 changed files with 10 additions and 9 deletions
|
@ -145,7 +145,7 @@ typedef int pr_load_func_t (progs_t *pr);
|
|||
\param pr pointer to ::progs_t VM struct
|
||||
\param file handle of file to read progs data from
|
||||
\param size bytes of \p file to read
|
||||
\param edicts \e number of entities to allocate space for
|
||||
\param max_edicts \e number of entities to allocate space for
|
||||
\param zone minimum size of dynamic memory to allocate space for
|
||||
|
||||
\note \e All runtime strings (permanent or temporary) are allocated from
|
||||
|
@ -153,17 +153,18 @@ typedef int pr_load_func_t (progs_t *pr);
|
|||
So far, 1MB has proven more than sufficient for Quakeword, even when using
|
||||
Ruamoko objects.
|
||||
*/
|
||||
void PR_LoadProgsFile (progs_t *pr, struct QFile_s *file, int size, int edicts,
|
||||
int zone);
|
||||
void PR_LoadProgsFile (progs_t *pr, struct QFile_s *file, int size,
|
||||
int max_edicts, int zone);
|
||||
|
||||
/** Convenience wrapper for PR_LoadProgsFile() and PR_RunLoadFuncs().
|
||||
Searches for the specified file in the Quake filesystem.
|
||||
\param pr pointer to ::progs_t VM struct
|
||||
\param progsname name of the file to load as progs data
|
||||
\param edicts \e number of entities to allocate space for
|
||||
\param max_edicts \e number of entities to allocate space for
|
||||
\param zone minimum size of dynamic memory to allocate space for
|
||||
*/
|
||||
void PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone);
|
||||
void PR_LoadProgs (progs_t *pr, const char *progsname, int max_edicts,
|
||||
int zone);
|
||||
|
||||
/** Register a primary function to be called after the progs code has been
|
||||
loaded. These functions are remembered across progs loads. They will be
|
||||
|
|
|
@ -98,7 +98,7 @@ free_progs_mem (progs_t *pr, void *mem)
|
|||
}
|
||||
|
||||
VISIBLE void
|
||||
PR_LoadProgsFile (progs_t *pr, QFile *file, int size, int edicts, int zone)
|
||||
PR_LoadProgsFile (progs_t *pr, QFile *file, int size, int max_edicts, int zone)
|
||||
{
|
||||
size_t i;
|
||||
int mem_size;
|
||||
|
@ -183,7 +183,7 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size, int edicts, int zone)
|
|||
// properly aligned
|
||||
pr->pr_edict_size += sizeof (void*) - 1;
|
||||
pr->pr_edict_size &= ~(sizeof (void*) - 1);
|
||||
pr->pr_edictareasize = edicts * pr->pr_edict_size;
|
||||
pr->pr_edictareasize = max_edicts * pr->pr_edict_size;
|
||||
|
||||
mem_size = pr->progs_size + pr->zone_size + pr->pr_edictareasize;
|
||||
pr->progs = pr->allocate_progs_mem (pr, mem_size + 1);
|
||||
|
@ -377,14 +377,14 @@ PR_RunLoadFuncs (progs_t *pr)
|
|||
PR_LoadProgs
|
||||
*/
|
||||
VISIBLE void
|
||||
PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone)
|
||||
PR_LoadProgs (progs_t *pr, const char *progsname, int max_edicts, int zone)
|
||||
{
|
||||
QFile *file;
|
||||
QFS_FOpenFile (progsname, &file);
|
||||
|
||||
pr->progs_name = progsname;
|
||||
if (file) {
|
||||
PR_LoadProgsFile (pr, file, qfs_filesize, edicts, zone);
|
||||
PR_LoadProgsFile (pr, file, qfs_filesize, max_edicts, zone);
|
||||
Qclose (file);
|
||||
}
|
||||
if (!pr->progs)
|
||||
|
|
Loading…
Reference in a new issue