Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/shadows/src/world.h @ 4556

Last change on this file since 4556 was 3760, checked in by dave, 20 years ago

branches/shadows: chaos, aber kommt der loesung naeher

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