Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Oct 7, 2005, 6:47:24 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ResourceManager removed obsolete subMatch. This was a Bug

File:
1 edited

Legend:

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

    r5306 r5307  
    251251    {
    252252      PRINTF(4)("not loading cached resource %s\n", tmpResource->name);
    253       printf("adding %s count: %d\n", tmpResource->pointer->getName(),  tmpResource->count);
     253//      printf("adding %s count: %d\n", tmpResource->pointer->getName(),  tmpResource->count);
    254254      tmpResource->count++;
    255255      if(tmpResource->prio < prio)
     
    258258  else
    259259    {
    260       char* tmpDir;
    261260      // Setting up the new Resource
    262261      tmpResource = new Resource;
     
    321320#ifndef NO_TEXT
    322321        case TTF:
    323             if (param1)
     322            if (param1 != NULL)
    324323              tmpResource->ttfSize = *(unsigned int*)param1;
    325324            else
     
    351350          else
    352351            {
     352              char* tmpDir;
    353353              tIterator<char>* iterator = imageDirs->getIterator();
    354354              tmpDir = iterator->firstElement();
     
    421421  if (resource == NULL)
    422422    return false;
    423   printf("removing %s count: %d\n", resource->pointer->getName(),  resource->count);
     423//  printf("removing %s count: %d\n", resource->pointer->getName(),  resource->count);
    424424  if (resource->count > 0)
    425425    resource->count--;
     
    521521        {
    522522          bool match = false;
    523           bool subMatch = false;
    524523
    525524          switch (type)
     
    542541                    match = true;
    543542                }
    544               else if (enumRes->skinFileName!= NULL && !strcmp(enumRes->skinFileName, (const char*) param1))
     543              else if (!strcmp(enumRes->skinFileName, (const char*)param1))
    545544                match = true;
    546545              break;
     
    548547#ifndef NO_TEXT
    549548            case TTF:
    550               if (!param1)
     549              if (param1 == NULL)
    551550                {
    552551                  if (enumRes->ttfSize == FONT_DEFAULT_SIZE)
    553                     subMatch = true;
     552                    match = true;
    554553                }
    555554              else if (enumRes->ttfSize == *(unsigned int*)param1)
    556                 subMatch = true;
     555                match = true;
    557556              break;
    558557#endif /* NO_TEXT */
Note: See TracChangeset for help on using the changeset viewer.