Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3426 was 3374, checked in by bensch, 20 years ago

orxonox/branches/trackManager: deleted old track-system

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