Difference between revisions of "NML:List of tile slopes"
(added slope sprites to slope constant table) |
m (Changed from table to sortable.) |
||
| Line 27: | Line 27: | ||
Sprites for slopes are always in the same order in TTD. For example, <code style="color:darkgreen">GROUND_SPRITE_NORMAL</code> 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 [[NML:Builtin functions|builtin function]] <code style="color:darkgreen">slope_to_sprite_offset(''slope'')</code> can be used to determine the sprite offset of a given slope. |
Sprites for slopes are always in the same order in TTD. For example, <code style="color:darkgreen">GROUND_SPRITE_NORMAL</code> 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 [[NML:Builtin functions|builtin function]] <code style="color:darkgreen">slope_to_sprite_offset(''slope'')</code> can be used to determine the sprite offset of a given slope. |
||
| − | {| class=" |
+ | {| class="wikitable sortable" |
! Sprite |
! Sprite |
||
! Named constant |
! Named constant |
||
Latest revision as of 21:03, 30 August 2022
Vehicles, Stations, Canals, Bridges, Towns, Houses, Industries (Tiles), Cargos, Airports+Tiles, Objects, Railtypes, Roadtypes, Tramtypes, Roadstops, 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.
