- Merged a lot of these static destructor-only structs into regular
functions added to the exit chain with atterm so that they can be called in a deterministic order and not whatever order the linker decides to put them in. - Fixed: DCajunMaster did not free its getspawned. - Fixed: P_FreeLevelData() did not free ACS scripts. - Fixed: Level snapshots were not freed at exit. - Fixed: The save/load menu list was not freed at exit. - Fixed: FCompressedMemFile needs a destructor to free the m_ImplodedBuffer. - Fixed: G_DoLoadGame() did not free the engine string. - Fixed: M_ReadSaveStrings() did not free the engine string. - Fixed: Processing DEM_SAVEGAME did not free the pathname string. - Added a check for truncated flats to FFlatTexture::MakeTexture() because Heretic's F_SKY1 is only four bytes long. - Added a dump of the offending state to the "Cannot find state..." diagnostic. - Fixed: FCompressedFile did not initialize m_Mode in its default constructor. - Fixed: Heretic and Hexen status bars did not initialize ArtiRefresh. - Fixed: PNGHandle destructor should use delete[] to free TextChunks. SVN r111 (trunk)
This commit is contained in:
parent
01441cd4f0
commit
8fcf93d65a
68 changed files with 866 additions and 485 deletions
|
|
@ -72,20 +72,6 @@ static visplane_t *visplanes[MAXVISPLANES+1]; // killough
|
|||
static visplane_t *freetail; // killough
|
||||
static visplane_t **freehead = &freetail; // killough
|
||||
|
||||
static struct VisPlaneFree
|
||||
{
|
||||
~VisPlaneFree()
|
||||
{
|
||||
R_ClearPlanes(false);
|
||||
for (visplane_t *pl = freetail; pl != NULL; )
|
||||
{
|
||||
visplane_t *next = pl->next;
|
||||
free (pl);
|
||||
pl = next;
|
||||
}
|
||||
}
|
||||
} VisPlaneFree_er;
|
||||
|
||||
visplane_t *floorplane;
|
||||
visplane_t *ceilingplane;
|
||||
|
||||
|
|
@ -113,18 +99,6 @@ size_t maxopenings;
|
|||
short *openings;
|
||||
ptrdiff_t lastopening;
|
||||
|
||||
static struct OpeningsFree
|
||||
{
|
||||
~OpeningsFree()
|
||||
{
|
||||
if (openings != NULL)
|
||||
{
|
||||
free (openings);
|
||||
openings = NULL;
|
||||
}
|
||||
}
|
||||
} FreeOpenings;
|
||||
|
||||
//
|
||||
// Clip values are the solid pixel bounding the range.
|
||||
// floorclip starts out SCREENHEIGHT and is just outside the range
|
||||
|
|
@ -181,6 +155,23 @@ void R_InitPlanes ()
|
|||
{
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// R_DeinitPlanes
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void R_DeinitPlanes ()
|
||||
{
|
||||
R_ClearPlanes(false);
|
||||
for (visplane_t *pl = freetail; pl != NULL; )
|
||||
{
|
||||
visplane_t *next = pl->next;
|
||||
free (pl);
|
||||
pl = next;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// R_MapPlane
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue