mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-02 22:01:41 +00:00
- also allocate FDoorAnimation's frame table from the texture manager's memory arena.
The same lifetime rules as for the regular animations apply here.
This commit is contained in:
parent
6d635ce715
commit
f13e95ccbe
1 changed files with 1 additions and 10 deletions
|
@ -73,15 +73,6 @@ void FTextureAnimator::DeleteAll()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mSwitchDefs.Clear();
|
mSwitchDefs.Clear();
|
||||||
|
|
||||||
for (unsigned i = 0; i < mAnimatedDoors.Size(); i++)
|
|
||||||
{
|
|
||||||
if (mAnimatedDoors[i].TextureFrames != NULL)
|
|
||||||
{
|
|
||||||
delete[] mAnimatedDoors[i].TextureFrames;
|
|
||||||
mAnimatedDoors[i].TextureFrames = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mAnimatedDoors.Clear();
|
mAnimatedDoors.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -864,7 +855,7 @@ void FTextureAnimator::ParseAnimatedDoor(FScanner &sc)
|
||||||
}
|
}
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
anim.TextureFrames = new FTextureID[frames.Size()];
|
anim.TextureFrames = (FTextureID*)ImageArena.Alloc(sizeof(FTextureID) * frames.Size());
|
||||||
memcpy (anim.TextureFrames, &frames[0], sizeof(FTextureID) * frames.Size());
|
memcpy (anim.TextureFrames, &frames[0], sizeof(FTextureID) * frames.Size());
|
||||||
anim.NumTextureFrames = frames.Size();
|
anim.NumTextureFrames = frames.Size();
|
||||||
mAnimatedDoors.Push (anim);
|
mAnimatedDoors.Push (anim);
|
||||||
|
|
Loading…
Reference in a new issue