Changeset 4597 in orxonox.OLD for orxonox/trunk/src/lib/particles/particle_engine.cc
- Timestamp:
- Jun 11, 2005, 12:55:48 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_engine.cc
r4519 r4597 1 /* 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 … … 30 30 \brief standard constructor 31 31 */ 32 ParticleEngine::ParticleEngine () 32 ParticleEngine::ParticleEngine () 33 33 { 34 34 this->setClassID(CL_PARTICLE_ENGINE, "ParticleEngine"); 35 this->setName("ParticleEngine"); 35 36 36 37 this->systemList = new tList<ParticleSystem>; … … 47 48 \brief deletes all the system, emitters, connections and Lists 48 49 */ 49 ParticleEngine::~ParticleEngine () 50 ParticleEngine::~ParticleEngine () 50 51 { 51 52 // delete all remaining systems … … 113 114 { 114 115 if (tmpConnection->emitter == emitter && tmpConnection->system == system) 115 116 117 118 119 120 116 { 117 PRINTF(2)("Connection between Emitter and System already added\n"); 118 delete tmpConIt; 119 return; 120 } 121 121 122 tmpConnection = tmpConIt->nextElement(); 122 123 } 123 124 delete tmpConIt; 124 125 125 126 126 127 … … 144 145 { 145 146 if (tmpConnection->system == system) 146 147 this->breakConnection(tmpConnection); 147 148 tmpConnection = tmpConIt->nextElement(); 148 149 } … … 165 166 { 166 167 if (tmpConnection->emitter == emitter) 167 168 this->breakConnection(tmpConnection); 168 169 tmpConnection = tmpConIt->nextElement(); 169 170 } … … 191 192 if (tmpConnection->emitter == emitter && tmpConnection->system == system) 192 193 { 193 194 195 194 this->breakConnection(tmpConnection); 195 delete tmpConIt; 196 return true; 196 197 } 197 198 tmpConnection = tmpConIt->nextElement(); … … 268 269 { 269 270 if (!strcmp(systemName, tmpSys->getName())) 270 271 272 273 271 { 272 delete tmpIt; 273 return tmpSys; 274 } 274 275 tmpSys = tmpIt->nextElement(); 275 276 } … … 291 292 count++; 292 293 if ( count == number) 293 294 295 296 294 { 295 delete tmpIt; 296 return tmpSys; 297 } 297 298 tmpSys = tmpIt->nextElement(); 298 299 } … … 312 313 { 313 314 if (!strcmp(emitterName, tmpEmit->getName())) 314 315 316 317 315 { 316 delete tmpIt; 317 return tmpEmit; 318 } 318 319 tmpEmit = tmpIt->nextElement(); 319 320 } … … 336 337 count++; 337 338 if ( count == number) 338 339 340 341 339 { 340 delete tmpIt; 341 return tmpEmit; 342 } 342 343 tmpEmit = tmpIt->nextElement(); 343 344 } … … 356 357 PRINT(0)(" Reference: %p\n", ParticleEngine::singletonRef); 357 358 PRINT(0)(" Count: Emitters: %d; Systems: %d, Connections: %d\n", 358 359 this->emitterList->getSize(), this->systemList->getSize(), this->connectionList->getSize()); 359 360 if (this->connectionList->getSize() > 0) 360 361 { … … 365 366 ParticleConnection* tmpConnection = tmpConIt->nextElement(); 366 367 while(tmpConnection) 367 368 369 370 368 { 369 PRINT(0)(" Emitter '%s' emitts into System '%s'\n", tmpConnection->emitter->getName(), tmpConnection->system->getName()); 370 tmpConnection = tmpConIt->nextElement(); 371 } 371 372 delete tmpConIt; 372 373 } … … 376 377 ParticleSystem* tmpSys = tmpIt->nextElement(); 377 378 while(tmpSys) 378 379 380 381 379 { 380 tmpSys->debug(); 381 tmpSys = tmpIt->nextElement(); 382 } 382 383 delete tmpIt; 383 384 }
Note: See TracChangeset
for help on using the changeset viewer.