Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/dave/src/world.h @ 3461

Last change on this file since 3461 was 3411, checked in by dave, 20 years ago

branches/dave/src:so bensch, hab das ganze umbenannt: skysphere.cc und skysphere.h

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