Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3453 was 3449, checked in by bensch, 20 years ago

orxonox/trunk: documented orxonox.cc/h world.cc/h vector.cc/h

File size: 2.8 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;
[2077]14class WorldEntity;
[2636]15class Camera;
[3365]16class PNode;
17class GLMenuImageScreen;
[3419]18class Skysphere;
[3436]19class Light;
[1883]20
[3449]21//! The game world
22/**
23   this class initializes everything that should be displayed inside of the current level.
24   it is the main driving factor during gameplay.
25*/
[2636]26class World : public StoryEntity {
[1853]27
28 public:
[2636]29  World (char* name);
30  World (int worldID);
[3221]31  virtual ~World ();
[2636]32 
[3225]33  virtual ErrorMessage init ();
34  virtual ErrorMessage start ();
35  virtual ErrorMessage stop ();
36  virtual ErrorMessage pause ();
37  virtual ErrorMessage resume ();
[1917]38
[3225]39  virtual void load ();
40  virtual void destroy ();
[2636]41
[3365]42  //static void vertexCallback (GLfloat* vertex);
43
[3225]44  void timeSlice (Uint32 deltaT);
[2636]45  void collide ();
46  void draw ();
47  void update ();       // maps Locations to Placements
[3365]48  //void calcCameraPos (Location* loc, Placement* plc);
[2190]49       
[2636]50  void unload ();
[3225]51  bool command (Command* cmd);
[3365]52  virtual void displayLoadScreen();
53  virtual void releaseLoadScreen();
[2636]54 
[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
[3449]61  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
[2636]62 
63  // base level data
[3449]64  TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
65  Camera* localCamera;         //!< The current Camera
[2636]66
[3365]67
[1883]68 private:
[3449]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;                  //!< pause mode
[1855]73
[3449]74  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
[3365]75
[3449]76  char* worldName;              //!< The name of this World
77  int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
78  GLuint objectList;            //!< temporary: \todo this will be ereased soon
79  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
80  Light* light;                 //!< The Lights of the Level
[2636]81
[3449]82  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
[3365]83 
[3449]84  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
[3365]85 
[3225]86  void mainLoop ();
87  void synchronize ();
[3226]88  void handleInput ();
[3225]89  void timeSlice ();
90  void collision ();
91  void display ();
92  void debug ();
[3365]93
94  void swap (unsigned char &a, unsigned char &b); /* \todo: this function doesn't belong here, this should be part of a image class*/
[2190]95};
[1883]96
[3224]97#endif /* _WORLD_H */
Note: See TracBrowser for help on using the repository browser.