Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/branche/parenting: added nullparent as the center of all parents.

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