MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / getTile

Method getTile

source/game/StarDungeonImagePart.cpp:112–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 }
111
112 Tile const* ImageTileset::getTile(Vec4B color) const {
113 if (color[3] == 0)
114 color = Vec4B(255, 255, 255, 0);
115 if (color[3] != 255)
116 return nullptr;
117 return &m_tiles.get(colorAsInt(color));
118 }
119
120 unsigned ImageTileset::colorAsInt(Vec4B color) const {
121 if ((color[3] != 0) && (color[3] != 255)) {

Callers 5

forEachTileMethod · 0.45
forEachTileAtMethod · 0.45
TMXTilesetsMethod · 0.45
getTileObjectInfoMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected