Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6352 in orxonox.OLD for branches/network/src


Ignore:
Timestamp:
Dec 30, 2005, 7:12:10 PM (19 years ago)
Author:
patrick
Message:

network: from now on this branche won't compile anymore, since I'm working on some very serious changes in the world/storyentity framework

Location:
branches/network/src/story_entities
Files:
2 added
1 edited

Legend:

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

    r6152 r6352  
    11/*!
    22 * @file world.h
    3   *  Holds and manages all game data
    4 */
     3 *  Holds and manages all game data
     4 */
    55
    66#ifndef _WORLD_H
    77#define _WORLD_H
    88
    9 #include "sdlincl.h"
    10 #include "story_entity.h"
    11 #include "object_manager.h"
     9#include "game_world.h"
    1210
    1311class WorldEntity;
     
    2321//! The game world
    2422/**
    25    this class initializes everything that should be displayed inside of the current level.
    26    it is the main driving factor during gameplay.
    27 */
    28 class World : public StoryEntity {
     23 *  this class initializes everything that should be displayed inside of the current level.
     24 *  it is the main driving factor during gameplay.
     25 */
     26class Planet : public GameWorld
     27{
    2928
    30  public:
    31   World (const TiXmlElement* root = NULL);
    32   virtual ~World ();
     29  public:
     30    Planet (const TiXmlElement* root = NULL);
     31    virtual ~Planet ();
    3332
    34   void loadParams(const TiXmlElement* root);
     33    void loadParams(const TiXmlElement* root);
    3534
    36   double getGameTime();
    3735
    38   /* classes from story-entity */
    39   virtual ErrorMessage preLoad();
    40   virtual ErrorMessage load ();
    41   virtual ErrorMessage postLoad();
     36    /* classes from story-entity */
     37    virtual ErrorMessage preLoad();
     38    virtual ErrorMessage load ();
     39    virtual ErrorMessage postLoad();
    4240
    43   virtual ErrorMessage preStart();
    44   virtual ErrorMessage start ();
    45   virtual ErrorMessage stop ();
    46   virtual ErrorMessage pause ();
    47   virtual ErrorMessage resume ();
    48   virtual ErrorMessage destroy ();
     41    virtual ErrorMessage preStart();
     42    virtual ErrorMessage start ();
     43    virtual ErrorMessage stop ();
     44    virtual ErrorMessage pause ();
     45    virtual ErrorMessage resume ();
     46    virtual ErrorMessage destroy ();
    4947
    50   void displayLoadScreen();
    51   void releaseLoadScreen();
     48    virtual void displayLoadScreen();
     49    virtual void releaseLoadScreen();
    5250
    53   /* interface to world */
    54   void spawn (WorldEntity* entity);
     51    /* interface to world */
     52    virtual void spawn (WorldEntity* entity);
    5553
    56   /** @param speed sets the speed of the Game */
    57   inline void setSpeed(float speed) { this->speed = speed; };
    58   const char* getPath();
    59   void setPath( const char* name);
    6054
    61   void togglePNodeVisibility() { this->showPNodes = !this->showPNodes; };
    62   void toggleBVVisibility() { this->showBV = !this->showBV; };
     55  protected:
     56    virtual void constuctorInit(const char* name, int worldID);
    6357
    64  private:
    65   void constuctorInit(const char* name, int worldID);
    66   /* function for main-loop */
    67   void synchronize ();
    68   void handleInput ();
    69   void tick (std::list<WorldEntity*> worldEntity, float dt);
    70   void tick ();
    71   void update ();
    72   void collide ();
    73   void draw ();
    74   void mainLoop ();
     58    /* world - running functions */
     59    virtual void mainLoop ();
    7560
    76   void display ();
    77   void debug ();
     61    virtual void synchronize ();
     62    virtual void handleInput ();
     63    virtual void tick (std::list<WorldEntity*> worldEntity, float dt);
     64    virtual void tick ();
     65    virtual void update ();
     66    virtual void collide ();
     67    virtual void draw ();
     68    virtual void display ();
     69
     70    virtual void debug ();
     71
    7872
    7973  private:
    80     char* path;                         //!< The file from which this world is loaded
    81 
    82     // FLAGS //
    83     bool bQuitWorld;                    //!< quit only the current game and return to menu
    84     bool bPause;                        //!< pause mode
    85 
    86     bool showPNodes;                    //!< if the PNodes should be visible.
    87     bool showBV;                        //!< if the Bounding Volumes should be visible.
    88 
    89     // TIMING //
    90     Uint32 lastFrame;                   //!< last time of frame
    91     Uint32 cycle;                       //!< The cycle we are in (starts with 0 and rises with every frame)
    92     Uint32 dt;                          //!< time needed to calculate this frame (in milliSeconds)
    93     float dtS;                          //!< The time needed for caluculations in seconds
    94     float speed;                        //!< how fast the game flows
    95     double gameTime;                    //!< this is where the game time is saved
    96 
    97     // INTERNAL ENGINES
    98     ObjectManager objectManager;        //!< The ObjectManager of this World.
     74    /* external modules interfaces */
    9975    Shell*     shell;
    10076    OggPlayer* music;
     
    10278    GLMenuImageScreen* glmis;           //!< The Level-Loader Display
    10379
    104 
    105     // IMPORTANT ENTITIES
    106     Camera* localCamera;                //!< The current Camera
    107     Player* localPlayer;                //!< The Player, you fly through the level.
    108 
    109     WorldEntity* sky;                   //!< The Environmental Heaven of orxonox @todo insert this to environment insted
    110     Terrain* terrain;                   //!< The Terrain of the World.
    11180};
    11281
Note: See TracChangeset for help on using the changeset viewer.