Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world.h @ 3426

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

orxonox/trunk: copied dave's SkySphere into the Trunk
done it with svn copy, and implemented the Class into the world.cc
it works perfectly

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