* Gets a mapdata object. * @param id The id in the terrain. * @param mapDataSetID The id of the map data set. * @return Pointer to MapData object. */
| 169 | * @return Pointer to MapData object. |
| 170 | */ |
| 171 | MapData *RuleTerrain::getMapData(int *id, int *mapDataSetID) const |
| 172 | { |
| 173 | MapDataSet* mdf = 0; |
| 174 | |
| 175 | for (std::vector<MapDataSet*>::const_iterator i = _mapDataSets.begin(); i != _mapDataSets.end(); ++i) |
| 176 | { |
| 177 | mdf = *i; |
| 178 | if (*id < mdf->getSize()) |
| 179 | { |
| 180 | break; |
| 181 | } |
| 182 | *id -= mdf->getSize(); |
| 183 | (*mapDataSetID)++; |
| 184 | } |
| 185 | |
| 186 | return mdf->getObjects()->at(*id); |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * Gets the maximum amount of large blocks in this terrain. |
nothing calls this directly
no test coverage detected