NML:List of tile slopes
Vehicles, Stations, Canals, Bridges, Towns, Houses, Industries (Tiles), Cargos, Airports+Tiles, Objects, Railtypes, Roadtypes, Tramtypes, Terrain
Tiles in TTD can have various slopes. The slope is a bitmask that may contain the following bits:
bit flag | meaning |
---|---|
CORNER_W | west corner is above the lowest corner. |
CORNER_S | south corner is above the lowest corner. |
CORNER_E | east corner is above the lowest corner. |
CORNER_N | north corner is above the lowest corner. |
IS_STEEP_SLOPE | this tile is a steep slope (the corner opposite to the lowest corner is 2 units higher). |
The resulting, possible values of this bitmask are given in the following table. The image below that illustrates them graphically. See also the builtin function num_corners_raised(slope)
.
Sprites for slopes are always in the same order in TTD. For example, GROUND_SPRITE_NORMAL
is the sprite number of a flat grass tile. It is followed by 18 other sprites, that display a flat grass tile for each possible slope. The order of these sprites is given in the last column of the table. The builtin function slope_to_sprite_offset(slope)
can be used to determine the sprite offset of a given slope.