* Returns the y coordinate in the viewport coordinate system where the given * tile is painted. * @param tile Any tile. * @return The viewport y coordinate where the tile is painted. */
| 1199 | * @return The viewport y coordinate where the tile is painted. |
| 1200 | */ |
| 1201 | static int GetViewportY(Point tile) |
| 1202 | { |
| 1203 | /* Each increment in X or Y direction moves down by half a tile, i.e. TILE_PIXELS / 2. */ |
| 1204 | return (tile.y * (int)(TILE_PIXELS / 2) + tile.x * (int)(TILE_PIXELS / 2) - TilePixelHeightOutsideMap(tile.x, tile.y)) << ZOOM_BASE_SHIFT; |
| 1205 | } |
| 1206 | |
| 1207 | /** |
| 1208 | * Add the landscape to the viewport, i.e. all ground tiles and buildings. |
no test coverage detected