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

Method ImageTileset

source/game/StarDungeonImagePart.cpp:105–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 }
104
105 ImageTileset::ImageTileset(Json const& tileset) {
106 for (Json const& tileDef : tileset.iterateArray()) {
107 Vec4B color = jsonToVec4B(tileDef.get("value"));
108 m_tiles.insert(colorAsInt(color), variantMapToTile(tileDef.toObject()));
109 }
110 }
111
112 Tile const* ImageTileset::getTile(Vec4B color) const {
113 if (color[3] == 0)

Callers

nothing calls this directly

Calls 6

jsonToVec4BFunction · 0.85
variantMapToTileFunction · 0.85
iterateArrayMethod · 0.80
toObjectMethod · 0.80
getMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected