Changeset 8717 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Jun 22, 2006, 2:04:28 PM (19 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 9 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/Makefile.am
r6634 r8717 13 13 story_entities/multi_player_world_data.cc \ 14 14 story_entities/movie_loader.cc \ 15 story_entities/simple_game_menu.cc 15 story_entities/simple_game_menu.cc \ 16 \ 17 story_entities/menu/game_menu.cc \ 18 story_entities/menu/glgui_imagebutton.cc 16 19 17 20 StoryEntities_HEADERS_ = \ … … 27 30 story_entities/multi_player_world_data.h \ 28 31 story_entities/movie_loader.h \ 29 story_entities/simple_game_menu.h 32 story_entities/simple_game_menu.h \ 33 \ 34 story_entities/menu/game_menu.h \ 35 story_entities/menu/glgui_imagebutton.h 36 -
trunk/src/story_entities/campaign.cc
r7283 r8717 82 82 this->bReturnToMenu = false; 83 83 this->run(); 84 85 return true; 84 86 } 85 87 … … 90 92 bool Campaign::pause() 91 93 { 92 this->bPaused = true;94 return (this->bPaused = true); 93 95 } 94 96 … … 100 102 { 101 103 PRINTF(4)("Resuming the current Campaign\n"); 102 this->bPaused = false;104 return (this->bPaused = false); 103 105 } 104 106 … … 118 120 this->currentEntity->stop(); 119 121 } 122 123 return true; 120 124 } 121 125 … … 127 131 { 128 132 ErrorMessage errorCode; 129 int storyID = WORLD_ID_0;133 // int storyID = WORLD_ID_0; 130 134 131 135 for( this->currentEntity = this->campaignData->getFirstLevel(), this->bRunning = true; -
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 } -
trunk/src/story_entities/game_world_data.cc
r8490 r8717 108 108 109 109 GraphicsEngine::getInstance()->displayFPS(true); 110 111 return ErrorMessage(); 110 112 } 111 113 … … 131 133 this->loadWorldEntities(root); 132 134 this->loadScene(root); 135 136 return ErrorMessage(); 133 137 } 134 138 … … 142 146 this->unloadWorldEntities(); 143 147 this->unloadScene(); 148 149 return ErrorMessage(); 144 150 } 145 151 … … 166 172 } 167 173 this->glmis->draw(); 174 175 return ErrorMessage(); 168 176 } 169 177 … … 175 183 { 176 184 delete this->glmis; 185 186 return ErrorMessage(); 177 187 } 178 188 … … 250 260 /* init the pnode tree */ 251 261 PNode::getNullParent()->init(); 262 263 return ErrorMessage(); 252 264 } 253 265 … … 312 324 313 325 this->glmis = NULL; 326 327 return ErrorMessage(); 314 328 } 315 329 … … 337 351 this->localCamera->addChild(this->sky); 338 352 OrxSound::SoundEngine::getInstance()->setListener(this->localCamera); 353 354 return ErrorMessage(); 339 355 } 340 356 … … 357 373 358 374 State::setGameRules(NULL); 375 376 return ErrorMessage(); 359 377 } 360 378 -
trunk/src/story_entities/menu/game_menu.cc
r8713 r8717 178 178 image->setWidgetSize( 250, 200); 179 179 image->setAbsCoor2D(400, 150); 180 image->setForegroundColor(Color(1,1,1,.6)); 180 181 181 182 const std::list<BaseObject*>* storyEntities = ClassList::getList(CL_STORY_ENTITY); -
trunk/src/story_entities/multi_player_world.cc
r8228 r8717 123 123 /** 124 124 * cleanup 125 * @return 125 * @return 126 126 */ 127 127 ErrorMessage MultiPlayerWorld::unloadData( ) 128 128 { 129 129 130 130 GameWorld::unloadData(); 131 131 132 132 delete NetworkManager::getInstance(); 133 133 delete NetworkGameManager::getInstance(); 134 134 135 return ErrorMessage(); 135 136 } -
trunk/src/story_entities/multi_player_world_data.cc
r8490 r8717 78 78 { 79 79 /* call underlying function */ 80 GameWorldData::init();80 return GameWorldData::init(); 81 81 } 82 82 … … 89 89 { 90 90 /* call underlying function */ 91 GameWorldData::loadGUI(root);91 return GameWorldData::loadGUI(root); 92 92 } 93 93 … … 99 99 { 100 100 /* call underlying function */ 101 GameWorldData::unloadGUI();101 return GameWorldData::unloadGUI(); 102 102 } 103 103 … … 245 245 this->drawLists.push_back(OM_GROUP_01); 246 246 this->drawLists.push_back(OM_GROUP_01_PROJ); 247 247 248 248 State::setPlayer(this->localPlayer); 249 249 250 return ErrorMessage(); 250 251 } 251 252 … … 257 258 { 258 259 /* call underlying function */ 259 GameWorldData::unloadWorldEntities();260 return GameWorldData::unloadWorldEntities(); 260 261 } 261 262 … … 269 270 /* call underlying function */ 270 271 GameWorldData::loadScene(root); 271 272 272 273 // create server playable 273 274 if ( NetworkManager::getInstance()->isGameServer() ) … … 276 277 State::getPlayer()->setPlayable( PlayerStats::getStats( 0 )->getPlayable() ); 277 278 } 279 280 return ErrorMessage(); 278 281 } 279 282 … … 285 288 { 286 289 /* call underlying function */ 287 GameWorldData::unloadScene();290 return GameWorldData::unloadScene(); 288 291 } 289 292 -
trunk/src/story_entities/simple_game_menu.cc
r8619 r8717 131 131 headers.push_back("3"); 132 132 table->setHeader(headers); 133 table->setEntry(1, 2, "Test"); 134 table->setEntry(2, 1, "MultiLine SuperTest to see how it works"); 133 135 134 136 -
trunk/src/story_entities/single_player_world_data.cc
r7370 r8717 45 45 { 46 46 /* call underlying function */ 47 GameWorldData::init();47 return GameWorldData::init(); 48 48 } 49 49 … … 56 56 { 57 57 /* call underlying function */ 58 GameWorldData::loadGUI(root);58 return GameWorldData::loadGUI(root); 59 59 } 60 60 … … 66 66 { 67 67 /* call underlying function */ 68 GameWorldData::unloadGUI();68 return GameWorldData::unloadGUI(); 69 69 } 70 70 … … 77 77 { 78 78 /* call underlying function */ 79 GameWorldData::loadWorldEntities(root);79 return GameWorldData::loadWorldEntities(root); 80 80 } 81 81 … … 87 87 { 88 88 /* call underlying function */ 89 GameWorldData::unloadWorldEntities();89 return GameWorldData::unloadWorldEntities(); 90 90 } 91 91 … … 98 98 { 99 99 /* call underlying function */ 100 GameWorldData::loadScene(root);100 return GameWorldData::loadScene(root); 101 101 } 102 102 … … 108 108 { 109 109 /* call underlying function */ 110 GameWorldData::unloadScene();110 return GameWorldData::unloadScene(); 111 111 } 112 112 -
trunk/src/story_entities/story_entity.h
r7283 r8717 35 35 /* initialisation and loading */ 36 36 /** initializes a Story Entity to the needed values */ 37 virtual ErrorMessage init() { };37 virtual ErrorMessage init() { return ErrorMessage(); }; 38 38 /** called to load the data into the StoryEntity*/ 39 virtual ErrorMessage loadData() { };39 virtual ErrorMessage loadData() { return ErrorMessage(); }; 40 40 /** function that unloads the data from the StoryEntity */ 41 virtual ErrorMessage unloadData() { };41 virtual ErrorMessage unloadData() { return ErrorMessage(); }; 42 42 43 43 /* running, stopping and pausing */
Note: See TracChangeset
for help on using the changeset viewer.