Changeset 5924 in orxonox.OLD for branches/avi_play/src/lib/graphics/text_engine
- Timestamp:
- Dec 4, 2005, 11:37:49 PM (19 years ago)
- Location:
- branches/avi_play/src/lib/graphics/text_engine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/avi_play/src/lib/graphics/text_engine/font.cc
r5768 r5924 181 181 this->fontTTF = NULL; 182 182 } 183 if (this->prepareSurface(surface)) 184 this->loadTexToGL( ); 183 bool hasAlpha; 184 SDL_Surface* newSurf = this->prepareSurface(surface, hasAlpha); 185 if (newSurf != NULL) 186 { 187 this->setSurface(newSurf); 188 this->setAlpha(hasAlpha); 189 this->setTexture(Texture::loadTexToGL(newSurf)); 190 } 185 191 186 192 // initializing the Glyphs. … … 491 497 492 498 if (this->setSurface(tmpSurf)) 493 loadTexToGL();499 (this->setTexture(Texture::loadTexToGL(tmpSurf))); 494 500 } 495 501 -
branches/avi_play/src/lib/graphics/text_engine/text_engine.cc
r5780 r5924 64 64 { 65 65 // first remove all the remaining Texts (if any). 66 std::list<BaseObject*>* textList = ClassList::getList(CL_TEXT);66 const std::list<BaseObject*>* textList = ClassList::getList(CL_TEXT); 67 67 if (textList != NULL) 68 68 { … … 71 71 } 72 72 // delete all remaining fonts (There should not be Anything to do here) 73 std::list<BaseObject*>* fontList = ClassList::getList(CL_FONT);73 const std::list<BaseObject*>* fontList = ClassList::getList(CL_FONT); 74 74 if (fontList != NULL) 75 75 { … … 124 124 void TextEngine::debug() const 125 125 { 126 list<BaseObject*>* textList = ClassList::getList(CL_TEXT);126 const list<BaseObject*>* textList = ClassList::getList(CL_TEXT); 127 127 if (textList != NULL) 128 128 { … … 132 132 PRINT(0)("Reference: %p; Text Counts: %d\n", this, textList->size()); 133 133 134 list<BaseObject*>:: iterator text;134 list<BaseObject*>::const_iterator text; 135 135 for ( text = textList->begin(); text != textList->end(); text++) 136 136 dynamic_cast<Text*>(*text)->debug();
Note: See TracChangeset
for help on using the changeset viewer.