reorganize modules

This commit is contained in:
Eduardo Bart
2011-12-05 16:27:07 -02:00
parent ffeb34e0e7
commit cf0aab6d4d
90 changed files with 186 additions and 181 deletions

View File

@@ -76,7 +76,7 @@ void Font::renderText(const std::string& text,
const Color& color)
{
// prevent glitches from invalid rects
if(!screenCoords.isValid())
if(!screenCoords.isValid() || !m_texture)
return;
int textLenght = text.length();

View File

@@ -27,6 +27,11 @@
FontManager g_fonts;
FontManager::FontManager()
{
m_defaultFont = FontPtr(new Font("emptyfont"));
}
void FontManager::releaseFonts()
{
m_defaultFont.reset();

View File

@@ -28,6 +28,8 @@
class FontManager
{
public:
FontManager();
/// Release fonts references, thus making possible to destruct them
void releaseFonts();