Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3463 was 3462, checked in by patrick, 20 years ago

orxonox/trunk: cleaning up old stuff in world.cc and its relatives. task
finished for now. there are some serious thoughts that i will have to do
about this class. im not happy with:

  1. the separation mainloop and level-data, this are two very diffrent things.
  2. command-node and the hole command structure has to be redesigned
  3. there are some diffrencies in naming: timeSlice(), tick(), update()

they are all the same…

  1. separation between graphics engine an world itself, display/draw

processes are very different

  1. currently there is a limit of one camera in the world due to the

code. there could arise the need for more camreas…
so loooong…

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.