MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / MapGetTileSide

Function MapGetTileSide

src/openrct2/world/Map.cpp:1771–1776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1769 }
1770
1771 int32_t MapGetTileSide(const CoordsXY& mapPos)
1772 {
1773 int32_t subMapX = mapPos.x & (32 - 1);
1774 int32_t subMapY = mapPos.y & (32 - 1);
1775 return (subMapX < subMapY) ? ((subMapX + subMapY) < 32 ? 0 : 1) : ((subMapX + subMapY) < 32 ? 3 : 2);
1776 }
1777
1778 int32_t MapGetTileQuadrant(const CoordsXY& mapPos)
1779 {

Callers 2

ScreenGetMapXYSideFunction · 0.85
ScreenGetMapXYSideWithZFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected