Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: cone3D-fonts added, but they will still need some work till they totally adapted to orxonox.

File size: 2.9 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;
[3455]20class Cone3DFont;
[1883]21
[3449]22//! The game world
23/**
24   this class initializes everything that should be displayed inside of the current level.
25   it is the main driving factor during gameplay.
26*/
[2636]27class World : public StoryEntity {
[1853]28
29 public:
[2636]30  World (char* name);
31  World (int worldID);
[3221]32  virtual ~World ();
[2636]33 
[3225]34  virtual ErrorMessage init ();
35  virtual ErrorMessage start ();
36  virtual ErrorMessage stop ();
37  virtual ErrorMessage pause ();
38  virtual ErrorMessage resume ();
[1917]39
[3225]40  virtual void load ();
41  virtual void destroy ();
[2636]42
[3365]43  //static void vertexCallback (GLfloat* vertex);
44
[3225]45  void timeSlice (Uint32 deltaT);
[2636]46  void collide ();
47  void draw ();
48  void update ();       // maps Locations to Placements
[3365]49  //void calcCameraPos (Location* loc, Placement* plc);
[2190]50       
[2636]51  void unload ();
[3225]52  bool command (Command* cmd);
[3365]53  virtual void displayLoadScreen();
54  virtual void releaseLoadScreen();
[2636]55 
[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
[3449]62  tList<WorldEntity>* entities;//!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
[2636]63 
64  // base level data
[3449]65  TrackManager* trackManager;  //!< The reference of the TrackManager that handles the course through the Level.
66  Camera* localCamera;         //!< The current Camera
[2636]67
[3365]68
[1883]69 private:
[3449]70  Uint32 lastFrame;             //!< last time of frame
71  bool bQuitOrxonox;            //!< quit this application
72  bool bQuitCurrentGame;        //!< quit only the current game and return to menu
73  bool bPause;                  //!< pause mode
[1855]74
[3455]75  Cone3DFont* testFont;         //!< A test Font. \todo fix this, so it is for real.
[3449]76  GLMenuImageScreen* glmis;     //!< The Level-Loader Display
[3365]77
[3449]78  char* worldName;              //!< The name of this World
79  int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
80  GLuint objectList;            //!< temporary: \todo this will be ereased soon
81  Skysphere* skySphere;         //!< The Environmental Heaven of orxonox \todo insert this to environment insted
82  Light* light;                 //!< The Lights of the Level
[2636]83
[3449]84  WorldEntity* localPlayer;     //!< The Player, you fly through the level.
[3365]85 
[3449]86  PNode* nullParent;            //!< The zero-point, that everything has as its parent.
[3365]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.