Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/burli/src/world.h @ 2161

Last change on this file since 2161 was 2037, checked in by adrian, 21 years ago

orxonox/branches/burli: Repeating ground grid (plus player-centered view for testing)

File size: 1.3 KB
RevLine 
[1853]1
2
[1872]3
[1853]4#ifndef WORLD_H
5#define WORLD_H
6
[1883]7#include <stdlib.h>
[1899]8#include <cmath>
[1883]9
[1872]10#include "npc.h"
11#include "player.h"
[1883]12#include "environment.h"
[1896]13#include "shoot_laser.h"
[1920]14#include "shoot_rocket.h"
[1872]15#include "stdincl.h"
[1904]16#include "data_tank.h"
[1853]17
[2037]18const long GRIDWIDTH = 100;
19const long GRIDLENGTH = 120;
20
[1853]21class World {
22
23 public:
24  World ();
25  ~World ();
26
[1917]27  float primitiveMove;
28
[1855]29  /* for easier use: map the first two player here */
[1872]30  Player *localPlayer;
[1853]31  Player *player1;
[1855]32  Player *player2;
[1853]33
[1855]34  /* a list of all players */
35  struct playerList {
[1856]36    playerList* next;
[1853]37    Player* player;
[1856]38    int number;
[1853]39  };
[1855]40  playerList* lastPlayer;
[1853]41
[1855]42  /* a list of all non-player-characters */
43  struct npcList {
[1856]44    npcList* next;
[1853]45    NPC* npc;
[1858]46    int number;
[1853]47  };
[1858]48  npcList* lastNPC;
[1853]49
[1883]50  /* a list of all environmental objects */
51  struct envList {
52    envList* next;
53    Environment* env;
54    int number;
55  };
56  envList* lastEnv;
57
[1896]58
59
[1899]60
[1855]61  bool addPlayer(Player* player);
62  bool removePlayer(Player* player);
[1872]63  Player* getLocalPlayer();
[1855]64  bool addNPC(NPC* npc);
65  bool removeNPC(NPC* npc);
[1883]66  bool addEnv(Environment* env);
[1858]67
68  void drawWorld(void);
[1883]69  void initEnvironement(void);
[1931]70  void setWorldStep(float step);
[1858]71  void updateWorld(void);
[1899]72  void detectCollision(void);
[1856]73  void testThaTest(void);
[1855]74
[1883]75 private:
[2037]76  float surface[GRIDWIDTH][GRIDLENGTH];
[1931]77  float step;
[1855]78
[1883]79
[1853]80};
81
82#endif
Note: See TracBrowser for help on using the repository browser.