mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@5623 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
04b975f3d4
commit
9da0c09505
1 changed files with 18 additions and 0 deletions
|
@ -42,6 +42,24 @@ dukeanim_t * g_animPtr;
|
|||
dukeanim_t *Anim_Find(const char *s)
|
||||
{
|
||||
intptr_t ptr = hash_findcase(&h_dukeanim, s);
|
||||
|
||||
if (ptr == -1)
|
||||
{
|
||||
int const siz = Bstrlen(s) + 5;
|
||||
char * const str = (char *)Xcalloc(1, siz);
|
||||
|
||||
maybe_append_ext(str, siz, s, ".anm");
|
||||
ptr = hash_findcase(&h_dukeanim, str);
|
||||
|
||||
if (ptr == -1)
|
||||
{
|
||||
maybe_append_ext(str, siz, s, ".ivf");
|
||||
ptr = hash_findcase(&h_dukeanim, str);
|
||||
}
|
||||
|
||||
Bfree(str);
|
||||
}
|
||||
|
||||
return (dukeanim_t *)(ptr == -1 ? NULL : (dukeanim_t *)ptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue