Changeset 9235 in orxonox.OLD for trunk/src/story_entities/game_world.cc
- Timestamp:
- Jul 5, 2006, 4:39:02 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.cc
r9110 r9235 62 62 #include "game_rules.h" 63 63 64 using namespace std;65 66 64 #include "script_class.h" 67 65 CREATE_SCRIPTABLE_CLASS(GameWorld, CL_GAME_WORLD, 68 66 addMethod("setPlaymode", ExecutorLua1<GameWorld,const std::string&>(&GameWorld::setPlaymode)) 67 ->addMethod("setSoundtrack", ExecutorLua1<GameWorld, const std::string&>(&GameWorld::setSoundtrack)) 69 68 ); 70 69 … … 158 157 159 158 PRINTF(3)("> Loading world: '%s'\n", getLoadFile().c_str()); 160 // TiXmlElement* element;161 // GameLoader* loader = GameLoader::getInstance();159 // TiXmlElement* element; 160 // GameLoader* loader = GameLoader::getInstance(); 162 161 163 162 if( getLoadFile().empty()) … … 233 232 234 233 234 void GameWorld::setSoundtrack(const std::string& soundTrack) 235 { 236 if (this->dataTank != NULL) 237 { 238 this->dataTank->setSoundTrack(soundTrack); 239 this->dataTank->music->play(); 240 } 241 } 242 243 235 244 /** 236 245 * starts the GameWorld … … 312 321 /* update the state */ 313 322 //this->update (); /// LESS REDUNDANCY. 314 // PNode::getNullParent()->updateNode(this->dtS);323 // PNode::getNullParent()->updateNode(this->dtS); 315 324 PNode::getNullParent()->updateNode(this->dtS); 316 325 … … 459 468 CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01), 460 469 this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ)); 461 CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00), 462 this->dataTank->objectManager->getObjectList(OM_GROUP_01)); 470 CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01), 471 this->dataTank->objectManager->getObjectList(OM_GROUP_00)); 472 473 CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01), 474 this->dataTank->objectManager->getObjectList(OM_GROUP_02)); 475 CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_02), 476 this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ)); 477 463 478 464 479 CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00), … … 536 551 void GameWorld::renderPassReflection() 537 552 { 538 553 // clear buffer 539 554 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 540 // glLoadIdentity();555 // glLoadIdentity(); 541 556 542 557 const std::list<BaseObject*>* reflectedWaters; … … 562 577 // draw everything to be included in the reflection 563 578 this->drawEntityList(State::getObjectManager()->getReflectionList()); 564 // for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)565 // this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));579 // for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 580 // this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i])); 566 581 567 582 // clean up from reflection rendering … … 578 593 void GameWorld::renderPassRefraction() 579 594 { 580 595 // clear buffer 581 596 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 582 597 //glLoadIdentity(); … … 602 617 // draw everything to be included in the reflection 603 618 this->drawEntityList(State::getObjectManager()->getReflectionList()); 604 // for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)605 // this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));619 // for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 620 // this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i])); 606 621 607 622 // clean up from reflection rendering
Note: See TracChangeset
for help on using the changeset viewer.