Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5121 in orxonox.OLD for trunk/src/util/resource_manager.cc


Ignore:
Timestamp:
Aug 25, 2005, 1:26:57 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: color is now a parameter of text not font

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/resource_manager.cc

    r5115 r5121  
    319319            else
    320320              tmpResource->ttfSize = FONT_DEFAULT_SIZE;
    321             if (param2)
    322               {
    323                 Vector* tmpVec = (Vector*)param2;
    324                 tmpResource->ttfColorR = (int)tmpVec->x;
    325                 tmpResource->ttfColorG = (int)tmpVec->y;
    326                 tmpResource->ttfColorB = (int)tmpVec->z;
    327               }
    328             else
    329               {
    330                 tmpResource->ttfColorR = FONT_DEFAULT_COLOR_R;
    331                 tmpResource->ttfColorG = FONT_DEFAULT_COLOR_G;
    332                 tmpResource->ttfColorB = FONT_DEFAULT_COLOR_B;
    333               }
    334321
    335322          if(isFile(fullName))
    336323            tmpResource->pointer = new Font(fullName,
    337                                             tmpResource->ttfSize,
    338                                             tmpResource->ttfColorR,
    339                                             tmpResource->ttfColorG,
    340                                             tmpResource->ttfColorB);
     324                                            tmpResource->ttfSize);
    341325          else
    342326            PRINTF(2)("Sorry, %s does not exist. Not loading Font\n", fullName);
     
    560544              else if (enumRes->ttfSize == *(int*)param1)
    561545                subMatch = true;
    562               if(subMatch)
    563                 {
    564                   Vector* tmpVec = (Vector*)param2;
    565                   if (!param2)
    566                     {
    567                       if(enumRes->ttfColorR == FONT_DEFAULT_COLOR_R &&
    568                          enumRes->ttfColorG == FONT_DEFAULT_COLOR_G &&
    569                          enumRes->ttfColorB == FONT_DEFAULT_COLOR_B )
    570                         match = true;
    571                     }
    572                   else if (enumRes->ttfColorR == (int)tmpVec->x &&
    573                            enumRes->ttfColorG == (int)tmpVec->y &&
    574                            enumRes->ttfColorB == (int)tmpVec->z )
    575                     match = true;
    576                 }
    577546              break;
    578547#endif /* NO_TEXT */
Note: See TracChangeset for help on using the changeset viewer.