Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3556 was 3551, checked in by patrick, 20 years ago

orxonox/trunk: renamed all timing functions to tick() - cleanede up world

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  void init(char* name, int worldID);
60
61  Uint32 lastFrame;             //!< last time of frame
62  bool bQuitOrxonox;            //!< quit this application
63  bool bQuitCurrentGame;        //!< quit only the current game and return to menu
64  bool bPause;                  //!< pause mode
65
66  FontSet* testFont;            //!< A test Font. \todo fix this, so it is for real.
67  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
68
69  char* worldName;              //!< The name of this World
70  int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
71
72  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
73  TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
74  Camera* localCamera;         //!< The current Camera
75  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
76  Light* light;                 //!< The Lights of the Level
77
78  GLuint objectList;            //!< temporary: \todo this will be ereased soon
79  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
80  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
81 
82  /* function for main-loop */
83  void mainLoop ();
84  void synchronize ();
85  void handleInput ();
86  void tick ();
87  void update ();
88  void collide ();
89  void draw ();
90  void display ();
91  void debug ();
92
93};
94
95#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.