Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

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

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