Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/story_entities/world.h @ 3618

Last change on this file since 3618 was 3608, checked in by patrick, 19 years ago

orxonox/trunk: now there is a real speedup in compiling time when dependencies are modified: just realy only includes, what is needed. Byside the speedup, there is more overview! never add an orxonox class to stdincl.h if it doesn't have to be

File size: 2.8 KB
Line 
1/*!
2    \file world.h
3    \brief Holds and manages all game data
4*/ 
5
6#ifndef _WORLD_H
7#define _WORLD_H
8
9#include "stdincl.h"
10#include "comincl.h"
11#include "story_entity.h"
12#include "p_node.h"
13
14class TrackManager;
15class WorldEntity;
16class Camera;
17class PNode;
18class GLMenuImageScreen;
19class Skysphere;
20class LightManager;
21class FontSet;
22class Terrain;
23
24
25//! The game world
26/**
27   this class initializes everything that should be displayed inside of the current level.
28   it is the main driving factor during gameplay.
29*/
30class World : public StoryEntity {
31
32 public:
33  World (char* name);
34  World (int worldID);
35  virtual ~World ();
36
37
38  /* classes from story-entity */
39  virtual ErrorMessage load ();
40  virtual ErrorMessage init ();
41  virtual ErrorMessage start ();
42  virtual ErrorMessage stop ();
43  virtual ErrorMessage pause ();
44  virtual ErrorMessage resume ();
45  virtual ErrorMessage destroy ();
46
47  virtual void displayLoadScreen();
48  virtual void releaseLoadScreen();
49 
50  /* command node functions */
51  bool command (Command* cmd);
52
53  /* interface to world */
54  void spawn (WorldEntity* entity);
55  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
56  void spawn(WorldEntity* entity, PNode* parentNode, Vector* relCoor, Quaternion* relDir, 
57             int parentingMode);
58
59
60 private:
61  void init(char* name, int worldID);
62
63  Uint32 lastFrame;             //!< last time of frame
64  bool bQuitOrxonox;            //!< quit this application
65  bool bQuitCurrentGame;        //!< quit only the current game and return to menu
66  bool bPause;                  //!< pause mode
67
68  FontSet* testFont;            //!< A test Font. \todo fix this, so it is for real.
69  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
70
71  char* worldName;              //!< The name of this World
72  int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
73
74  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
75  TrackManager* trackManager;   //!< The reference of the TrackManager that handles the course through the Level.
76  Camera* localCamera;          //!< The current Camera
77  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
78  LightManager* lightMan;       //!< The Lights of the Level
79  Terrain* terrain;             //!< The Terrain of the World.
80
81  GLuint objectList;            //!< temporary: \todo this will be ereased soon
82  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
83  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
84 
85  /* function for main-loop */
86  void mainLoop ();
87  void synchronize ();
88  void handleInput ();
89  void tick ();
90  void update ();
91  void collide ();
92  void draw ();
93  void display ();
94  void debug ();
95
96};
97
98#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.