mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
split up PR_LoadProgs a bit
This commit is contained in:
parent
5d5d3f1416
commit
0576dec1e2
1 changed files with 22 additions and 9 deletions
|
@ -1005,18 +1005,10 @@ var_get_key (void *d, void *_pr)
|
|||
return PR_GetString (pr, def->s_name);
|
||||
}
|
||||
|
||||
/*
|
||||
PR_LoadProgs
|
||||
*/
|
||||
void
|
||||
PR_LoadProgs (progs_t * pr, const char *progsname)
|
||||
_PR_LoadProgs (progs_t * pr, const char *progsname)
|
||||
{
|
||||
int i;
|
||||
dstatement_t *st;
|
||||
|
||||
// flush the non-C variable lookup cache
|
||||
for (i = 0; i < GEFV_CACHESIZE; i++)
|
||||
gefvCache[i].field[0] = 0;
|
||||
|
||||
if (progsname)
|
||||
pr->progs = (dprograms_t *) COM_LoadHunkFile (progsname);
|
||||
|
@ -1116,6 +1108,27 @@ PR_LoadProgs (progs_t * pr, const char *progsname)
|
|||
|
||||
for (i = 0; i < pr->progs->numglobals; i++)
|
||||
((int *) pr->pr_globals)[i] = LittleLong (((int *) pr->pr_globals)[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
PR_LoadProgs
|
||||
*/
|
||||
void
|
||||
PR_LoadProgs (progs_t * pr, const char *progsname)
|
||||
{
|
||||
int i;
|
||||
dstatement_t *st;
|
||||
|
||||
_PR_LoadProgs (pr, progsname);
|
||||
if (!pr->progs)
|
||||
return;
|
||||
|
||||
if (!progsname)
|
||||
progsname = "(preloaded)";
|
||||
|
||||
// flush the non-C variable lookup cache
|
||||
for (i = 0; i < GEFV_CACHESIZE; i++)
|
||||
gefvCache[i].field[0] = 0;
|
||||
|
||||
if (!(pr->globals.time = (float*)PR_GetGlobalPointer (pr, "time")))
|
||||
PR_Error (pr, "%s: undefined symbol: time", progsname);
|
||||
|
|
Loading…
Reference in a new issue