Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/shadows/src/world.h @ 3715

Last change on this file since 3715 was 3706, checked in by dave, 20 years ago

branches/shadows: Ok, das Abbild vom Raumschiff funktioniert schon mal, sieht recht cool aus:)

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