Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/old.john/src/world.h @ 3672

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

orxonox/trunk: now the Trunk should be merged with the new Makefile. Hopefully it works

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