Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 4566 was 3760, checked in by dave, 20 years ago

branches/shadows: chaos, aber kommt der loesung naeher

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;
[3760]80  bool first;
[1855]81
[3365]82  GLMenuImageScreen* glmis;
83
[2636]84  char* worldName;
85  int debugWorldNr;
[2731]86  GLuint objectList;
[3365]87  SDL_Surface *loadImage;
[2636]88
[2640]89  WorldEntity* localPlayer;
[3698]90  Skysphere* skysphere;
[3706]91  Shadow* shadow;
[3365]92  PNode* nullParent;
93 
[3225]94  void mainLoop ();
95  void synchronize ();
[3226]96  void handleInput ();
[3225]97  void timeSlice ();
98  void collision ();
99  void display ();
100  void debug ();
[3365]101
102  void swap (unsigned char &a, unsigned char &b); /* \todo: this function doesn't belong here, this should be part of a image class*/
[2190]103};
[1883]104
[3224]105#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.