Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/branches/levelloader: Got the system to compile, the basic backbone now runs. What remains to be done is implementing all necessary functions to load all vital classes into a world

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
11#include "story_entity.h"
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*/
27//#define SUBCLASS(x,y) class x : public y {
28
29//SUBCLASS(World,StoryEntity)
30class World : public StoryEntity {
31
32 public:
33        World (TiXmlElement* root);
34  World (char* name);
35  World (int worldID);
36  virtual ~World ();
37
38
39  /* classes from story-entity */
40  virtual ErrorMessage load ();
41  virtual ErrorMessage init ();
42  virtual ErrorMessage start ();
43  virtual ErrorMessage stop ();
44  virtual ErrorMessage pause ();
45  virtual ErrorMessage resume ();
46  virtual ErrorMessage destroy ();
47
48  virtual void displayLoadScreen();
49  virtual void releaseLoadScreen();
50 
51  /* command node functions */
52  bool command (Command* cmd);
53
54  /* interface to world */
55  void spawn (WorldEntity* entity);
56  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
57       
58        void setPath( char* name);
59        char* getPath();
60
61
62 private:
63  Uint32 lastFrame;             //!< last time of frame
64  bool bQuitOrxonox;            //!< quit this application
65  bool bQuitCurrentGame;        //!< quit only the current game and return to menu
66  bool bPause;                  //!< pause mode
67
68  FontSet* testFont;            //!< A test Font. \todo fix this, so it is for real.
69  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
70
71  char* worldName;              //!< The name of this World
72  char* path;                                                                           //!< The path to the data file used by this World
73  int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
74
75  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
76  TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
77  Camera* localCamera;         //!< The current Camera
78  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
79  Light* light;                 //!< The Lights of the Level
80
81  GLuint objectList;            //!< temporary: \todo this will be ereased soon
82  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
83  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
84 
85  /* function for main-loop */
86  void mainLoop ();
87  void synchronize ();
88  void handleInput ();
89  void timeSlice ();
90  void collide ();
91  void draw ();
92  void display ();
93  void debug ();
94
95};
96
97#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.