- Timestamp:
- Feb 12, 2006, 6:06:26 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r7008 r7125 80 80 PNode::~PNode () 81 81 { 82 printf("delete PNode: %s::%s\n", this->getClassName(), this->getName()); 82 83 // remove the Node, delete it's children (if required). 83 84 std::list<PNode*>::iterator tmp = this->children.begin(); … … 93 94 { 94 95 if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL) 96 { 97 printf("%s::%s deletes PNode: %s::%s\n", 98 this->getClassName(), this->getName(), 99 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 95 100 delete (*deleteNode); 101 } 96 102 else 103 { 104 printf("%s::%s reparents PNode: %s::%s\n", 105 this->getClassName(), this->getName(), 106 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 107 97 108 (*deleteNode)->reparent(); 109 } 98 110 } 99 111 else 112 { 113 printf("%s::%s deletes PNode: %s::%s\n", 114 this->getClassName(), this->getName(), 115 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 100 116 delete (*deleteNode); 117 } 101 118 } 102 119 -
trunk/src/lib/lang/class_list.cc
r7123 r7125 346 346 niceString[30-strlen((*cl).className) - lenCount] = '\0'; 347 347 348 PRINT(0)("| CLASS %s: %s %d\n", (*cl).className, niceString, (*cl).objectList.size());348 PRINT(0)("| CLASS %s::%s %d\n", (*cl).className, niceString, (*cl).objectList.size()); 349 349 350 350 if (debugLevel >=2 && (*cl).objectList.size() > 0) … … 354 354 for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++) 355 355 { 356 PRINT(0)("| (class %s): NAME(%s)->%p ", (*bo)->getClassName(), (*bo)->getName(), (*bo));356 PRINT(0)("| %s::%s::(0x%.8X->%p ", (*bo)->getClassName(), (*bo)->getName(), (*bo)->getClassID(), (*bo)); 357 357 if (debugLevel == 3) 358 358 ClassList::whatIs(*bo); -
trunk/src/story_entities/game_world_data.cc
r7076 r7125 260 260 if (nodeList != NULL) 261 261 while (!nodeList->empty()) 262 delete nodeList->front(); 262 { 263 ClassList::debug( 3, CL_PARENT_NODE); 264 PNode::getNullParent()->debugNode( 1); 265 266 /* printf("%s::%s\n", nodeList->front()->getClassName(), nodeList->front()->getName());*/ 267 delete nodeList->front(); 268 printf("OK\n"); 269 } 263 270 /* remove the player object */ 264 271 if( this->localPlayer) … … 294 301 localCamera = NULL; 295 302 localPlayer = NULL; 303 State::setCamera(NULL, NULL); 296 304 sky = NULL; 297 305 terrain = NULL; -
trunk/src/world_entities/effects/explosion.h
r7103 r7125 33 33 34 34 static SpriteParticles* explosionParticles; 35 BoxEmitter* emitter;35 BoxEmitter* emitter; 36 36 }; 37 37 -
trunk/src/world_entities/environments/water.cc
r7117 r7125 55 55 56 56 this->rebuildGrid(); 57 this->waterMaterial = new Material();58 57 this->waterShader = (Shader*)ResourceManager::getInstance()->load("shaders/water.vert", SHADER, RP_GAME, "shaders/water.frag"); 59 58 … … 65 64 { 66 65 delete this->grid; 67 delete this->waterMaterial;68 66 } 69 67 -
trunk/src/world_entities/environments/water.h
r6981 r7125 12 12 /* INCLUDES */ 13 13 #include "world_entity.h" 14 #include "material.h" 15 14 16 15 17 /* FORWARD DECLARATION */ 16 class Material;17 18 class Grid; 18 19 class Shader; … … 53 54 float cohesion; //!< Cohesion. 54 55 55 Material *waterMaterial;56 Material waterMaterial; 56 57 Shader* waterShader; 57 58 float height; //!< The hight of the Water -
trunk/src/world_entities/skybox.cc
r7123 r7125 104 104 { 105 105 PRINTF(5)("Deleting SkyBox\n"); 106 this->setModel(NULL); //< so that WorldEntity does not try to delete it again.107 106 for (int i = 0; i < 6; i++) 108 107 { -
trunk/src/world_entities/space_ships/turbine_hover.cc
r7105 r7125 226 226 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 227 227 228 State::getCameraNode()->setParentSoft(&this->cameraNode); 229 State::getCameraNode()->setRelCoorSoft(-10, 0,0); 230 State::getCameraTargetNode()->setParentSoft(&this->cameraNode); 228 if (State::getCameraNode != NULL) 229 { 230 State::getCameraNode()->setParentSoft(&this->cameraNode); 231 State::getCameraNode()->setRelCoorSoft(-10, 0,0); 232 State::getCameraTargetNode()->setParentSoft(&this->cameraNode); 233 } 231 234 } 232 235 -
trunk/src/world_entities/world_entity.cc
r7123 r7125 74 74 WorldEntity::~WorldEntity () 75 75 { 76 State::getObjectManager()->toList(this, OM_INIT); 77 78 // Delete the model (unregister it with the ResourceManager) 79 for (unsigned int i = 0; i < this->models.size(); i++) 80 this->setModel(NULL, i); 81 76 82 // Delete the obbTree 77 83 if( this->obbTree != NULL) … … 81 87 delete this->healthWidget; 82 88 83 // Delete the model (unregister it with the ResourceManager)84 for (unsigned int i = 0; i < this->models.size(); i++)85 this->setModel(NULL, i);86 87 State::getObjectManager()->toList(this, OM_INIT);88 89 } 89 90
Note: See TracChangeset
for help on using the changeset viewer.