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