Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world.h @ 3419

Last change on this file since 3419 was 3419, checked in by bensch, 19 years ago

orxonox/trunk: copied dave's SkySphere into the Trunk
done it with svn copy, and implemented the Class into the world.cc
it works perfectly

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