SW: Put a temporary shim in to get the length of an anm file to pass to ANIM_LoadAnim.

Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@7516 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-04-08 06:27:02 +00:00 committed by Christoph Oelckers
parent f4b3d57ddb
commit d3c8c4579f

View file

@ -283,6 +283,12 @@ playanm(short anim_num)
if (!animbuf)
return;
// [JM] Temporary, needed to get the file's length for ANIM_LoadAnim. !CHECKME!
handle = kopen4load(ANIMname[ANIMnum], 0);
if (handle == -1) return;
length = kfilelength(handle);
kclose(handle);
DSPRINTF(ds,"PlayAnm - Palette Stuff");
MONO_PRINT(ds);
@ -290,7 +296,7 @@ playanm(short anim_num)
tempbuf[i] = i;
palookup[0] = tempbuf;
ANIM_LoadAnim(animbuf);
ANIM_LoadAnim(animbuf, length);
ANIMnumframes = ANIM_NumFrames();
numframes = ANIMnumframes;