Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 2, 2006, 11:00:14 PM (20 years ago)
Author:
patrick
Message:

network: much more work on the StoryEntity functions and reimplementations of the DataTanks of each StoryEntity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/game_world.h

    r6386 r6387  
    2020class Shell;
    2121class OggPlayer;
     22class GameWorldData;
    2223
    2324//! The game world
     
    3839    virtual ErrorMessage init();
    3940    virtual ErrorMessage loadData();
    40     virtual ErrorMessage unloadData() {}
     41    virtual ErrorMessage unloadData();
    4142
    42     virtual ErrorMessage start();
    43     virtual ErrorMessage stop();
    44     virtual ErrorMessage pause();
    45     virtual ErrorMessage resume();
    46 
     43    virtual bool start();
     44    virtual bool stop();
     45    virtual bool pause();
     46    virtual bool resume();
     47    virtual void run();
    4748
    4849    /**  this returns the current game time @returns elapsed game time     */
     
    6162
    6263  protected:
    63     /* world loading functions */
    64     virtual ErrorMessage loadGUI(TiXmlElement* root) {}
    65     virtual ErrorMessage loadWorldEntities(TiXmlElement* root) {}
    66     virtual ErrorMessage loadScene(TiXmlElement* root) {}
    67 
    6864    /* world - running functions */
    69     virtual void mainLoop ();
    70 
    7165    virtual void synchronize();
    7266    virtual void handleInput();
     
    8579
    8680  protected:
    87     char* path;                         //!< The file from which this world is loaded
     81    GameWorldData*      gameWorldData;                //!< reference to the GameWorld Data Tank
     82    char*               path;                         //!< The file from which this world is loaded
    8883
    89     bool showPNodes;                    //!< if the PNodes should be visible.
    90     bool showBV;                        //!< if the Bounding Volumes should be visible.
    91 
    92     GLMenuImageScreen* glmis;           //!< The Level-Loader Display
     84    bool                showPNodes;                   //!< if the PNodes should be visible.
     85    bool                showBV;                       //!< if the Bounding Volumes should be visible.
    9386
    9487    /* world timing */
    95     Uint32 lastFrame;                   //!< last time of frame
    96     Uint32 cycle;                       //!< The cycle we are in (starts with 0 and rises with every frame)
    97     Uint32 dt;                          //!< time needed to calculate this frame (in milliSeconds)
    98     float dtS;                          //!< The time needed for caluculations in seconds
    99     float speed;                        //!< how fast the game flows
    100     double gameTime;                    //!< this is where the game time is saved
     88    Uint32              lastFrame;                   //!< last time of frame
     89    Uint32              cycle;                       //!< The cycle we are in (starts with 0 and rises with every frame)
     90    Uint32              dt;                          //!< time needed to calculate this frame (in milliSeconds)
     91    float               dtS;                         //!< The time needed for caluculations in seconds
     92    float               speed;                       //!< how fast the game flows
     93    double              gameTime;                    //!< this is where the game time is saved
    10194
    10295    /* external modules interfaces */
    103     ObjectManager objectManager;        //!< The ObjectManager of this GameWorld.
     96    ObjectManager objectManager;                     //!< The ObjectManager of this GameWorld.
    10497
    10598    /* external modules interfaces */
    106     Shell*     shell;
    107     OggPlayer* music;
     99    Shell*              shell;
     100    OggPlayer*          music;
    108101
    109102    /* important entities */
    110     Camera* localCamera;                //!< The current Camera
    111     Player* localPlayer;                //!< The Player, you fly through the level.
    112     WorldEntity* sky;                   //!< The Environmental Heaven of orxonox @todo insert this to environment insted
    113     Terrain* terrain;                   //!< The Terrain of the GameWorld.
     103};
     104
     105
     106class GameWorldData : public BaseObject
     107{
     108
     109  public:
     110    GameWorldData();
     111    ~GameWorldData();
     112    /* world loading functions */
     113    virtual ErrorMessage loadData(TiXmlElement* root);
     114
     115    virtual ErrorMessage loadGUI(TiXmlElement* root);
     116    virtual ErrorMessage loadWorldEntities(TiXmlElement* root);
     117    virtual ErrorMessage loadScene(TiXmlElement* root);
     118
     119  public:
     120    GLMenuImageScreen*  glmis;                        //!< The Level-Loader Display
     121
     122    Camera*             localCamera;                 //!< The current Camera
     123    Player*             localPlayer;                 //!< The Player, you fly through the level.
     124    WorldEntity*        sky;                         //!< The Environmental Heaven of orxonox @todo insert this to environment insted
     125    Terrain*            terrain;                     //!< The Terrain of the GameWorld.
    114126
    115127};
Note: See TracChangeset for help on using the changeset viewer.