Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7370 in orxonox.OLD for trunk/src/story_entities/simple_game_menu.cc


Ignore:
Timestamp:
Apr 26, 2006, 1:31:01 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: drawLists/tickLists are used, and made some TiXmlElement to const TiXmlElement, also fixed some bugs in the loadWorldEntities-functions from Gameworld and SipleGameMenu

File:
1 edited

Legend:

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

    r7324 r7370  
    253253ErrorMessage SimpleGameMenu::unloadData()
    254254{
    255 
    256255  EventHandler::getInstance()->unsubscribe(this, ES_MENU);
    257256
     
    316315
    317316/**
    318  * no collision detection in the menu
     317 * @brief no collision detection in the menu
    319318 */
    320319void SimpleGameMenu::collide()
     
    325324
    326325/**
    327  * animate the scene
     326 * @brief animate the scene
    328327 */
    329328void SimpleGameMenu::animateScene(float dt)
     
    337336
    338337/**
    339  * event dispatcher funciton
     338 * @brief event dispatcher funciton
    340339 * @param event the incoming event
    341340 */
     
    515514 * @param root reference to the xml root element
    516515 */
    517 ErrorMessage SimpleGameMenuData::loadGUI(TiXmlElement* root)
     516ErrorMessage SimpleGameMenuData::loadGUI(const TiXmlElement* root)
    518517{
    519518  /* call underlying function */
     
    536535 * @param root reference to the xml root parameter
    537536 */
    538 ErrorMessage SimpleGameMenuData::loadWorldEntities(TiXmlElement* root)
    539 {
    540   TiXmlElement* element = root->FirstChildElement("WorldEntities");
     537ErrorMessage SimpleGameMenuData::loadWorldEntities(const TiXmlElement* root)
     538{
     539  GameWorldData::loadWorldEntities(root);
     540  /*
     541  const TiXmlElement* element = root->FirstChildElement("WorldEntities");
    541542
    542543  if( element != NULL)
     
    544545    element = element->FirstChildElement();
    545546    PRINTF(4)("Loading WorldEntities\n");
    546     while( element != NULL)
     547    while(element != NULL)
    547548    {
    548549      BaseObject* created = Factory::fabricate(element);
     
    550551        printf("Created a %s: %s\n", created->getClassName(), created->getName());
    551552
    552       if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox"))
     553      if( element->Value() == "SkyBox")
    553554        this->sky = dynamic_cast<WorldEntity*>(created);
    554       if( element->Value() != NULL && !strcmp( element->Value(), "Terrain"))
     555      if( element->Value() == "Terrain")
    555556        this->terrain = dynamic_cast<Terrain*>(created);
    556557      element = element->NextSiblingElement();
    557558    }
     559
    558560    PRINTF(4)("Done loading WorldEntities\n");
    559561  }
    560562
    561   /* init the pnode tree */
     563  // init the pnode tree
    562564  PNode::getNullParent()->init();
     565  */
    563566}
    564567
     
    578581 * @param root reference to the xml root element
    579582 */
    580 ErrorMessage SimpleGameMenuData::loadScene(TiXmlElement* root)
     583ErrorMessage SimpleGameMenuData::loadScene(const TiXmlElement* root)
    581584{
    582585  /* call underlying function */
Note: See TracChangeset for help on using the changeset viewer.