Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/parenting/src/world.h @ 3342

Last change on this file since 3342 was 3342, checked in by patrick, 20 years ago

orxonox/branches/parenting: removed old coordinates.h system now using parenting for the game

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