Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/trackManager/src/world.h @ 3369

Last change on this file since 3369 was 3369, checked in by bensch, 19 years ago

orxonox/branches: added branche trackManager.

File size: 2.1 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 Track;
15class WorldEntity;
16class Camera;
17class PNode;
18class GLMenuImageScreen;
19
20//! The game environment
21class World : public StoryEntity {
22
23 public:
24  World (char* name);
25  World (int worldID);
26  virtual ~World ();
27 
28  virtual ErrorMessage init ();
29  virtual ErrorMessage start ();
30  virtual ErrorMessage stop ();
31  virtual ErrorMessage pause ();
32  virtual ErrorMessage resume ();
33
34  virtual void load ();
35  virtual void destroy ();
36
37  //static void vertexCallback (GLfloat* vertex);
38
39  void timeSlice (Uint32 deltaT);
40  void collide ();
41  void draw ();
42  void update ();       // maps Locations to Placements
43  //void calcCameraPos (Location* loc, Placement* plc);
44       
45  void unload ();
46  bool command (Command* cmd);
47  virtual void displayLoadScreen();
48  virtual void releaseLoadScreen();
49 
50  void setTrackLen (Uint32 tracklen);
51  int getTrackLen ();
52  //bool system_command (Command* cmd);
53  Camera* getCamera ();
54
55  void spawn (WorldEntity* entity);
56  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
57
58  tList<WorldEntity>* entities;
59 
60  // base level data
61  TrackManager* trackManager;
62  Track* track;
63  Uint32 tracklen;   // number of Tracks the World consist of
64  Vector* pathnodes;
65  Camera* localCamera; 
66
67
68  UPointCurve* testCurve;
69 private:
70  Uint32 lastFrame; //!> last time of frame
71  bool bQuitOrxonox; //!> quit this application
72  bool bQuitCurrentGame; //!> quit only the current game and return to menu
73  bool bPause;
74
75  GLMenuImageScreen* glmis;
76
77  char* worldName;
78  int debugWorldNr;
79  GLuint objectList;
80  SDL_Surface *loadImage;
81
82  WorldEntity* localPlayer;
83 
84  PNode* nullParent;
85 
86  void mainLoop ();
87  void synchronize ();
88  void handleInput ();
89  void timeSlice ();
90  void collision ();
91  void display ();
92  void debug ();
93
94  void swap (unsigned char &a, unsigned char &b); /* \todo: this function doesn't belong here, this should be part of a image class*/
95};
96
97#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.