Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9235 in orxonox.OLD for trunk/src/story_entities/game_world.cc


Ignore:
Timestamp:
Jul 5, 2006, 4:39:02 PM (19 years ago)
Author:
bensch
Message:

merged the presentation back

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world.cc

    r9110 r9235  
    6262#include "game_rules.h"
    6363
    64 using namespace std;
    65 
    6664#include "script_class.h"
    6765CREATE_SCRIPTABLE_CLASS(GameWorld, CL_GAME_WORLD,
    6866                        addMethod("setPlaymode", ExecutorLua1<GameWorld,const std::string&>(&GameWorld::setPlaymode))
     67                        ->addMethod("setSoundtrack", ExecutorLua1<GameWorld, const std::string&>(&GameWorld::setSoundtrack))
    6968                       );
    7069
     
    158157
    159158  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();
    162161
    163162  if( getLoadFile().empty())
     
    233232
    234233
     234void 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
    235244/**
    236245 *  starts the GameWorld
     
    312321    /* update the state */
    313322    //this->update (); /// LESS REDUNDANCY.
    314 //      PNode::getNullParent()->updateNode(this->dtS);
     323    //      PNode::getNullParent()->updateNode(this->dtS);
    315324    PNode::getNullParent()->updateNode(this->dtS);
    316325
     
    459468  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
    460469      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
    463478
    464479  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
     
    536551void GameWorld::renderPassReflection()
    537552{
    538     // clear buffer
     553  // clear buffer
    539554  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
    540 //  glLoadIdentity();
     555  //  glLoadIdentity();
    541556
    542557  const std::list<BaseObject*>* reflectedWaters;
     
    562577      // draw everything to be included in the reflection
    563578      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]));
    566581
    567582      // clean up from reflection rendering
     
    578593void GameWorld::renderPassRefraction()
    579594{
    580     // clear buffer
     595  // clear buffer
    581596  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
    582597  //glLoadIdentity();
     
    602617      // draw everything to be included in the reflection
    603618      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]));
    606621
    607622      // clean up from reflection rendering
Note: See TracChangeset for help on using the changeset viewer.