Changeset 8717 in orxonox.OLD for trunk/src/story_entities/game_world.cc
- Timestamp:
- Jun 22, 2006, 2:04:28 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.cc
r8711 r8717 140 140 State::setScriptManager(&this->scriptManager); 141 141 142 return ErrorMessage(); 142 143 } 143 144 … … 153 154 154 155 PRINTF(3)("> Loading world: '%s'\n", getLoadFile().c_str()); 155 TiXmlElement* element;156 GameLoader* loader = GameLoader::getInstance();156 // TiXmlElement* element; 157 // GameLoader* loader = GameLoader::getInstance(); 157 158 158 159 if( getLoadFile().empty()) 159 160 { 160 161 PRINTF(1)("GameWorld has no path specified for loading\n"); 161 return (ErrorMessage ){213,"Path not specified","GameWorld::load()"};162 return (ErrorMessage(213,"Path not specified","GameWorld::load()")); 162 163 } 163 164 … … 168 169 PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc->ErrorDesc(), this->getLoadFile().c_str(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 169 170 delete XMLDoc; 170 return (ErrorMessage){213,"XML File parsing error","GameWorld::load()"};171 return ErrorMessage(213,"XML File parsing error","GameWorld::load()"); 171 172 } 172 173 // check basic validity … … 178 179 PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n"); 179 180 delete XMLDoc; 180 return (ErrorMessage){213,"Path not a WorldDataFile","GameWorld::load()"};181 return ErrorMessage(213,"Path not a WorldDataFile","GameWorld::load()"); 181 182 } 182 183 /* the whole loading process for the GameWorld */ … … 191 192 //Account *b = new Account(30); 192 193 //b->setName("b"); 194 193 195 194 196 LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams); … … 196 198 delete XMLDoc; 197 199 this->releaseLoadScreen(); 200 201 return ErrorMessage(); 198 202 } 199 203 … … 220 224 if (this->dataXML) 221 225 delete this->dataXML; 226 227 return ErrorMessage(); 222 228 } 223 229 … … 232 238 State::setScriptManager(&this->scriptManager); //make sure we have the right script manager 233 239 this->run(); 240 241 return true; 234 242 } 235 243 … … 242 250 PRINTF(3)("GameWorld::stop() - got stop signal\n"); 243 251 State::setScriptManager(NULL); 244 this->bRunning = false;252 return (this->bRunning = false); 245 253 } 246 254 … … 251 259 bool GameWorld::pause() 252 260 { 253 this->bPaused = true;261 return (this->bPaused = true); 254 262 } 255 263 … … 260 268 bool GameWorld::resume() 261 269 { 262 this->bPaused = false;270 return(this->bPaused = false); 263 271 } 264 272 … … 410 418 if( likely(this->dataTank->gameRule != NULL)) 411 419 this->dataTank->gameRule->tick(this->dtS); 412 420 413 421 } 414 422 }
Note: See TracChangeset
for help on using the changeset viewer.