Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

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

File size: 2.0 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
[3335]13class TrackManager;
[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 ();
[2636]26 
[3225]27  virtual ErrorMessage init ();
28  virtual ErrorMessage start ();
29  virtual ErrorMessage stop ();
30  virtual ErrorMessage pause ();
31  virtual ErrorMessage resume ();
[1917]32
[3225]33  virtual void load ();
34  virtual void destroy ();
[2636]35
[3311]36  //static void vertexCallback (GLfloat* vertex);
37
[3225]38  void timeSlice (Uint32 deltaT);
[2636]39  void collide ();
40  void draw ();
41  void update ();       // maps Locations to Placements
[3342]42  //void calcCameraPos (Location* loc, Placement* plc);
[2190]43       
[2636]44  void unload ();
[3225]45  bool command (Command* cmd);
[3336]46  virtual void displayLoadScreen();
47  virtual void releaseLoadScreen();
[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);
[3306]55  void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
[2644]56
[2822]57  tList<WorldEntity>* entities;
[2636]58 
59  // base level data
[3335]60  TrackManager* trackManager;
[2636]61  Track* track;
62  Uint32 tracklen;   // number of Tracks the World consist of
63  Vector* pathnodes;
64  Camera* localCamera; 
65
[3319]66
[3327]67  UPointCurve* testCurve;
[1883]68 private:
[2636]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;
[1855]73
[2636]74  char* worldName;
75  int debugWorldNr;
[2731]76  GLuint objectList;
[3336]77  SDL_Surface *loadImage;
[2636]78
[2640]79  WorldEntity* localPlayer;
[3276]80 
81  PNode* nullParent;
82 
[3225]83  void mainLoop ();
84  void synchronize ();
[3226]85  void handleInput ();
[3225]86  void timeSlice ();
87  void collision ();
88  void display ();
89  void debug ();
[3338]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*/
[2190]92};
[1883]93
[3224]94#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.