mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +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();
|
||||
|
||||
for (unsigned i = 0; i < mAnimatedDoors.Size(); i++)
|
||||
{
|
||||
if (mAnimatedDoors[i].TextureFrames != NULL)
|
||||
{
|
||||
delete[] mAnimatedDoors[i].TextureFrames;
|
||||
mAnimatedDoors[i].TextureFrames = NULL;
|
||||
}
|
||||
}
|
||||
mAnimatedDoors.Clear();
|
||||
}
|
||||
|
||||
|
@ -864,7 +855,7 @@ void FTextureAnimator::ParseAnimatedDoor(FScanner &sc)
|
|||
}
|
||||
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());
|
||||
anim.NumTextureFrames = frames.Size();
|
||||
mAnimatedDoors.Push (anim);
|
||||
|
|
Loading…
Reference in a new issue