Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3431 was 3430, checked in by bensch, 20 years ago

orxonox/branches/trackManager: merged trunk back to trackManager
merged with command
svn merge -r 3369:HEAD trunk/ branches/trackManager
resoloved conflicts in favor of the trunk.

File size: 2.0 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;
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  //bool system_command (Command* cmd);
51  Camera* getCamera ();
52
53  void spawn (WorldEntity* entity);
54  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
55
56  tList<WorldEntity>* entities;
57 
58  // base level data
59  TrackManager* trackManager;
60  Vector* pathnodes;
61  Camera* localCamera; 
62
63
64  UPointCurve* testCurve;
65 private:
66  Uint32 lastFrame; //!> last time of frame
67  bool bQuitOrxonox; //!> quit this application
68  bool bQuitCurrentGame; //!> quit only the current game and return to menu
69  bool bPause;
70
71  GLMenuImageScreen* glmis;
72
73  char* worldName;
74  int debugWorldNr;
75  GLuint objectList;
76  SDL_Surface *loadImage;
77  Skysphere* skySphere;
78
79  WorldEntity* localPlayer;
80 
81  PNode* nullParent;
82 
83  void mainLoop ();
84  void synchronize ();
85  void handleInput ();
86  void timeSlice ();
87  void collision ();
88  void display ();
89  void debug ();
90
91  void swap (unsigned char &a, unsigned char &b); /* \todo: this function doesn't belong here, this should be part of a image class*/
92};
93
94#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.