Changeset 3677 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Mar 30, 2005, 6:15:46 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/glmenu/glmenu_imagescreen.cc
r3675 r3677 41 41 { 42 42 this->setClassName ("GLMenuImageScreen"); 43 this->backMat = NULL; 43 44 } 44 45 … … 50 51 GLMenuImageScreen::~GLMenuImageScreen() 51 52 { 52 if ( backMat)53 delete backMat;53 if (this->backMat) 54 delete this->backMat; 54 55 } 55 56 -
orxonox/trunk/src/lib/util/resource_manager.cc
r3676 r3677 175 175 // searching if the resource was loaded before. 176 176 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 178 185 { 179 186 char* tmpDir; … … 252 259 delete []fullName; 253 260 } 254 else255 {256 PRINTF(4)("not loading cached resource %s\n", tmpResource->name);257 tmpResource->count++;258 if(tmpResource->prio < prio)259 tmpResource->prio = prio;260 }261 261 262 262 return tmpResource->pointer; … … 330 330 { 331 331 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); 333 337 //enumRes = resourceList->nextElement(); 334 338 enumRes = iterator->nextElement(); -
orxonox/trunk/src/story_entities/world.cc
r3676 r3677 145 145 cn->unbind(this->localPlayer); 146 146 cn->reset(); 147 147 148 ResourceManager::getInstance()->debug(); 148 149 149 ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL); 150 ResourceManager::getInstance()->debug(); 150 151 151 152 delete WorldInterface::getInstance(); -
orxonox/trunk/src/world_entities/primitive.cc
r3649 r3677 21 21 #include "stdincl.h" 22 22 #include "world_entity.h" 23 #include " objModel.h"23 #include "model.h" 24 24 #include "vector.h" 25 25 -
orxonox/trunk/src/world_entities/terrain.cc
r3608 r3677 17 17 #include "terrain.h" 18 18 #include "stdincl.h" 19 #include " objModel.h"19 #include "model.h" 20 20 #include "vector.h" 21 21 #include "glincl.h" … … 45 45 if (strstr(fileName, ".obj") || strstr(fileName, ".OBJ")) 46 46 { 47 this->model = ( OBJModel*)new OBJModel(fileName);47 this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_LEVEL); 48 48 } 49 49 else -
orxonox/trunk/src/world_entities/test_gun.cc
r3675 r3677 25 25 #include "stdincl.h" 26 26 #include "world_entity.h" 27 #include " objModel.h"27 #include "model.h" 28 28 #include "projectile.h" 29 29 -
orxonox/trunk/src/world_entities/weapon.cc
r3646 r3677 21 21 #include "world_entity.h" 22 22 #include "vector.h" 23 #include " objModel.h"23 #include "model.h" 24 24 #include "projectile.h" 25 25 #include "list.h"
Note: See TracChangeset
for help on using the changeset viewer.