Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/nico/src/world.h @ 3725

Last change on this file since 3725 was 3399, checked in by bensch, 20 years ago

orxonox/branches/nico: merged trunk into branches/nico
merged with command:
svn merge ../trunk/ nico/ -r 3238:HEAD
resolved conflict in favor of branches/nico.

File size: 2.1 KB
RevLine 
[2190]1/*!
2    \file world.h
3    \brief Holds and manages all game data
4*/ 
[1853]5
[3238]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
[3399]13class TrackManager;
[2190]14class Track;
[2077]15class WorldEntity;
[2636]16class Camera;
[3399]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);
[3238]26  virtual ~World ();
[2636]27 
[3238]28  virtual ErrorMessage init ();
29  virtual ErrorMessage start ();
30  virtual ErrorMessage stop ();
31  virtual ErrorMessage pause ();
32  virtual ErrorMessage resume ();
[1917]33
[3238]34  virtual void load ();
35  virtual void destroy ();
[2636]36
[3399]37  //static void vertexCallback (GLfloat* vertex);
38
[3238]39  void timeSlice (Uint32 deltaT);
[2636]40  void collide ();
41  void draw ();
42  void update ();       // maps Locations to Placements
[3399]43  //void calcCameraPos (Location* loc, Placement* plc);
[2190]44       
[2636]45  void unload ();
[3238]46  bool command (Command* cmd);
[3399]47  virtual void displayLoadScreen();
48  virtual void releaseLoadScreen();
[2636]49 
[3238]50  void setTrackLen (Uint32 tracklen);
51  int getTrackLen ();
52  //bool system_command (Command* cmd);
53  Camera* getCamera ();
[2644]54
[3238]55  void spawn (WorldEntity* entity);
[3399]56  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
[2644]57
[2822]58  tList<WorldEntity>* entities;
[2636]59 
60  // base level data
[3399]61  TrackManager* trackManager;
[2636]62  Track* track;
63  Uint32 tracklen;   // number of Tracks the World consist of
64  Vector* pathnodes;
65  Camera* localCamera; 
66
[3399]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
[3399]75  GLMenuImageScreen* glmis;
76
[2636]77  char* worldName;
78  int debugWorldNr;
[2731]79  GLuint objectList;
[3399]80  SDL_Surface *loadImage;
[2636]81
[2640]82  WorldEntity* localPlayer;
[3399]83 
84  PNode* nullParent;
85 
[3238]86  void mainLoop ();
87  void synchronize ();
88  void handleInput ();
89  void timeSlice ();
90  void collision ();
91  void display ();
92  void debug ();
[3399]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
[3238]97#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.