mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 13:31:37 +00:00
- Fixed: The FSpecialFont constructor created the name string twice.
- Fixed: The animated door parser was still leaking memory when it encountered an invalid animation due to missing textures. - Fixed: The music volume list wasn't freed. - Fixed: The image for WADs that were loaded from inside Zips was never freed. SVN r92 (trunk)
This commit is contained in:
parent
6de9e9a433
commit
7ed597fcbe
5 changed files with 33 additions and 6 deletions
|
@ -1,6 +1,12 @@
|
||||||
May 9, 2006 (Changes by Graf Zahl)
|
May 9, 2006 (Changes by Graf Zahl)
|
||||||
- Changed FDoorAnimation deletion so that the array takes care of it. This
|
- Fixed: The FSpecialFont constructor created the name string twice.
|
||||||
eliminates some complications with the requirements a destructor has.
|
- Fixed: The animated door parser was still leaking memory when it encountered
|
||||||
|
an invalid animation due to missing textures.
|
||||||
|
- Fixed: The music volume list wasn't freed.
|
||||||
|
- Fixed: The image for WADs that were loaded from inside Zips was never freed.
|
||||||
|
- Changed FDoorAnimation deletion so that the array takes care of it. The
|
||||||
|
original destructor approach would have necessitated a lot more supporting
|
||||||
|
code to work as intended.
|
||||||
- Fixed: Skin definitions were never freed.
|
- Fixed: Skin definitions were never freed.
|
||||||
- Fixed: Names in terrain definitions were never freed. Replacing them with
|
- Fixed: Names in terrain definitions were never freed. Replacing them with
|
||||||
FNames would have been a good idea anyway.
|
FNames would have been a good idea anyway.
|
||||||
|
|
|
@ -856,11 +856,16 @@ void P_ParseAnimatedDoor()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
anim.TextureFrames = new int[frames.Size()];
|
|
||||||
memcpy (anim.TextureFrames, &frames[0], sizeof(int) * frames.Size());
|
|
||||||
anim.NumTextureFrames = frames.Size();
|
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
|
anim.TextureFrames = new int[frames.Size()];
|
||||||
|
memcpy (anim.TextureFrames, &frames[0], sizeof(int) * frames.Size());
|
||||||
|
anim.NumTextureFrames = frames.Size();
|
||||||
DoorAnimations.Push (anim);
|
DoorAnimations.Push (anim);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (anim.OpenSound!=NULL) delete [] anim.OpenSound;
|
||||||
|
if (anim.CloseSound!=NULL) delete [] anim.CloseSound;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,6 +210,19 @@ static const char *SICommandStrings[] =
|
||||||
static TArray<FRandomSoundList> S_rnd;
|
static TArray<FRandomSoundList> S_rnd;
|
||||||
static FMusicVolume *MusicVolumes;
|
static FMusicVolume *MusicVolumes;
|
||||||
|
|
||||||
|
static struct MusicVolumeDeleter
|
||||||
|
{
|
||||||
|
~MusicVolumeDeleter()
|
||||||
|
{
|
||||||
|
while(MusicVolumes!=NULL)
|
||||||
|
{
|
||||||
|
FMusicVolume * next = MusicVolumes->Next;
|
||||||
|
free(MusicVolumes);
|
||||||
|
MusicVolumes=next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} DeleteTheMusicVolumes;
|
||||||
|
|
||||||
static int NumPlayerReserves;
|
static int NumPlayerReserves;
|
||||||
static bool DoneReserving;
|
static bool DoneReserving;
|
||||||
static bool PlayerClassesIsSorted;
|
static bool PlayerClassesIsSorted;
|
||||||
|
|
|
@ -1138,7 +1138,6 @@ FSpecialFont::FSpecialFont (const char *name, int first, int count, int *lumplis
|
||||||
FontHeight = 0;
|
FontHeight = 0;
|
||||||
GlobalKerning = false;
|
GlobalKerning = false;
|
||||||
memset (usedcolors, 0, 256);
|
memset (usedcolors, 0, 256);
|
||||||
Name = copystring (name);
|
|
||||||
Next = FirstFont;
|
Next = FirstFont;
|
||||||
FirstFont = this;
|
FirstFont = this;
|
||||||
|
|
||||||
|
|
|
@ -1938,6 +1938,10 @@ FWadCollection::WadFileRecord::~WadFileRecord ()
|
||||||
{
|
{
|
||||||
delete[] Name;
|
delete[] Name;
|
||||||
}
|
}
|
||||||
|
if (MemoryData != NULL)
|
||||||
|
{
|
||||||
|
delete [] MemoryData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long FWadCollection::WadFileRecord::Seek (long offset, int origin)
|
long FWadCollection::WadFileRecord::Seek (long offset, int origin)
|
||||||
|
|
Loading…
Reference in a new issue