Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: FontSet addapted the fontset some more
doxygen-tags
name

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