Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/levelloader/src/story_entities/world.h @ 3525

Last change on this file since 3525 was 3525, checked in by chris, 19 years ago

orxonox/branches/levelloader: removed excess class usage adn messed with makefile definitions

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 (TiXmlElement* root),
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       
55        void setPath( char* name);
56        char* getPath();
57
58
59 private:
60  Uint32 lastFrame;             //!< last time of frame
61  bool bQuitOrxonox;            //!< quit this application
62  bool bQuitCurrentGame;        //!< quit only the current game and return to menu
63  bool bPause;                  //!< pause mode
64
65  FontSet* testFont;            //!< A test Font. \todo fix this, so it is for real.
66  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
67
68  char* worldName;              //!< The name of this World
69  char* path;                                                                           //!< The path to the data file used by 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 timeSlice ();
87  void collide ();
88  void draw ();
89  void display ();
90  void debug ();
91
92};
93
94CREATE_FACTORY(World);
95
96#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.