- Timestamp:
- May 25, 2013, 8:31:40 PM (12 years ago)
- Branches:
- master
- Children:
- 7553db9
- Parents:
- a6066e8
- Location:
- common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
common/WorldMap.cpp
ra6066e8 re4c60ba 63 63 { 64 64 (*(*vctStructures)[x])[y] = t; 65 } 66 67 POSITION WorldMap::getStructureLocation(StructureType t) 68 { 69 POSITION pos; 70 pos.x = 0; 71 pos.y = 0; 72 73 for (int x=0; x<vctStructures->size(); x++) { 74 for (int y=0; y<(*vctStructures)[x]->size(); y++) { 75 if ((*(*vctStructures)[x])[y] == t) { 76 pos.x = x; 77 pos.y = y; 78 return pos; 79 } 80 } 81 } 82 83 return pos; 65 84 } 66 85 -
common/WorldMap.h
ra6066e8 re4c60ba 60 60 StructureType getStructure(int x, int y); 61 61 void setStructure(int x, int y, StructureType type); 62 POSITION getStructureLocation(StructureType type); 62 63 63 64 vector<Object>* getObjects();
Note:
See TracChangeset
for help on using the changeset viewer.