Changeset 2068 in orxonox.OLD for orxonox/branches/chris/src/world.h
- Timestamp:
- Jul 5, 2004, 10:43:49 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/chris/src/world.h
r2058 r2068 2 2 #ifndef WORLD_H 3 3 #define WORLD_H 4 5 class Player;6 class NPC;7 class Environment;8 9 4 10 5 class World { … … 14 9 ~World (); 15 10 16 float primitiveMove; 11 template<class T> T* spawn<T>(Location* loc, WorldEntity* owner); // template to be able to spawn any derivation of WorldEntity 17 12 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 13 void time_slice (Uint32 deltaT); 14 void collide (); 15 void draw (); 16 void update (); // maps Locations to Placements 17 void calc_camera_pos (Location* loc, Placement* plc); 18 64 19 private: 65 float surface[120][120]; 66 float step; 67 20 21 List<WorldEntity>* entities; 22 23 // base level data 24 Track* track; 25 Uint32 tracklen; 26 Vector* pathnodes; 68 27 69 28 };
Note: See TracChangeset
for help on using the changeset viewer.