osu-ds/source/Graphics/SpriteContainer.cpp
KonPet 183228e28e Change stuff to make it build
Removed the arm7 section
Changed the makefile to only use the arm9 stuff
Epicpkmn: Fix source/Graphics/GraphicsManager.cpp

Co-Authored-By: Pk11 <epicpkmn11@outlook.com>
Co-Authored-By: Kaisaan <34224128+Kaisaan@users.noreply.github.com>
2021-10-21 00:03:39 +02:00

24 lines
460 B
C++

#include "SpriteContainer.h"
SpriteContainer::~SpriteContainer()
{
if (mSpriteOwner)
{
for (spriteIterator it = mSprites.begin(); it != mSprites.end(); ++it)
{
if (*it != NULL)
delete *it;
}
}
}
void SpriteContainer::AddToSpriteManager(SpriteManager& spriteManager)
{
spriteManager.Add(mSprites);
//once sprites are added to spritemanager, the memory
//belongs to the spritemanager, and should be deleted by it
mSpriteOwner = false;
}