Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world.h @ 3461

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

orxonox/trunk: cleaning up old stuff in world.cc and its relatives. second step…

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
12
13class TrackManager;
14class WorldEntity;
15class Camera;
16class PNode;
17class GLMenuImageScreen;
18class Skysphere;
19class Light;
20class FontSet;
21
22//! The game world
23/**
24   this class initializes everything that should be displayed inside of the current level.
25   it is the main driving factor during gameplay.
26*/
27class World : public StoryEntity {
28
29 public:
30  World (char* name);
31  World (int worldID);
32  virtual ~World ();
33
34
35  /* classes from story-entity */
36  virtual ErrorMessage load ();
37  virtual ErrorMessage init ();
38  virtual ErrorMessage start ();
39  virtual ErrorMessage stop ();
40  virtual ErrorMessage pause ();
41  virtual ErrorMessage resume ();
42  virtual ErrorMessage destroy ();
43
44  virtual void displayLoadScreen();
45  virtual void releaseLoadScreen();
46 
47  /* command node functions */
48  bool command (Command* cmd);
49
50  /* interface to world */
51  void spawn (WorldEntity* entity);
52  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
53
54
55
56 private:
57  TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
58  Camera* localCamera;         //!< The current Camera
59  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
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  GLuint objectList;            //!< temporary: \todo this will be ereased soon
72  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
73  Light* light;                 //!< The Lights of the Level
74
75  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
76 
77  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
78 
79  void mainLoop ();
80  void synchronize ();
81  void handleInput ();
82  void timeSlice ();
83  void collide ();
84  void draw ();
85  void display ();
86  void debug ();
87
88  void swap (unsigned char &a, unsigned char &b); /* \todo: this function doesn't belong here, this should be part of a image class*/
89};
90
91#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.