Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jun 11, 2006, 1:57:27 PM (19 years ago)
Author:
bensch
Message:

trunk: fixed most -Wall warnings… but there are still many missing :/

File:
1 edited

Legend:

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

    r7727 r8316  
    220220
    221221/**
    222  * sets a specific renderStyle
     222 * @brief sets a specific renderStyle
    223223 * @param renderStyle the Style to render: a string (char-array) containing:
    224224 *   i: italic, b: bold, u, underline
     
    228228  this->renderStyle = TTF_STYLE_NORMAL;
    229229
    230   for (int i = 0; i < renderStyle.size(); i++)
     230  for (unsigned int i = 0; i < renderStyle.size(); i++)
    231231  {
    232232    if (renderStyle[i] == 'b')
     
    246246
    247247/**
    248  * creates and exports an Image, that has all the characters
     248 * @brief creates and exports an Image, that has all the characters
    249249 * stored in a Array (as an image)
    250250 * @param fileName the File to write the image into.
     
    257257
    258258  //
    259   SDL_Color tmpColor = {0, 0, 0};
    260259  // Surface definition.
    261260  SDL_Rect tmpRect; // this represents a Rectangle for blitting.
     
    277276  tmpRect.x = 0; tmpRect.y = 0; tmpRect.w = tmpSurf->w; tmpRect.h = tmpSurf->h;
    278277  SDL_SetClipRect(tmpSurf, &tmpRect);
    279   int maxLineHeight = 0;
    280278
    281279  int posX, posY;
     
    339337/**
    340338 * @returns the maximum ascent of the Font, if the font was initialized, 0 otherwise
    341 
    342    the ascent is the pixels of the font above the baseline
     339 *
     340 * the ascent is the pixels of the font above the baseline
    343341 */
    344342int Font::getMaxAscent() const
     
    352350/**
    353351 * @returns the maximum descent of the Font, if the font was initialized, 0 otherwise
    354 
    355    the descent is the pixels of the font below the baseline
     352 *
     353 * the descent is the pixels of the font below the baseline
    356354 */
    357355int Font::getMaxDescent() const
     
    404402
    405403/**
    406  * creates a Fast-Texture of this Font
     404 * @brief creates a Fast-Texture of this Font
    407405 */
    408406bool Font::createFastTexture()
     
    497495  if (this->setSurface(tmpSurf))
    498496    (this->setTexture(Texture::loadTexToGL(tmpSurf)));
     497  return true;
    499498}
    500499
     
    547546    return 0;
    548547
    549   int i;
    550   int x,y; // the counters
     548  unsigned int i;
     549  unsigned int x,y; // the counters
    551550  int maxLineHeight = this->getMaxHeight();
    552551  unsigned int size = 32;  // starting Value, we have to start somewhere 32 seems reasonable. (take any small enough 2^i number)
     
    587586
    588587/**
    589  * a simple function to get some interesting information about this class
     588 * @brief a simple function to get some interesting information about this class
    590589 */
    591590void Font::debug()
    592591{
    593592  // print the loaded font's style
    594   int style;
     593  int style = TTF_STYLE_NORMAL;
    595594  if (likely(this->fontTTF != NULL))
    596595    style = TTF_GetFontStyle(this->fontTTF);
Note: See TracChangeset for help on using the changeset viewer.