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