mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
hmm, forgot a chunk :P
This commit is contained in:
parent
7001f1d851
commit
72036d76b0
1 changed files with 14 additions and 1 deletions
|
@ -158,11 +158,24 @@ bi_plist_clear (progs_t *pr, void *data)
|
|||
Hash_FlushTable (res->items);
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
plist_get_hash (void *key, void *unused)
|
||||
{
|
||||
return (unsigned long) key;
|
||||
}
|
||||
|
||||
static int
|
||||
plist_compare (void *k1, void *k2, void *unused)
|
||||
{
|
||||
return k1 == k2;
|
||||
}
|
||||
|
||||
void
|
||||
Plist_Progs_Init (progs_t *pr)
|
||||
{
|
||||
plist_resources_t *res = malloc (sizeof (plist_resources_t));
|
||||
res->plist = PL_NewArray ();
|
||||
res->items = Hash_NewTable (1021, 0, 0, 0);
|
||||
Hash_SetHashCompare (res->items, plist_get_hash, plist_compare);
|
||||
|
||||
PR_Resources_Register (pr, "plist", res, bi_plist_clear);
|
||||
PR_AddBuiltin (pr, "PL_GetPropertyList", bi_PL_GetPropertyList, -1);
|
||||
|
|
Loading…
Reference in a new issue