Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2077 in orxonox.OLD for orxonox/trunk/src/world.h


Ignore:
Timestamp:
Jul 5, 2004, 9:51:48 PM (20 years ago)
Author:
patrick
Message:

/orxonox/trunk/src: making doxygen comments in worldentity, player, world; extending API of worldentity; inserting list.h in world - this version does not compile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world.h

    r2036 r2077  
     1/**
     2  Class representating the game-world
     3 
     4  It contains a list of players (if multiplayer game), a list of Non-Player-Characters (nps), a list of Environment Entities. All this things together are building the orxonox-world. This class also handels the story-line (track), the world start/stop, init/uninit abilities. It is the middle point of every orxonox world.
     5*/
    16
    27#ifndef WORLD_H
     
    611class NPC;
    712class Environment;
     13class WorldEntity;
     14
     15template<class T> class List;
    816
    917
     18
     19//! World Class
     20/**
     21  Class for World representation
     22 
     23  It contains a list of players (if multiplayer game), a list of Non-Player-Characters (nps), a list of Environment Entities. All this things together are building the orxonox-world. This class also handels the story-line (track), the world start/stop, init/uninit abilities. It is the middle point of every orxonox world.
     24*/
    1025class World {
    1126
     
    1429  ~World ();
    1530
    16   float primitiveMove;
    1731
    18   /* for easier use: map the first two player here */
    19   Player *localPlayer;
    20   Player *player1;
    21   Player *player2;
    2232
    23   /* a list of all players */
     33  float primitiveMove; //!< deprecated, do not use
     34
     35  Player *localPlayer; //!< a pointer to the local player object
     36  Player *player1;     //!< a pointer to the second player object
     37  Player *player2;     //!< a pointer to the third player object
     38
     39  /*
    2440  struct playerList {
    2541    playerList* next;
     
    2945  playerList* lastPlayer;
    3046
    31   /* a list of all non-player-characters */
    3247  struct npcList {
    3348    npcList* next;
     
    3752  npcList* lastNPC;
    3853
    39   /* a list of all environmental objects */
    4054  struct envList {
    4155    envList* next;
     
    4458  };
    4559  envList* lastEnv;
     60  */
    4661
    4762
    48 
     63  void loadWorld();
     64  void unloadWorld();
     65  void pauseWorld();
     66  void saveGameState(char* filename);
     67 
    4968
    5069  bool addPlayer(Player* player);
     
    5473  bool removeNPC(NPC* npc);
    5574  bool addEnv(Environment* env);
     75  bool removeEnv(Environment* env);
    5676
     77 
    5778  void drawWorld(void);
    5879  void initEnvironement(void);
     
    6384
    6485 private:
    65   float surface[120][120];
    66   float step;
     86  float surface[120][120]; //!< deprecated: used to build a surface
     87  float step; //!< this is the step
     88
     89  List<WorldEntity*> *playerList; //!< the list of players, usualy very short
     90  List<WorldEntity*> *npcList;  //!< list of non player characters (npc)
     91  List<WorldEntity*> *envList;  //!< list of environment objects
    6792
    6893
Note: See TracChangeset for help on using the changeset viewer.