mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Clean up MapLayers
This commit is contained in:
parent
406d383c45
commit
134400158a
|
@ -387,6 +387,27 @@ void mem_copy_special(void *pDest, void *pSource, size_t Size, size_t Count, siz
|
|||
}
|
||||
}
|
||||
|
||||
CMapLayers::~CMapLayers()
|
||||
{
|
||||
//clear everything and destroy all buffers
|
||||
if(m_TileLayerVisuals.size() != 0)
|
||||
{
|
||||
int s = m_TileLayerVisuals.size();
|
||||
for(int i = 0; i < s; ++i)
|
||||
{
|
||||
delete m_TileLayerVisuals[i];
|
||||
}
|
||||
}
|
||||
if(m_QuadLayerVisuals.size() != 0)
|
||||
{
|
||||
int s = m_QuadLayerVisuals.size();
|
||||
for(int i = 0; i < s; ++i)
|
||||
{
|
||||
delete m_QuadLayerVisuals[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMapLayers::OnMapLoad()
|
||||
{
|
||||
if(!Graphics()->IsTileBufferingEnabled() && !Graphics()->IsQuadBufferingEnabled())
|
||||
|
|
|
@ -139,6 +139,7 @@ public:
|
|||
};
|
||||
|
||||
CMapLayers(int Type, bool OnlineOnly = true);
|
||||
virtual ~CMapLayers();
|
||||
virtual void OnInit();
|
||||
virtual void OnRender();
|
||||
virtual void OnMapLoad();
|
||||
|
|
Loading…
Reference in a new issue