Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3522 was 3521, checked in by patrick, 20 years ago

orxonox/trunk: parenting revisited. fixed some bugs some missunderstandings. made it a little more secure to use. still dev

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