Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3446 was 3437, checked in by bensch, 20 years ago

orxonox/trunk: light is now more like a lightManager. It is a Class, that handles many lights, and as such also glEnable(GL_LIGHTING)…
Until now It is not possible to initialize more than the first Light, but this will be fixed soon :)

File size: 2.0 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;
18class Skysphere;
19class Light;
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  //bool system_command (Command* cmd);
52  Camera* getCamera ();
53
54  void spawn (WorldEntity* entity);
55  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
56
57  tList<WorldEntity>* entities;
58 
59  // base level data
60  TrackManager* trackManager;
61  Vector* pathnodes;
62  Camera* localCamera; 
63
64
65  UPointCurve* testCurve;
66 private:
67  Uint32 lastFrame; //!> last time of frame
68  bool bQuitOrxonox; //!> quit this application
69  bool bQuitCurrentGame; //!> quit only the current game and return to menu
70  bool bPause;
71
72  GLMenuImageScreen* glmis;
73
74  char* worldName;
75  int debugWorldNr;
76  GLuint objectList;
77  SDL_Surface *loadImage;
78  Skysphere* skySphere;
79  Light* light;
80
81  WorldEntity* localPlayer;
82 
83  PNode* nullParent;
84 
85  void mainLoop ();
86  void synchronize ();
87  void handleInput ();
88  void timeSlice ();
89  void collision ();
90  void display ();
91  void debug ();
92
93  void swap (unsigned char &a, unsigned char &b); /* \todo: this function doesn't belong here, this should be part of a image class*/
94};
95
96#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.