MCPcopy Create free account
hub / github.com/DFHack/dfhack / index_tile

Function index_tile

library/include/modules/Maps.h:165–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163 * Index a tile array by a 2D coordinate, clipping it to mod 16.
164 */
165template<class T> inline auto index_tile(T &v, df::coord2d p)
166 -> typename std::add_rvalue_reference<decltype(v[0][0])>::type
167{
168 return v[p.x&15][p.y&15];
169}
170
171/**
172 * Check if a 2D coordinate is in the 0-15 range.

Callers 15

removeItemOnGroundFunction · 0.85
getBlockTileBiomeRgnMethod · 0.85
getWalkableGroupMethod · 0.85
canStepBetweenMethod · 0.85
setFlagAtMethod · 0.85
setDesignationAtMethod · 0.85
tiletypeAtMethod · 0.85
biomeIndexAtMethod · 0.85
addItemOnGroundMethod · 0.85
removeItemOnGroundMethod · 0.85
MapCache.hFile · 0.85
baseTiletypeAtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected