Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3412 was 3365, checked in by bensch, 20 years ago

orxonox/trunk: merged branches/parenting back to the.
merged with command:
svn merge branches/parenting trunk -r 3247:HEAD
resolved all conflicts in favor of parenting.

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