Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/story_entities/world.h @ 3519

Last change on this file since 3519 was 3475, checked in by patrick, 20 years ago

orxonox/trunk: redesigning directory structure - created defs and added all importand classes. Moved sfont to font since sfont is the name of an other font library.

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