OpenTTD Source
20241120-master-g6d3adc6169
|
Columns are vertical sections of the viewport that are half a tile wide.
Columns are vertical sections of the viewport that are half a tile wide.
The origin, i.e. column 0, is through the northern and southern most tile. This means that the column of e.g. Tile(0, 0) and Tile(100, 100) are in column number 0. The negative columns are towards the left of the screen, or towards the west, whereas the positive ones are towards respectively the right and east. With half a tile wide is meant that the next column of tiles directly west or east of the centre line are respectively column -1 and 1. Their tile centers are only half a tile from the center of their adjoining tile when looking only at the X-coordinate.
* ╳ * * ╱ ╲ * * ╳ 0 ╳ * * ╱ ╲ ╱ ╲ * * ╳-1 ╳ 1 ╳ * * ╱ ╲ ╱ ╲ ╱ ╲ * * ╳-2 ╳ 0 ╳ 2 ╳ * * ╲ ╱ ╲ ╱ ╲ ╱ * * ╳-1 ╳ 1 ╳ * * ╲ ╱ ╲ ╱ * * ╳ 0 ╳ * * ╲ ╱ * * ╳ * *
Rows are horizontal sections of the viewport, also half a tile wide. This time the northern most tile on the map defines 0 and everything south of that has a positive number.