Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3579 was 3565, checked in by bensch, 20 years ago

orxonox/trunk: patched the pNode, now there exists the ability for advanced linkage-modes

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