equal
deleted
inserted
replaced
1758 if (IsRailDepot(ti->tile)) { |
1758 if (IsRailDepot(ti->tile)) { |
1759 dts = &_depot_gfx_table[GetRailDepotDirection(ti->tile)]; |
1759 dts = &_depot_gfx_table[GetRailDepotDirection(ti->tile)]; |
1760 |
1760 |
1761 relocation = rti->total_offset; |
1761 relocation = rti->total_offset; |
1762 |
1762 |
1763 image = dts->ground_sprite; |
1763 image = dts->ground.sprite; |
1764 if (image != SPR_FLAT_GRASS_TILE) image += rti->total_offset; |
1764 if (image != SPR_FLAT_GRASS_TILE) image += rti->total_offset; |
1765 |
1765 |
1766 /* adjust ground tile for desert |
1766 /* adjust ground tile for desert |
1767 * don't adjust for snow, because snow in depots looks weird */ |
1767 * don't adjust for snow, because snow in depots looks weird */ |
1768 if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_TROPIC) { |
1768 if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_TROPIC) { |
1794 } |
1794 } |
1795 |
1795 |
1796 if (dts != NULL && dts->seq != NULL) { |
1796 if (dts != NULL && dts->seq != NULL) { |
1797 relocation = GetCustomStationRelocation(statspec, st, ti->tile); |
1797 relocation = GetCustomStationRelocation(statspec, st, ti->tile); |
1798 |
1798 |
1799 image = dts->ground_sprite; |
1799 image = dts->ground.sprite; |
1800 if (HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) { |
1800 if (HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) { |
1801 image += GetCustomStationGroundRelocation(statspec, st, ti->tile); |
1801 image += GetCustomStationGroundRelocation(statspec, st, ti->tile); |
1802 image += rti->custom_ground_offset; |
1802 image += rti->custom_ground_offset; |
1803 } else { |
1803 } else { |
1804 image += rti->total_offset; |
1804 image += rti->total_offset; |
1809 } else { |
1809 } else { |
1810 default_waypoint: |
1810 default_waypoint: |
1811 /* There is no custom layout, fall back to the default graphics */ |
1811 /* There is no custom layout, fall back to the default graphics */ |
1812 dts = &_waypoint_gfx_table[GetWaypointAxis(ti->tile)]; |
1812 dts = &_waypoint_gfx_table[GetWaypointAxis(ti->tile)]; |
1813 relocation = 0; |
1813 relocation = 0; |
1814 image = dts->ground_sprite + rti->total_offset; |
1814 image = dts->ground.sprite + rti->total_offset; |
1815 if (IsSnowRailGround(ti->tile)) image += rti->snow_offset; |
1815 if (IsSnowRailGround(ti->tile)) image += rti->snow_offset; |
1816 } |
1816 } |
1817 } |
1817 } |
1818 |
1818 |
1819 DrawGroundSprite(image, PAL_NONE); |
1819 DrawGroundSprite(image, PAL_NONE); |
1870 } |
1870 } |
1871 |
1871 |
1872 void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype) |
1872 void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype) |
1873 { |
1873 { |
1874 const DrawTileSprites* dts = &_depot_gfx_table[dir]; |
1874 const DrawTileSprites* dts = &_depot_gfx_table[dir]; |
1875 SpriteID image = dts->ground_sprite; |
1875 SpriteID image = dts->ground.sprite; |
1876 uint32 offset = GetRailTypeInfo(railtype)->total_offset; |
1876 uint32 offset = GetRailTypeInfo(railtype)->total_offset; |
1877 |
1877 |
1878 if (image != SPR_FLAT_GRASS_TILE) image += offset; |
1878 if (image != SPR_FLAT_GRASS_TILE) image += offset; |
1879 DrawTileSequence(x + 33, y + 17, image, dts->seq, offset); |
1879 DrawTileSequence(x + 33, y + 17, image, dts->seq, offset); |
1880 } |
1880 } |
1882 void DrawDefaultWaypointSprite(int x, int y, RailType railtype) |
1882 void DrawDefaultWaypointSprite(int x, int y, RailType railtype) |
1883 { |
1883 { |
1884 uint32 offset = GetRailTypeInfo(railtype)->total_offset; |
1884 uint32 offset = GetRailTypeInfo(railtype)->total_offset; |
1885 const DrawTileSprites* dts = &_waypoint_gfx_table[AXIS_X]; |
1885 const DrawTileSprites* dts = &_waypoint_gfx_table[AXIS_X]; |
1886 |
1886 |
1887 DrawTileSequence(x, y, dts->ground_sprite + offset, dts->seq, 0); |
1887 DrawTileSequence(x, y, dts->ground.sprite + offset, dts->seq, 0); |
1888 } |
1888 } |
1889 |
1889 |
1890 static uint GetSlopeZ_Track(TileIndex tile, uint x, uint y) |
1890 static uint GetSlopeZ_Track(TileIndex tile, uint x, uint y) |
1891 { |
1891 { |
1892 uint z; |
1892 uint z; |