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

Method getTile

game/state/tilemap/tilemap.h:99–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 }
98 const bool isTileInBounds(Vec3<int> pos) const { return isTileInBounds(pos.x, pos.y, pos.z); }
99 const Tile *getTile(int x, int y, int z) const
100 {
101
102 if (!((x >= 0) && (x < size.x) && (y >= 0) && (y < size.y) && (z >= 0) && (z < size.z)))
103 {
104 LogError("Incorrect tile coordinates (const) %d,%d,%d", x, y, z);
105 return nullptr;
106 }
107 return &this->tiles[z * size.x * size.y + y * size.x + x];
108 }
109 Tile *getTile(int x, int y, int z)
110 {
111 if (!((x >= 0) && (x < size.x) && (y >= 0) && (y < size.y) && (z >= 0) && (z < size.z)))

Callers 15

findShortestPathMethod · 0.95
findCollisionMethod · 0.95
addToDrawnTilesMethod · 0.80
setPositionMethod · 0.80
getRestingPositionMethod · 0.80
getSolidGroundMethod · 0.80
getCanStandMethod · 0.80
getHasExitMethod · 0.80
getPassableMethod · 0.80
getHeadFitsMethod · 0.80
getUnitIfPresentMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected