Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8717 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Jun 22, 2006, 2:04:28 PM (19 years ago)
Author:
bensch
Message:

merged the gui back

Location:
trunk/src/story_entities
Files:
9 edited
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/Makefile.am

    r6634 r8717  
    1313                story_entities/multi_player_world_data.cc \
    1414                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
    1619
    1720StoryEntities_HEADERS_ = \
     
    2730                story_entities/multi_player_world_data.h \
    2831                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  
    8282  this->bReturnToMenu = false;
    8383  this->run();
     84
     85  return true;
    8486}
    8587
     
    9092bool Campaign::pause()
    9193{
    92   this->bPaused = true;
     94  return (this->bPaused = true);
    9395}
    9496
     
    100102{
    101103  PRINTF(4)("Resuming the current Campaign\n");
    102   this->bPaused = false;
     104  return (this->bPaused = false);
    103105}
    104106
     
    118120    this->currentEntity->stop();
    119121  }
     122
     123  return true;
    120124}
    121125
     
    127131{
    128132  ErrorMessage       errorCode;
    129   int                storyID = WORLD_ID_0;
     133//  int                storyID = WORLD_ID_0;
    130134
    131135  for( this->currentEntity = this->campaignData->getFirstLevel(), this->bRunning = true;
  • trunk/src/story_entities/game_world.cc

    r8711 r8717  
    140140  State::setScriptManager(&this->scriptManager);
    141141
     142  return ErrorMessage();
    142143}
    143144
     
    153154
    154155  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();
    157158
    158159  if( getLoadFile().empty())
    159160  {
    160161    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()"));
    162163  }
    163164
     
    168169    PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc->ErrorDesc(), this->getLoadFile().c_str(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
    169170    delete XMLDoc;
    170     return (ErrorMessage){213,"XML File parsing error","GameWorld::load()"};
     171    return ErrorMessage(213,"XML File parsing error","GameWorld::load()");
    171172  }
    172173  // check basic validity
     
    178179    PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n");
    179180    delete XMLDoc;
    180     return (ErrorMessage){213,"Path not a WorldDataFile","GameWorld::load()"};
     181    return ErrorMessage(213,"Path not a WorldDataFile","GameWorld::load()");
    181182  }
    182183  /* the whole loading process for the GameWorld */
     
    191192  //Account *b = new Account(30);
    192193  //b->setName("b");
     194
    193195 
    194196  LoadParamXML(root, "ScriptManager", &this->scriptManager, ScriptManager, loadParams);
     
    196198  delete XMLDoc;
    197199  this->releaseLoadScreen();
     200
     201  return ErrorMessage();
    198202}
    199203
     
    220224  if (this->dataXML)
    221225    delete this->dataXML;
     226
     227  return ErrorMessage();
    222228}
    223229
     
    232238  State::setScriptManager(&this->scriptManager); //make sure we have the right script manager
    233239  this->run();
     240
     241  return true;
    234242}
    235243
     
    242250  PRINTF(3)("GameWorld::stop() - got stop signal\n");
    243251  State::setScriptManager(NULL);
    244   this->bRunning = false;
     252  return (this->bRunning = false);
    245253}
    246254
     
    251259bool GameWorld::pause()
    252260{
    253   this->bPaused = true;
     261  return (this->bPaused = true);
    254262}
    255263
     
    260268bool GameWorld::resume()
    261269{
    262   this->bPaused = false;
     270  return(this->bPaused = false);
    263271}
    264272
     
    410418    if( likely(this->dataTank->gameRule != NULL))
    411419      this->dataTank->gameRule->tick(this->dtS);
    412      
     420
    413421  }
    414422}
  • trunk/src/story_entities/game_world_data.cc

    r8490 r8717  
    108108
    109109  GraphicsEngine::getInstance()->displayFPS(true);
     110
     111  return ErrorMessage();
    110112}
    111113
     
    131133  this->loadWorldEntities(root);
    132134  this->loadScene(root);
     135
     136  return ErrorMessage();
    133137}
    134138
     
    142146  this->unloadWorldEntities();
    143147  this->unloadScene();
     148
     149  return ErrorMessage();
    144150}
    145151
     
    166172  }
    167173  this->glmis->draw();
     174
     175  return ErrorMessage();
    168176}
    169177
     
    175183{
    176184  delete this->glmis;
     185
     186  return ErrorMessage();
    177187}
    178188
     
    250260  /* init the pnode tree */
    251261  PNode::getNullParent()->init();
     262
     263  return ErrorMessage();
    252264}
    253265
     
    312324
    313325  this->glmis = NULL;
     326
     327  return ErrorMessage();
    314328}
    315329
     
    337351    this->localCamera->addChild(this->sky);
    338352  OrxSound::SoundEngine::getInstance()->setListener(this->localCamera);
     353
     354  return ErrorMessage();
    339355}
    340356
     
    357373
    358374  State::setGameRules(NULL);
     375
     376  return ErrorMessage();
    359377}
    360378
  • trunk/src/story_entities/menu/game_menu.cc

    r8713 r8717  
    178178      image->setWidgetSize( 250, 200);
    179179      image->setAbsCoor2D(400, 150);
     180      image->setForegroundColor(Color(1,1,1,.6));
    180181
    181182      const std::list<BaseObject*>* storyEntities = ClassList::getList(CL_STORY_ENTITY);
  • trunk/src/story_entities/multi_player_world.cc

    r8228 r8717  
    123123/**
    124124 * cleanup
    125  * @return 
     125 * @return
    126126 */
    127127ErrorMessage MultiPlayerWorld::unloadData( )
    128128{
    129    
     129
    130130  GameWorld::unloadData();
    131  
     131
    132132  delete NetworkManager::getInstance();
    133133  delete NetworkGameManager::getInstance();
    134134
     135  return ErrorMessage();
    135136}
  • trunk/src/story_entities/multi_player_world_data.cc

    r8490 r8717  
    7878{
    7979  /* call underlying function */
    80   GameWorldData::init();
     80  return GameWorldData::init();
    8181}
    8282
     
    8989{
    9090  /* call underlying function */
    91   GameWorldData::loadGUI(root);
     91  return GameWorldData::loadGUI(root);
    9292}
    9393
     
    9999{
    100100  /* call underlying function */
    101   GameWorldData::unloadGUI();
     101  return GameWorldData::unloadGUI();
    102102}
    103103
     
    245245  this->drawLists.push_back(OM_GROUP_01);
    246246  this->drawLists.push_back(OM_GROUP_01_PROJ);
    247  
     247
    248248  State::setPlayer(this->localPlayer);
    249  
     249
     250  return ErrorMessage();
    250251}
    251252
     
    257258{
    258259  /* call underlying function */
    259   GameWorldData::unloadWorldEntities();
     260  return GameWorldData::unloadWorldEntities();
    260261}
    261262
     
    269270  /* call underlying function */
    270271  GameWorldData::loadScene(root);
    271  
     272
    272273  // create server playable
    273274  if ( NetworkManager::getInstance()->isGameServer() )
     
    276277    State::getPlayer()->setPlayable( PlayerStats::getStats( 0 )->getPlayable() );
    277278  }
     279
     280  return ErrorMessage();
    278281}
    279282
     
    285288{
    286289  /* call underlying function */
    287   GameWorldData::unloadScene();
     290  return GameWorldData::unloadScene();
    288291}
    289292
  • trunk/src/story_entities/simple_game_menu.cc

    r8619 r8717  
    131131    headers.push_back("3");
    132132    table->setHeader(headers);
     133    table->setEntry(1, 2, "Test");
     134    table->setEntry(2, 1, "MultiLine SuperTest to see how it works");
    133135
    134136
  • trunk/src/story_entities/single_player_world_data.cc

    r7370 r8717  
    4545{
    4646  /* call underlying function */
    47   GameWorldData::init();
     47  return GameWorldData::init();
    4848}
    4949
     
    5656{
    5757  /* call underlying function */
    58   GameWorldData::loadGUI(root);
     58  return GameWorldData::loadGUI(root);
    5959}
    6060
     
    6666{
    6767  /* call underlying function */
    68   GameWorldData::unloadGUI();
     68  return GameWorldData::unloadGUI();
    6969}
    7070
     
    7777{
    7878  /* call underlying function */
    79   GameWorldData::loadWorldEntities(root);
     79  return GameWorldData::loadWorldEntities(root);
    8080}
    8181
     
    8787{
    8888  /* call underlying function */
    89   GameWorldData::unloadWorldEntities();
     89  return GameWorldData::unloadWorldEntities();
    9090}
    9191
     
    9898{
    9999  /* call underlying function */
    100   GameWorldData::loadScene(root);
     100  return GameWorldData::loadScene(root);
    101101}
    102102
     
    108108{
    109109  /* call underlying function */
    110   GameWorldData::unloadScene();
     110  return GameWorldData::unloadScene();
    111111}
    112112
  • trunk/src/story_entities/story_entity.h

    r7283 r8717  
    3535  /* initialisation and loading */
    3636  /** initializes a Story Entity to the needed values */
    37   virtual ErrorMessage init() {};
     37  virtual ErrorMessage init() { return ErrorMessage(); };
    3838  /** called to load the data into the StoryEntity*/
    39   virtual ErrorMessage loadData() {};
     39  virtual ErrorMessage loadData() { return ErrorMessage(); };
    4040  /** function that unloads the data from the StoryEntity */
    41   virtual ErrorMessage unloadData() {};
     41  virtual ErrorMessage unloadData() { return ErrorMessage(); };
    4242
    4343  /* running, stopping and pausing */
Note: See TracChangeset for help on using the changeset viewer.