equal
deleted
inserted
replaced
907 SpriteID image; |
907 SpriteID image; |
908 SpriteID pal; |
908 SpriteID pal; |
909 int offset; |
909 int offset; |
910 |
910 |
911 FoundationPart foundation_part = FOUNDATION_PART_NORMAL; |
911 FoundationPart foundation_part = FOUNDATION_PART_NORMAL; |
912 Slope autorail_tileh = (Slope)(ti->tileh & ~SLOPE_HALFTILE_MASK); |
912 Slope autorail_tileh = RemoveHalftileSlope(ti->tileh); |
913 if (IsHalftileSlope(ti->tileh)) { |
913 if (IsHalftileSlope(ti->tileh)) { |
914 static const uint _lower_rail[4] = { 5U, 2U, 4U, 3U }; |
914 static const uint _lower_rail[4] = { 5U, 2U, 4U, 3U }; |
915 Corner halftile_corner = GetHalftileSlopeCorner(ti->tileh); |
915 Corner halftile_corner = GetHalftileSlopeCorner(ti->tileh); |
916 if (autorail_type != _lower_rail[halftile_corner]) { |
916 if (autorail_type != _lower_rail[halftile_corner]) { |
917 foundation_part = FOUNDATION_PART_HALFTILE; |
917 foundation_part = FOUNDATION_PART_HALFTILE; |
956 /* Figure out the Z coordinate for the single dot. */ |
956 /* Figure out the Z coordinate for the single dot. */ |
957 byte z = 0; |
957 byte z = 0; |
958 FoundationPart foundation_part = FOUNDATION_PART_NORMAL; |
958 FoundationPart foundation_part = FOUNDATION_PART_NORMAL; |
959 if (ti->tileh & SLOPE_N) { |
959 if (ti->tileh & SLOPE_N) { |
960 z += TILE_HEIGHT; |
960 z += TILE_HEIGHT; |
961 if ((ti->tileh & ~SLOPE_HALFTILE_MASK) == SLOPE_STEEP_N) z += TILE_HEIGHT; |
961 if (RemoveHalftileSlope(ti->tileh) == SLOPE_STEEP_N) z += TILE_HEIGHT; |
962 } |
962 } |
963 if (IsHalftileSlope(ti->tileh)) { |
963 if (IsHalftileSlope(ti->tileh)) { |
964 Corner halftile_corner = GetHalftileSlopeCorner(ti->tileh); |
964 Corner halftile_corner = GetHalftileSlopeCorner(ti->tileh); |
965 if ((halftile_corner == CORNER_W) || (halftile_corner == CORNER_E)) z += TILE_HEIGHT; |
965 if ((halftile_corner == CORNER_W) || (halftile_corner == CORNER_E)) z += TILE_HEIGHT; |
966 if (halftile_corner != CORNER_S) { |
966 if (halftile_corner != CORNER_S) { |