Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3451 was 3449, checked in by bensch, 20 years ago

orxonox/trunk: documented orxonox.cc/h world.cc/h vector.cc/h

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