mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
- fixed anim loading in Shadow Warrior.
This commit is contained in:
parent
0b8da78ff5
commit
a45b1ca637
1 changed files with 6 additions and 3 deletions
|
@ -240,13 +240,16 @@ unsigned char *LoadAnm(short anim_num, int *lengthp)
|
||||||
ANIMnum = anim_num;
|
ANIMnum = anim_num;
|
||||||
|
|
||||||
// lock it
|
// lock it
|
||||||
|
|
||||||
|
int file = fileSystem.FindFile(ANIMname[ANIMnum]);
|
||||||
|
if (file < 0) return nullptr;
|
||||||
|
*lengthp = length = fileSystem.FileLength(file);
|
||||||
|
|
||||||
if (anm_ptr[anim_num] == 0)
|
if (anm_ptr[anim_num] == 0)
|
||||||
{
|
{
|
||||||
auto handle = fileSystem.OpenFileReader(ANIMname[ANIMnum], 0);
|
auto handle = fileSystem.OpenFileReader(file);
|
||||||
if (!handle.isOpen())
|
if (!handle.isOpen())
|
||||||
return NULL;
|
return NULL;
|
||||||
*lengthp = length = handle.GetLength();
|
|
||||||
|
|
||||||
buffer.Resize(length + sizeof(anim_t));
|
buffer.Resize(length + sizeof(anim_t));
|
||||||
anm_ptr[anim_num] = (anim_t*)buffer.Data();
|
anm_ptr[anim_num] = (anim_t*)buffer.Data();
|
||||||
|
|
Loading…
Reference in a new issue