Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 21, 2006, 4:49:06 PM (19 years ago)
Author:
bensch
Message:

new gui implementing work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/story_entities/game_world.cc

    r8490 r8677  
    140140  State::setScriptManager(&this->scriptManager);
    141141
     142  return ErrorMessage();
    142143}
    143144
     
    155156
    156157  PRINTF(3)("> Loading world: '%s'\n", getLoadFile().c_str());
    157   TiXmlElement* element;
    158   GameLoader* loader = GameLoader::getInstance();
     158//  TiXmlElement* element;
     159//  GameLoader* loader = GameLoader::getInstance();
    159160
    160161  if( getLoadFile().empty())
    161162  {
    162163    PRINTF(1)("GameWorld has no path specified for loading\n");
    163     return (ErrorMessage){213,"Path not specified","GameWorld::load()"};
     164    return (ErrorMessage(213,"Path not specified","GameWorld::load()"));
    164165  }
    165166
     
    170171    PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc->ErrorDesc(), this->getLoadFile().c_str(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
    171172    delete XMLDoc;
    172     return (ErrorMessage){213,"XML File parsing error","GameWorld::load()"};
     173    return ErrorMessage(213,"XML File parsing error","GameWorld::load()");
    173174  }
    174175  // check basic validity
     
    180181    PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n");
    181182    delete XMLDoc;
    182     return (ErrorMessage){213,"Path not a WorldDataFile","GameWorld::load()"};
     183    return ErrorMessage(213,"Path not a WorldDataFile","GameWorld::load()");
    183184  }
    184185  /* the whole loading process for the GameWorld */
     
    193194  Account *b = new Account(30);
    194195  b->setName("b");
    195  
    196  
     196
     197
    197198  LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams);
    198199
    199200  delete XMLDoc;
    200201  this->releaseLoadScreen();
     202
     203  return ErrorMessage();
    201204}
    202205
     
    223226  if (this->dataXML)
    224227    delete this->dataXML;
     228
     229  return ErrorMessage();
    225230}
    226231
     
    235240  State::setScriptManager(&this->scriptManager); //make sure we have the right script manager
    236241  this->run();
     242
     243  return true;
    237244}
    238245
     
    245252  PRINTF(3)("GameWorld::stop() - got stop signal\n");
    246253  State::setScriptManager(NULL);
    247   this->bRunning = false;
     254  return (this->bRunning = false);
    248255}
    249256
     
    254261bool GameWorld::pause()
    255262{
    256   this->bPaused = true;
     263  return (this->bPaused = true);
    257264}
    258265
     
    263270bool GameWorld::resume()
    264271{
    265   this->bPaused = false;
     272  return(this->bPaused = false);
    266273}
    267274
     
    413420    if( likely(this->dataTank->gameRule != NULL))
    414421      this->dataTank->gameRule->tick(this->dtS);
    415      
     422
    416423  }
    417424}
Note: See TracChangeset for help on using the changeset viewer.