Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6372 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Dec 31, 2005, 2:41:02 PM (19 years ago)
Author:
patrick
Message:

network: more cleanup in the StoryEntity, thightening the interface and function renames

Location:
branches/network/src/story_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/campaign.cc

    r6371 r6372  
    126126
    127127      //se->preLoad();
    128       se->load();
     128      se->loadData();
    129129      //se->postLoad();
    130130
  • branches/network/src/story_entities/campaign.h

    r6371 r6372  
    1010class TiXmlElement;
    1111
    12 class Campaign : public StoryEntity {
     12class Campaign : public StoryEntity
     13{
    1314
    14  public:
    15   Campaign ();
    16   Campaign ( TiXmlElement* root);
    17   virtual ~Campaign ();
     15  public:
     16    Campaign ();
     17    Campaign ( TiXmlElement* root);
     18    virtual ~Campaign ();
    1819
    19   void loadParams(const TiXmlElement* root);
    20   void loadWorldListParams(const TiXmlElement* root);
     20    void loadParams(const TiXmlElement* root);
     21    void loadWorldListParams(const TiXmlElement* root);
    2122
    22   StoryEntity* currentEntity;
     23    virtual ErrorMessage init();
     24    virtual ErrorMessage start();
     25    virtual ErrorMessage start(int storyID);
     26    virtual ErrorMessage pause();
     27    virtual ErrorMessage resume();
     28    virtual ErrorMessage stop();
    2329
    24   virtual ErrorMessage init();
    25   virtual ErrorMessage start();
    26   virtual ErrorMessage start(int storyID);
    27   virtual ErrorMessage pause();
    28   virtual ErrorMessage resume();
    29   virtual ErrorMessage stop();
     30    void addEntity(StoryEntity* se, int storyID);
     31    void addEntity(StoryEntity* se);
     32    void removeEntity(int storyID);
     33    void removeEntity(StoryEntity* se);
    3034
    31   void addEntity(StoryEntity* se, int storyID);
    32   void addEntity(StoryEntity* se);
    33   void removeEntity(int storyID);
    34   void removeEntity(StoryEntity* se);
     35    void nextLevel();
     36    void previousLevel();
    3537
    36   void nextLevel();
    37   void previousLevel();
    3838
    39  private:
    40   //ListTemplate<StoryEntity>* entities;
    41    std::list<StoryEntity*> entities;
    42    bool running;
     39  private:
     40    StoryEntity* getStoryEntity(int storyID);
    4341
    44    StoryEntity* getStoryEntity(int storyID);
     42
     43  private:
     44    StoryEntity* currentEntity;
     45    std::list<StoryEntity*> entities;
     46    bool running;
     47
    4548};
    4649
  • branches/network/src/story_entities/game_world.cc

    r6371 r6372  
    196196 *  loads the GameWorld by initializing all resources, and set their default values.
    197197 */
    198 ErrorMessage GameWorld::load()
     198ErrorMessage GameWorld::loadData()
    199199{
    200200  this->displayLoadScreen();
  • branches/network/src/story_entities/game_world.h

    r6371 r6372  
    3737    /* functions from story-entity */
    3838    virtual ErrorMessage init();
    39     virtual ErrorMessage load();
     39    virtual ErrorMessage loadData();
    4040
    4141    virtual ErrorMessage preStart();
  • branches/network/src/story_entities/story_entity.h

    r6371 r6372  
    1919  virtual ~StoryEntity ();
    2020
    21   // INIT AND LOAD //
    22   /** initializes a Story Entity to default Values */
     21  /* initialisation and loading */
     22  /** initializes a Story Entity to the needed values */
    2323  virtual ErrorMessage init() {};
    24   /** called before loading */
    25   virtual ErrorMessage preLoad() {};
    26   /** called to load. */
    27   virtual ErrorMessage load() {};
    28   /** called right after loading */
    29   virtual ErrorMessage postLoad() {};
    30   /** called after postload to check for integrity. (optional) */
    31   virtual ErrorMessage check() {};
     24  /** called to load the data into the story entity */
     25  virtual ErrorMessage loadData() {};
    3226
    33   // RUNNING //
     27  /* running, stopping and pausing */
    3428  /** called shortly before starting the Entity */
    3529  virtual ErrorMessage preStart() {};
Note: See TracChangeset for help on using the changeset viewer.