MCPcopy Create free account
hub / github.com/SimHacker/micropolis / getTile

Method getTile

MicropolisCore/src/MicropolisEngine/src/stubs.cpp:336–343  ·  view source on GitHub ↗

* Get a tile from the map. * @param x X coordinate of the position to get, 0 to WORLD_W. * @param y Y coordinate of the position to get, 0 to WORLD_H. * @return Value of the map at the given position. * @note Off-map positions are considered to contain #DIRT. */

Source from the content-addressed store, hash-verified

334 * @note Off-map positions are considered to contain #DIRT.
335 */
336int Micropolis::getTile(int x, int y)
337{
338 if (!testBounds(x, y)) {
339 return DIRT;
340 }
341
342 return map[x][y];
343}
344
345
346/**

Callers

nothing calls this directly

Calls 1

testBoundsFunction · 0.85

Tested by

no test coverage detected