- moved switch definitions into texture manager and split all associated code off p_switches.cpp into its own file.

SVN r3027 (trunk)
This commit is contained in:
Christoph Oelckers 2010-12-11 23:02:46 +00:00
commit 24ab37613a
8 changed files with 493 additions and 379 deletions

View file

@ -104,6 +104,17 @@ void FTextureManager::DeleteAll()
}
mAnimations.Clear();
for (unsigned i = 0; i < mSwitchDefs.Size(); i++)
{
if (mSwitchDefs[i] != NULL)
{
M_Free (mSwitchDefs[i]);
mSwitchDefs[i] = NULL;
}
}
mSwitchDefs.Clear();
for (unsigned int i = 0; i < BuildTileFiles.Size(); ++i)
{
delete[] BuildTileFiles[i];
@ -978,6 +989,7 @@ void FTextureManager::Init()
InitAnimated();
InitAnimDefs();
FixAnimations();
InitSwitchList();
}
//==========================================================================