Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3728 was 3706, checked in by dave, 20 years ago

branches/shadows: Ok, das Abbild vom Raumschiff funktioniert schon mal, sieht recht cool aus:)

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
81  GLMenuImageScreen* glmis;
82
83  char* worldName;
84  int debugWorldNr;
85  GLuint objectList;
86  SDL_Surface *loadImage;
87
88  WorldEntity* localPlayer;
89  Skysphere* skysphere;
90  Shadow* shadow;
91  PNode* nullParent;
92 
93  void mainLoop ();
94  void synchronize ();
95  void handleInput ();
96  void timeSlice ();
97  void collision ();
98  void display ();
99  void debug ();
100
101  void swap (unsigned char &a, unsigned char &b); /* \todo: this function doesn't belong here, this should be part of a image class*/
102};
103
104#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.