Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/dave/src/world.h @ 3770

Last change on this file since 3770 was 3411, checked in by dave, 20 years ago

branches/dave/src:so bensch, hab das ganze umbenannt: skysphere.cc und skysphere.h

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