MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / getTile

Method getTile

Source/3rdParty/tmxlite/Tileset.cpp:236–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236const Tileset::Tile* Tileset::getTile(std::uint32_t id) const
237{
238 if (!hasTile(id))
239 {
240 return nullptr;
241 }
242
243 //corrects the ID. Indices and IDs are different.
244 id -= m_firstGID;
245 id = m_tileIndex[id];
246 return id ? &m_tiles[id - 1] : nullptr;
247}
248
249//private
250void Tileset::reset()

Callers 2

addTilesFunction · 0.80
updateMethod · 0.80

Calls 1

hasTileFunction · 0.85

Tested by

no test coverage detected