Changeset 8677 in orxonox.OLD for branches/gui/src/story_entities/game_world.cc
- Timestamp:
- Jun 21, 2006, 4:49:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/story_entities/game_world.cc
r8490 r8677 140 140 State::setScriptManager(&this->scriptManager); 141 141 142 return ErrorMessage(); 142 143 } 143 144 … … 155 156 156 157 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(); 159 160 160 161 if( getLoadFile().empty()) 161 162 { 162 163 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()")); 164 165 } 165 166 … … 170 171 PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc->ErrorDesc(), this->getLoadFile().c_str(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 171 172 delete XMLDoc; 172 return (ErrorMessage){213,"XML File parsing error","GameWorld::load()"};173 return ErrorMessage(213,"XML File parsing error","GameWorld::load()"); 173 174 } 174 175 // check basic validity … … 180 181 PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n"); 181 182 delete XMLDoc; 182 return (ErrorMessage){213,"Path not a WorldDataFile","GameWorld::load()"};183 return ErrorMessage(213,"Path not a WorldDataFile","GameWorld::load()"); 183 184 } 184 185 /* the whole loading process for the GameWorld */ … … 193 194 Account *b = new Account(30); 194 195 b->setName("b"); 195 196 196 197 197 198 LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams); 198 199 199 200 delete XMLDoc; 200 201 this->releaseLoadScreen(); 202 203 return ErrorMessage(); 201 204 } 202 205 … … 223 226 if (this->dataXML) 224 227 delete this->dataXML; 228 229 return ErrorMessage(); 225 230 } 226 231 … … 235 240 State::setScriptManager(&this->scriptManager); //make sure we have the right script manager 236 241 this->run(); 242 243 return true; 237 244 } 238 245 … … 245 252 PRINTF(3)("GameWorld::stop() - got stop signal\n"); 246 253 State::setScriptManager(NULL); 247 this->bRunning = false;254 return (this->bRunning = false); 248 255 } 249 256 … … 254 261 bool GameWorld::pause() 255 262 { 256 this->bPaused = true;263 return (this->bPaused = true); 257 264 } 258 265 … … 263 270 bool GameWorld::resume() 264 271 { 265 this->bPaused = false;272 return(this->bPaused = false); 266 273 } 267 274 … … 413 420 if( likely(this->dataTank->gameRule != NULL)) 414 421 this->dataTank->gameRule->tick(this->dtS); 415 422 416 423 } 417 424 }
Note: See TracChangeset
for help on using the changeset viewer.