- Timestamp:
- Oct 6, 2005, 11:18:00 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine.cc
r5285 r5287 812 812 TextEngine::~TextEngine () 813 813 { 814 // delete all remaining fonts (this is done in the ResourceManager) 815 tList<BaseObject>* fontList = ClassList::getList(CL_FONT); 816 if (fontList != NULL) 817 { 818 tIterator<BaseObject>* fontIterator = fontList->getIterator(); 819 Font* font = dynamic_cast<Font*>(fontIterator->firstElement()); 820 while( font != NULL) 821 { 822 ResourceManager::getInstance()->unload(font, RP_GAME); 823 font = dynamic_cast<Font*>(fontIterator->nextElement()); 824 } 825 delete fontIterator; 826 } 827 814 828 this->disableFonts(); 815 829 … … 874 888 void TextEngine::debug() const 875 889 { 876 PRINT(0)("+-------------------------------+\n"); 877 PRINT(0)("+ TEXT ENGINE DEBUG INFORMATION +\n"); 878 PRINT(0)("+-------------------------------+\n"); 879 PRINT(0)("Reference: %p; Text Counts: %d\n", this, ClassList::getList(CL_TEXT)->getSize()); 880 881 tIterator<BaseObject>* textIterator = ClassList::getList(CL_TEXT)->getIterator(); 882 Text* text = dynamic_cast<Text*>(textIterator->firstElement()); 883 while( text != NULL) 884 { 885 text->debug(); 886 text = dynamic_cast<Text*>(textIterator->nextElement()); 887 } 888 delete textIterator; 889 PRINT(0)("+---------------------------TE--+\n"); 890 tList<BaseObject>* textList = ClassList::getList(CL_TEXT); 891 if (textList != NULL) 892 { 893 PRINT(0)("+-------------------------------+\n"); 894 PRINT(0)("+ TEXT ENGINE DEBUG INFORMATION +\n"); 895 PRINT(0)("+-------------------------------+\n"); 896 PRINT(0)("Reference: %p; Text Counts: %d\n", this, textList->getSize()); 897 898 tIterator<BaseObject>* textIterator = textList->getIterator(); 899 Text* text = dynamic_cast<Text*>(textIterator->firstElement()); 900 while( text != NULL) 901 { 902 text->debug(); 903 text = dynamic_cast<Text*>(textIterator->nextElement()); 904 } 905 delete textIterator; 906 PRINT(0)("+---------------------------TE--+\n"); 907 } 890 908 } 891 909
Note: See TracChangeset
for help on using the changeset viewer.