MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getLayer

Method getLayer

game/state/tilemap/tilemap.cpp:210–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210unsigned int TileMap::getLayer(TileObject::Type type) const
211{
212 for (unsigned i = 0; i < this->layerMap.size(); i++)
213 {
214 if (this->layerMap[i].find(type) != this->layerMap[i].end())
215 {
216 return i;
217 }
218 }
219 LogError("No layer matching object type %d", static_cast<int>(type));
220 return 0;
221}
222
223unsigned int TileMap::getLayerCount() const { return (unsigned)this->layerMap.size(); }
224

Callers 3

removeFromMapMethod · 0.80
addToDrawnTilesMethod · 0.80
renderMethod · 0.80

Calls 2

endMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected