Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

/orxonox/trunk: unstable - problems getting collision to compile

File size: 1.9 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
13
[2190]14class Track;
[2077]15class WorldEntity;
[2636]16class Camera;
[1883]17
[2190]18//! The game environment
[2636]19class World : public StoryEntity {
[1853]20
21 public:
[2636]22  World (char* name);
23  World (int worldID);
[3221]24  virtual ~World ();
[1853]25
[2636]26  template<typename T> 
[3225]27    T* spawn (Location* loc, WorldEntity* owner);       // template to be able to spawn any derivation of WorldEntity
[2636]28  template<typename T> 
[3225]29    T* spawn (Placement* plc, WorldEntity* owner);
[2636]30 
[3225]31  virtual ErrorMessage init ();
32  virtual ErrorMessage start ();
33  virtual ErrorMessage stop ();
34  virtual ErrorMessage pause ();
35  virtual ErrorMessage resume ();
[1917]36
[3225]37  virtual void load ();
38  virtual void destroy ();
[2636]39
[3225]40  void timeSlice (Uint32 deltaT);
[2636]41  void collide ();
42  void draw ();
43  void update ();       // maps Locations to Placements
[3225]44  void calcCameraPos (Location* loc, Placement* plc);
[2190]45       
[2636]46  void unload ();
[3225]47  bool command (Command* cmd);
[2636]48 
[3225]49  void setTrackLen (Uint32 tracklen);
50  int getTrackLen ();
[3216]51  //bool system_command (Command* cmd);
[3225]52  Camera* getCamera ();
[2644]53
[3225]54  void spawn (WorldEntity* entity);
55  void spawn (WorldEntity* entity, Location* loc);
56  void spawn (WorldEntity* entity, Placement* plc);
[2644]57
[2822]58  tList<WorldEntity>* entities;
[2636]59 
60  // base level data
61  Track* track;
62  Uint32 tracklen;   // number of Tracks the World consist of
63  Vector* pathnodes;
64  Camera* localCamera; 
65
[1883]66 private:
[2636]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;
[1855]71
[2636]72  char* worldName;
73  int debugWorldNr;
[2731]74  GLuint objectList;
[2636]75
[2640]76  WorldEntity* localPlayer;
77 
[3225]78  void mainLoop ();
79  void synchronize ();
[3226]80  void handleInput ();
[3225]81  void timeSlice ();
82  void collision ();
83  void display ();
84  void debug ();
[2190]85};
[1883]86
[3224]87#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.