* Draw a track fence. * @param ti Tile drawing information. * @param base_image First fence sprite. * @param num_sprites Number of fence sprites. * @param rfo Fence to draw. */
| 1936 | * @param rfo Fence to draw. |
| 1937 | */ |
| 1938 | static void DrawTrackFence(const TileInfo *ti, const PalSpriteID &psid, uint num_sprites, RailFenceOffset rfo) |
| 1939 | { |
| 1940 | int z = ti->z; |
| 1941 | if (_fence_offsets[rfo].height_ref != CORNER_INVALID) { |
| 1942 | z += GetSlopePixelZInCorner(RemoveHalftileSlope(ti->tileh), _fence_offsets[rfo].height_ref); |
| 1943 | } |
| 1944 | AddSortableSpriteToDraw(psid.sprite + (rfo % num_sprites), psid.pal, ti->x, ti->y, z, _fence_offsets[rfo]); |
| 1945 | } |
| 1946 | |
| 1947 | /** |
| 1948 | * Draw fence at NW border matching the tile slope. |
no test coverage detected