MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / gameToScreen

Function gameToScreen

src/OpenLoco/src/Map/Tile.cpp:204–208  ·  view source on GitHub ↗

* * @param x @ * @param y * @param z * @param rotation * @return */

Source from the content-addressed store, hash-verified

202 * @return
203 */
204 Ui::viewport_pos gameToScreen(const Pos3& loc, int rotation)
205 {
206 auto rotLoc = Math::Vector::rotate(loc, rotation);
207 return Ui::viewport_pos(rotLoc.y - rotLoc.x, ((rotLoc.y + rotLoc.x) >> 1) - loc.z);
208 }
209}

Callers 15

invalidateFunction · 0.85
centre2dCoordinatesMethod · 0.85
updateLabelMethod · 0.85
updateLabelMethod · 0.85
viewportCentreOnTileMethod · 0.85
getBodyItemsForVehicleFunction · 0.85
getRoadProgressAtCursorFunction · 0.85
getTrackProgressAtCursorFunction · 0.85
drawFunction · 0.85

Calls 2

rotateFunction · 0.50
viewport_posClass · 0.50

Tested by

no test coverage detected