Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3677 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Mar 30, 2005, 6:15:46 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: more output info, some fixes in resourceManager

Location:
orxonox/trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/glmenu/glmenu_imagescreen.cc

    r3675 r3677  
    4141{
    4242   this->setClassName ("GLMenuImageScreen");
     43   this->backMat = NULL;
    4344}
    4445
     
    5051GLMenuImageScreen::~GLMenuImageScreen()
    5152{
    52   if (backMat)
    53     delete backMat;
     53  if (this->backMat)
     54    delete this->backMat;
    5455}
    5556
  • orxonox/trunk/src/lib/util/resource_manager.cc

    r3676 r3677  
    175175  // searching if the resource was loaded before.
    176176  Resource* tmpResource = this->locateResourceByName(fileName);
    177   if (!tmpResource) // if the resource was not loaded before.
     177  if (tmpResource) // if the resource was not loaded before.
     178    {
     179      PRINTF(4)("not loading cached resource %s\n", tmpResource->name);
     180      tmpResource->count++;
     181      if(tmpResource->prio < prio)
     182        tmpResource->prio = prio;
     183    }
     184  else
    178185    {
    179186      char* tmpDir;
     
    252259      delete []fullName;
    253260    }
    254   else
    255     {
    256       PRINTF(4)("not loading cached resource %s\n", tmpResource->name);
    257       tmpResource->count++;
    258       if(tmpResource->prio < prio)
    259         tmpResource->prio = prio;
    260     }
    261261
    262262  return tmpResource->pointer;
     
    330330    {
    331331      if (enumRes->prio <= prio)
    332         unload(enumRes, prio);
     332        if (enumRes->count == 0)
     333          unload(enumRes, prio);
     334        else
     335          PRINTF(2)("unable to unload %s because there are still %d references to it\n",
     336                   enumRes->name, enumRes->count);
    333337      //enumRes = resourceList->nextElement();
    334338      enumRes = iterator->nextElement();
  • orxonox/trunk/src/story_entities/world.cc

    r3676 r3677  
    145145  cn->unbind(this->localPlayer);
    146146  cn->reset();
     147
    147148  ResourceManager::getInstance()->debug();
    148 
    149149  ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
     150  ResourceManager::getInstance()->debug();
    150151
    151152  delete WorldInterface::getInstance();
  • orxonox/trunk/src/world_entities/primitive.cc

    r3649 r3677  
    2121#include "stdincl.h"
    2222#include "world_entity.h"
    23 #include "objModel.h"
     23#include "model.h"
    2424#include "vector.h"
    2525
  • orxonox/trunk/src/world_entities/terrain.cc

    r3608 r3677  
    1717#include "terrain.h"
    1818#include "stdincl.h"
    19 #include "objModel.h"
     19#include "model.h"
    2020#include "vector.h"
    2121#include "glincl.h"
     
    4545  if (strstr(fileName, ".obj") || strstr(fileName, ".OBJ"))
    4646    {
    47       this->model = (OBJModel*)new OBJModel(fileName);
     47      this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_LEVEL);
    4848    }
    4949  else
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3675 r3677  
    2525#include "stdincl.h"
    2626#include "world_entity.h"
    27 #include "objModel.h"
     27#include "model.h"
    2828#include "projectile.h"
    2929
  • orxonox/trunk/src/world_entities/weapon.cc

    r3646 r3677  
    2121#include "world_entity.h"
    2222#include "vector.h"
    23 #include "objModel.h"
     23#include "model.h"
    2424#include "projectile.h"
    2525#include "list.h"
Note: See TracChangeset for help on using the changeset viewer.