Changeset 05051c7 in network-game for common/WorldMap.h
- Timestamp:
- May 19, 2013, 7:12:07 PM (12 years ago)
- Branches:
- master
- Children:
- cc1c6c1
- Parents:
- 035d852
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/WorldMap.h
r035d852 r05051c7 5 5 6 6 #include <vector> 7 8 #include "Common.h" 7 9 8 10 using namespace std; … … 17 19 }; 18 20 21 enum StructureType { 22 STRUCTURE_NONE, 23 STRUCTURE_BLUE_FLAG, 24 STRUCTURE_RED_FLAG 25 }; 26 19 27 enum ObjectType { 20 28 OBJECT_NONE, … … 23 31 }; 24 32 33 class Object { 34 public: 35 ObjectType type; 36 POSITION pos; 37 38 Object(ObjectType type, int x, int y); 39 Object(ObjectType type, POSITION pos); 40 41 ~Object(); 42 }; 43 25 44 int width, height; 26 45 vector<vector<TerrainType>*>* vctMap; 27 vector<vector<ObjectType>*>* vctObjects; 46 vector<vector<StructureType>*>* vctStructures; 47 vector<Object>* vctObjects; 28 48 29 49 WorldMap(int width, int height); … … 34 54 void setElement(int x, int y, TerrainType type); 35 55 36 ObjectType getObject(int x, int y); 37 void setObject(int x, int y, ObjectType type); 56 StructureType getStructure(int x, int y); 57 void setStructure(int x, int y, StructureType type); 58 59 vector<Object> getObjects(int x, int y); 60 void addObject(int x, int y, ObjectType type); 38 61 39 62 static WorldMap* createDefaultMap();
Note:
See TracChangeset
for help on using the changeset viewer.