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