Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5215 in orxonox.OLD for trunk/src/lib/graphics/text_engine.cc


Ignore:
Timestamp:
Sep 22, 2005, 4:02:08 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: some more fixing of the Errors reported by valgrind
removed some stuff in patrick's collision-detection.
also changed Vector* to Vector in Rectangle (patrick tell me, if this is not ok - but i doubt it :))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine.cc

    r5208 r5215  
    405405  // setting default values.
    406406  this->font = NULL;
    407   this->fontFile = NULL;
    408407  this->glyphArray = NULL;
    409408  this->fastTextureID = 0;
     
    446445bool Font::loadFont(const char* fontFile)
    447446{
    448   if (!this->fontFile)
     447  if (!this->getName())
    449448    {
    450449      this->setName(fontFile);
    451       this->fontFile = new char[strlen(fontFile)+1];
    452       strcpy(this->fontFile, fontFile);
    453 
    454       this->font = TTF_OpenFont(this->fontFile, this->fontSize);
     450
     451      this->font = TTF_OpenFont(this->getName(), this->fontSize);
    455452      if(!this->font)
    456453        {
Note: See TracChangeset for help on using the changeset viewer.