1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Add steep track to the go karts

This commit is contained in:
mix
2025-01-15 21:37:09 +00:00
committed by mix
parent c9175f5b1e
commit 0df3f64703
91 changed files with 766 additions and 2 deletions

View File

@@ -23658,6 +23658,436 @@
"x": -32,
"y": -4
},
{
"path": "track/go_karts/gentle_to_steep_up_1_1.png",
"x": -32,
"y": -33
},
{
"path": "track/go_karts/gentle_to_steep_up_1_2.png",
"x": -6,
"y": -20
},
{
"path": "track/go_karts/gentle_to_steep_up_2_1.png",
"x": -23,
"y": -16
},
{
"path": "track/go_karts/gentle_to_steep_up_2_2.png",
"x": -32,
"y": -17
},
{
"path": "track/go_karts/gentle_to_steep_up_3_1.png",
"x": -27,
"y": -16
},
{
"path": "track/go_karts/gentle_to_steep_up_3_2.png",
"x": -32,
"y": -17
},
{
"path": "track/go_karts/gentle_to_steep_up_4_1.png",
"x": -26,
"y": -33
},
{
"path": "track/go_karts/gentle_to_steep_up_4_2.png",
"x": -32,
"y": -20
},
{
"path": "track/go_karts/steep_to_gentle_up_1_1.png",
"x": -33,
"y": -34
},
{
"path": "track/go_karts/steep_to_gentle_up_1_2.png",
"x": -6,
"y": -20
},
{
"path": "track/go_karts/steep_to_gentle_up_2_1.png",
"x": -4,
"y": -18
},
{
"path": "track/go_karts/steep_to_gentle_up_2_2.png",
"x": -33,
"y": -5
},
{
"path": "track/go_karts/steep_to_gentle_up_3_1.png",
"x": -32,
"y": -18
},
{
"path": "track/go_karts/steep_to_gentle_up_3_2.png",
"x": -7,
"y": -5
},
{
"path": "track/go_karts/steep_to_gentle_up_4_1.png",
"x": -26,
"y": -33
},
{
"path": "track/go_karts/steep_to_gentle_up_4_2.png",
"x": -32,
"y": -20
},
{
"path": "track/go_karts/steep_1_1.png",
"x": -33,
"y": -65
},
{
"path": "track/go_karts/steep_1_2.png",
"x": -6,
"y": -52
},
{
"path": "track/go_karts/steep_2.png",
"x": -33,
"y": -49
},
{
"path": "track/go_karts/steep_3.png",
"x": -32,
"y": -49
},
{
"path": "track/go_karts/steep_4_1.png",
"x": -26,
"y": -65
},
{
"path": "track/go_karts/steep_4_2.png",
"x": -32,
"y": -52
},
{
"path": "track/go_karts/flat_to_steep_up_1_1.png",
"x": -32,
"y": -5
},
{
"path": "track/go_karts/flat_to_steep_up_1_2.png",
"x": -6,
"y": 8
},
{
"path": "track/go_karts/flat_to_steep_up_1_3.png",
"x": -33,
"y": -19
},
{
"path": "track/go_karts/flat_to_steep_up_1_4.png",
"x": -6,
"y": -6
},
{
"path": "track/go_karts/flat_to_steep_up_1_5.png",
"x": -32,
"y": -28
},
{
"path": "track/go_karts/flat_to_steep_up_1_6.png",
"x": -6,
"y": -14
},
{
"path": "track/go_karts/flat_to_steep_up_1_7.png",
"x": -32,
"y": -49
},
{
"path": "track/go_karts/flat_to_steep_up_1_8.png",
"x": -6,
"y": -36
},
{
"path": "track/go_karts/flat_to_steep_up_2_1.png",
"x": -25,
"y": -2
},
{
"path": "track/go_karts/flat_to_steep_up_2_2.png",
"x": -32,
"y": 12
},
{
"path": "track/go_karts/flat_to_steep_up_2_3.png",
"x": -25,
"y": -6
},
{
"path": "track/go_karts/flat_to_steep_up_2_4.png",
"x": -33,
"y": 8
},
{
"path": "track/go_karts/flat_to_steep_up_2_5.png",
"x": -34,
"y": 2
},
{
"path": "track/go_karts/flat_to_steep_up_2_6.png",
"x": -34,
"y": -40
},
{
"path": "track/go_karts/flat_to_steep_up_2_7.png",
"x": -31,
"y": -33
},
{
"path": "track/go_karts/flat_to_steep_up_2_8.png",
"x": 0,
"y": 0
},
{
"path": "track/go_karts/flat_to_steep_up_3_1.png",
"x": -33,
"y": -2
},
{
"path": "track/go_karts/flat_to_steep_up_3_2.png",
"x": -7,
"y": 12
},
{
"path": "track/go_karts/flat_to_steep_up_3_3.png",
"x": -33,
"y": -6
},
{
"path": "track/go_karts/flat_to_steep_up_3_4.png",
"x": -8,
"y": 8
},
{
"path": "track/go_karts/flat_to_steep_up_3_5.png",
"x": -1,
"y": 2
},
{
"path": "track/go_karts/flat_to_steep_up_3_6.png",
"x": -59,
"y": -40
},
{
"path": "track/go_karts/flat_to_steep_up_3_7.png",
"x": -32,
"y": -33
},
{
"path": "track/go_karts/flat_to_steep_up_3_8.png",
"x": 0,
"y": 0
},
{
"path": "track/go_karts/flat_to_steep_up_4_1.png",
"x": -26,
"y": -5
},
{
"path": "track/go_karts/flat_to_steep_up_4_2.png",
"x": -33,
"y": 8
},
{
"path": "track/go_karts/flat_to_steep_up_4_3.png",
"x": -26,
"y": -19
},
{
"path": "track/go_karts/flat_to_steep_up_4_4.png",
"x": -32,
"y": -5
},
{
"path": "track/go_karts/flat_to_steep_up_4_5.png",
"x": -26,
"y": -28
},
{
"path": "track/go_karts/flat_to_steep_up_4_6.png",
"x": -32,
"y": -14
},
{
"path": "track/go_karts/flat_to_steep_up_4_7.png",
"x": -26,
"y": -49
},
{
"path": "track/go_karts/flat_to_steep_up_4_8.png",
"x": -32,
"y": -36
},
{
"path": "track/go_karts/steep_to_flat_up_1_1.png",
"x": -33,
"y": -46
},
{
"path": "track/go_karts/steep_to_flat_up_1_2.png",
"x": -6,
"y": -33
},
{
"path": "track/go_karts/steep_to_flat_up_1_3.png",
"x": -33,
"y": -31
},
{
"path": "track/go_karts/steep_to_flat_up_1_4.png",
"x": -6,
"y": -18
},
{
"path": "track/go_karts/steep_to_flat_up_1_5.png",
"x": -33,
"y": -21
},
{
"path": "track/go_karts/steep_to_flat_up_1_6.png",
"x": -6,
"y": -8
},
{
"path": "track/go_karts/steep_to_flat_up_1_7.png",
"x": -33,
"y": -10
},
{
"path": "track/go_karts/steep_to_flat_up_1_8.png",
"x": -6,
"y": 3
},
{
"path": "track/go_karts/steep_to_flat_up_2_1.png",
"x": -33,
"y": -20
},
{
"path": "track/go_karts/steep_to_flat_up_2_2.png",
"x": 0,
"y": 0
},
{
"path": "track/go_karts/steep_to_flat_up_2_3.png",
"x": -14,
"y": -17
},
{
"path": "track/go_karts/steep_to_flat_up_2_4.png",
"x": -32,
"y": -4
},
{
"path": "track/go_karts/steep_to_flat_up_2_5.png",
"x": -23,
"y": -9
},
{
"path": "track/go_karts/steep_to_flat_up_2_6.png",
"x": -33,
"y": 4
},
{
"path": "track/go_karts/steep_to_flat_up_2_7.png",
"x": -24,
"y": -5
},
{
"path": "track/go_karts/steep_to_flat_up_2_8.png",
"x": -32,
"y": 8
},
{
"path": "track/go_karts/steep_to_flat_up_3_1.png",
"x": -17,
"y": -20
},
{
"path": "track/go_karts/steep_to_flat_up_3_2.png",
"x": 0,
"y": 0
},
{
"path": "track/go_karts/steep_to_flat_up_3_3.png",
"x": -35,
"y": -17
},
{
"path": "track/go_karts/steep_to_flat_up_3_4.png",
"x": -9,
"y": -4
},
{
"path": "track/go_karts/steep_to_flat_up_3_5.png",
"x": -32,
"y": -9
},
{
"path": "track/go_karts/steep_to_flat_up_3_6.png",
"x": -6,
"y": 4
},
{
"path": "track/go_karts/steep_to_flat_up_3_7.png",
"x": -33,
"y": -5
},
{
"path": "track/go_karts/steep_to_flat_up_3_8.png",
"x": -6,
"y": 8
},
{
"path": "track/go_karts/steep_to_flat_up_4_1.png",
"x": -26,
"y": -46
},
{
"path": "track/go_karts/steep_to_flat_up_4_2.png",
"x": -32,
"y": -33
},
{
"path": "track/go_karts/steep_to_flat_up_4_3.png",
"x": -26,
"y": -31
},
{
"path": "track/go_karts/steep_to_flat_up_4_4.png",
"x": -32,
"y": -18
},
{
"path": "track/go_karts/steep_to_flat_up_4_5.png",
"x": -26,
"y": -21
},
{
"path": "track/go_karts/steep_to_flat_up_4_6.png",
"x": -32,
"y": -7
},
{
"path": "track/go_karts/steep_to_flat_up_4_7.png",
"x": -26,
"y": -9
},
{
"path": "track/go_karts/steep_to_flat_up_4_8.png",
"x": -33,
"y": 4
},
{
"path": "track/go_karts/small_turn_left_1_1.png",
"x": -32,

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1596,7 +1596,9 @@ enum : ImageIndex
SPR_G2_MINE_RIDE_END = SPR_G2_MINE_RIDE_TRACK_19471 + 1,
SPR_G2_GO_KARTS_BEGIN = SPR_G2_MINE_RIDE_END,
SPR_G2_GO_KARTS_TRACK_SMALL_CURVE = SPR_G2_GO_KARTS_BEGIN,
SPR_G2_GO_KARTS_TRACK_STEEP = SPR_G2_GO_KARTS_BEGIN,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP = SPR_G2_GO_KARTS_TRACK_STEEP + 22,
SPR_G2_GO_KARTS_TRACK_SMALL_CURVE = SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 64,
SPR_G2_GO_KARTS_TRACK_MEDIUM_CURVE = SPR_G2_GO_KARTS_TRACK_SMALL_CURVE + 32,
SPR_G2_GO_KARTS_TRACK_LARGE_CURVE = SPR_G2_GO_KARTS_TRACK_MEDIUM_CURVE + 53,
SPR_G2_GO_KARTS_TRACK_S_BEND = SPR_G2_GO_KARTS_TRACK_LARGE_CURVE + 82,

View File

@@ -132,6 +132,139 @@ static constexpr uint32_t go_karts_track_pieces_25_deg_up_to_flat[4][2] = {
{ SPR_GO_KARTS_25_DEG_UP_TO_FLAT_SE_NW, SPR_GO_KARTS_25_DEG_UP_TO_FLAT_FRONT_SE_NW },
};
static constexpr std::array<std::array<ImageIndex, 2>, kNumOrthogonalDirections> kGoKartsUp60Sprites = {
SPR_G2_GO_KARTS_TRACK_STEEP + 16,
SPR_G2_GO_KARTS_TRACK_STEEP + 17,
kImageIndexUndefined,
SPR_G2_GO_KARTS_TRACK_STEEP + 18,
kImageIndexUndefined,
SPR_G2_GO_KARTS_TRACK_STEEP + 19,
SPR_G2_GO_KARTS_TRACK_STEEP + 20,
SPR_G2_GO_KARTS_TRACK_STEEP + 21,
};
static constexpr std::array<std::array<BoundBoxXYZ, 2>, kNumOrthogonalDirections> kGoKartsUp60BoundBoxes = { {
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 86 }, { 32, 28, 1 } } } },
{ { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 4, 28, 0 }, { 24, 2, 77 } } } },
{ { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 28, 4, 0 }, { 2, 24, 77 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 86 }, { 28, 32, 1 } } } },
} };
static constexpr std::array<std::array<ImageIndex, 2>, kNumOrthogonalDirections> kGoKartsUp25ToUp60Sprites = {
SPR_G2_GO_KARTS_TRACK_STEEP + 0, SPR_G2_GO_KARTS_TRACK_STEEP + 1, SPR_G2_GO_KARTS_TRACK_STEEP + 2,
SPR_G2_GO_KARTS_TRACK_STEEP + 3, SPR_G2_GO_KARTS_TRACK_STEEP + 4, SPR_G2_GO_KARTS_TRACK_STEEP + 5,
SPR_G2_GO_KARTS_TRACK_STEEP + 6, SPR_G2_GO_KARTS_TRACK_STEEP + 7,
};
static constexpr std::array<std::array<BoundBoxXYZ, 2>, kNumOrthogonalDirections> kGoKartsUp25ToUp60BoundBoxes = { {
{ { { { 0, 2, 0 }, { 32, 28, 0 } }, { { 0, 2, 54 }, { 32, 28, 1 } } } },
{ { { { 6, 0, 0 }, { 20, 32, 3 } }, { { 4, 28, 0 }, { 24, 2, 56 } } } },
{ { { { 0, 6, 0 }, { 32, 20, 3 } }, { { 28, 4, 0 }, { 2, 24, 56 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 0 } }, { { 2, 0, 54 }, { 28, 32, 1 } } } },
} };
static constexpr std::array<std::array<ImageIndex, 2>, kNumOrthogonalDirections> kGoKartsUp60ToUp25Sprites = {
SPR_G2_GO_KARTS_TRACK_STEEP + 8, SPR_G2_GO_KARTS_TRACK_STEEP + 9, SPR_G2_GO_KARTS_TRACK_STEEP + 10,
SPR_G2_GO_KARTS_TRACK_STEEP + 11, SPR_G2_GO_KARTS_TRACK_STEEP + 12, SPR_G2_GO_KARTS_TRACK_STEEP + 13,
SPR_G2_GO_KARTS_TRACK_STEEP + 14, SPR_G2_GO_KARTS_TRACK_STEEP + 15,
};
static constexpr std::array<std::array<std::array<ImageIndex, 2>, 4>, kNumOrthogonalDirections>
kGoKartsFlatToUp60LongBaseSprites = {
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 0, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 1,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 2, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 3,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 4, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 5,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 6, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 7,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 8, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 9,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 10, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 11,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 12, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 13,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 14, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 15,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 16, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 17,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 18, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 19,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 20, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 21,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 22, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 23,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 24, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 25,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 26, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 27,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 28, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 29,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 30, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 31,
};
static constexpr std::array<std::array<std::array<BoundBoxXYZ, 2>, 4>, kNumOrthogonalDirections>
kGoKartsFlatToUp60LongBaseBoundBoxes = { {
{ {
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 30 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 38 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 46 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 70 }, { 32, 28, 1 } } } },
} },
{ {
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 30 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 38 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 46 }, { 28, 32, 1 } } } },
{ { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 4, 28, -16 }, { 24, 2, 56 } } } },
} },
{ {
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 30 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 38 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 46 }, { 32, 28, 1 } } } },
{ { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 28, 4, -16 }, { 2, 24, 56 } } } },
} },
{ {
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 30 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 46 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 46 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 70 }, { 28, 32, 1 } } } },
} },
} };
static constexpr std::array<std::array<std::array<ImageIndex, 2>, 4>, kNumOrthogonalDirections>
kGoKartsUp60ToFlatLongBaseSprites = {
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 32, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 33,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 34, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 35,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 36, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 37,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 38, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 39,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 40, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 41,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 42, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 43,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 44, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 45,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 46, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 47,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 48, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 49,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 50, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 51,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 52, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 53,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 54, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 55,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 56, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 57,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 58, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 59,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 60, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 61,
SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 62, SPR_G2_GO_KARTS_TRACK_FLAT_TO_STEEP + 63,
};
static constexpr std::array<std::array<std::array<BoundBoxXYZ, 2>, 4>, kNumOrthogonalDirections>
kGoKartsUp60ToFlatLongBaseBoundBoxes = { {
{ {
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 70 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 70 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 46 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 30 }, { 32, 28, 1 } } } },
} },
{ {
{ { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 4, 28, -16 }, { 24, 2, 56 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 70 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 46 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 30 }, { 28, 32, 1 } } } },
} },
{ {
{ { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 28, 4, -16 }, { 2, 24, 56 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 70 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 46 }, { 32, 28, 1 } } } },
{ { { { 0, 2, 0 }, { 32, 28, 1 } }, { { 0, 2, 30 }, { 32, 28, 1 } } } },
} },
{ {
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 70 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 70 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 46 }, { 28, 32, 1 } } } },
{ { { { 2, 0, 0 }, { 28, 32, 1 } }, { { 2, 0, 30 }, { 28, 32, 1 } } } },
} },
} };
static constexpr std::array<std::array<std::array<ImageIndex, 2>, 4>, kNumOrthogonalDirections>
kGoKartsLeftQuarterTurn3TilesSprites = {
SPR_G2_GO_KARTS_TRACK_SMALL_CURVE + 0, SPR_G2_GO_KARTS_TRACK_SMALL_CURVE + 1, SPR_G2_GO_KARTS_TRACK_SMALL_CURVE + 2,
@@ -829,6 +962,171 @@ static void PaintGoKartsTrackRightQuarterTurn1Tile(
PaintGoKartsTrackLeftQuarterTurn1Tile(session, ride, trackSequence, (direction + 3) % 4, height, trackElement, supportType);
}
static void TrackUp60(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp60Sprites[direction][0]), height, { 0, 0, 0 },
kGoKartsUp60BoundBoxes[direction][0]);
session.WoodenSupportsPrependTo = PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp60Sprites[direction][1]), height, { 0, 0, 0 },
kGoKartsUp60BoundBoxes[direction][1]);
WoodenASupportsPaintSetupRotated(
session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours,
WoodenSupportTransitionType::Up60Deg);
if (direction == 0 || direction == 3)
{
PaintUtilPushTunnelRotated(session, direction, height - 8, kTunnelGroup, TunnelSubType::SlopeStart);
}
else
{
PaintUtilPushTunnelRotated(session, direction, height + 56, kTunnelGroup, TunnelSubType::SlopeEnd);
}
PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 104);
}
static void TrackUp25ToUp60(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp25ToUp60Sprites[direction][0]), height, { 0, 0, 0 },
kGoKartsUp25ToUp60BoundBoxes[direction][0]);
session.WoodenSupportsPrependTo = PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp25ToUp60Sprites[direction][1]), height, { 0, 0, 0 },
kGoKartsUp25ToUp60BoundBoxes[direction][1]);
WoodenASupportsPaintSetupRotated(
session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours,
WoodenSupportTransitionType::Up25DegToUp60Deg);
if (direction == 0 || direction == 3)
{
PaintUtilPushTunnelRotated(session, direction, height - 8, kTunnelGroup, TunnelSubType::SlopeStart);
}
else
{
PaintUtilPushTunnelRotated(session, direction, height + 24, kTunnelGroup, TunnelSubType::SlopeEnd);
}
PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 72);
}
static void TrackUp60ToUp25(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp60ToUp25Sprites[direction][0]), height, { 0, 0, 0 },
kGoKartsUp25ToUp60BoundBoxes[direction][0]);
session.WoodenSupportsPrependTo = PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp60ToUp25Sprites[direction][1]), height, { 0, 0, 0 },
kGoKartsUp25ToUp60BoundBoxes[direction][1]);
WoodenASupportsPaintSetupRotated(
session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours,
WoodenSupportTransitionType::Up60DegToUp25Deg);
if (direction == 0 || direction == 3)
{
PaintUtilPushTunnelRotated(session, direction, height - 8, kTunnelGroup, TunnelSubType::SlopeStart);
}
else
{
PaintUtilPushTunnelRotated(session, direction, height + 24, kTunnelGroup, TunnelSubType::SlopeEnd);
}
PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
PaintUtilSetGeneralSupportHeight(session, height + 72);
}
static void TrackDown60(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
TrackUp60(session, ride, trackSequence, DirectionReverse(direction), height, trackElement, supportType);
}
static void TrackDown25ToDown60(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
TrackUp60ToUp25(session, ride, trackSequence, DirectionReverse(direction), height, trackElement, supportType);
}
static void TrackDown60ToDown25(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
TrackUp25ToUp60(session, ride, trackSequence, DirectionReverse(direction), height, trackElement, supportType);
}
static void TrackFlatToUp60LongBase(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const uint8_t direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsFlatToUp60LongBaseSprites[direction][trackSequence][0]), height,
{ 0, 0, 0 }, kGoKartsFlatToUp60LongBaseBoundBoxes[direction][trackSequence][0]);
session.WoodenSupportsPrependTo = PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsFlatToUp60LongBaseSprites[direction][trackSequence][1]), height,
{ 0, 0, 0 }, kGoKartsFlatToUp60LongBaseBoundBoxes[direction][trackSequence][1]);
DrawSupportForSequenceA<TrackElemType::FlatToUp60LongBase>(
session, supportType.wooden, trackSequence, direction, height, session.SupportColours);
if (trackSequence == 0 && (direction == 0 || direction == 3))
{
PaintUtilPushTunnelRotated(session, direction, height, kTunnelGroup, TunnelSubType::Flat);
}
else if (trackSequence == 3 && (direction == 1 || direction == 2))
{
PaintUtilPushTunnelRotated(session, direction, height + 24, kTunnelGroup, TunnelSubType::SlopeEnd);
}
PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
static constexpr std::array generalSupportHeights = { 48, 48, 64, 80 };
PaintUtilSetGeneralSupportHeight(session, height + generalSupportHeights[trackSequence]);
}
static void TrackUp60ToFlatLongBase(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const uint8_t direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp60ToFlatLongBaseSprites[direction][trackSequence][0]), height,
{ 0, 0, 0 }, kGoKartsUp60ToFlatLongBaseBoundBoxes[direction][trackSequence][0]);
session.WoodenSupportsPrependTo = PaintAddImageAsParentHeight(
session, session.TrackColours.WithIndex(kGoKartsUp60ToFlatLongBaseSprites[direction][trackSequence][1]), height,
{ 0, 0, 0 }, kGoKartsUp60ToFlatLongBaseBoundBoxes[direction][trackSequence][1]);
DrawSupportForSequenceA<TrackElemType::Up60ToFlatLongBase>(
session, supportType.wooden, trackSequence, direction, height, session.SupportColours);
if (trackSequence == 0 && (direction == 0 || direction == 3))
{
PaintUtilPushTunnelRotated(session, direction, height, kTunnelGroup, TunnelSubType::SlopeStart);
}
else if (trackSequence == 3 && (direction == 1 || direction == 2))
{
PaintUtilPushTunnelRotated(session, direction, height + 8, kTunnelGroup, TunnelSubType::Flat);
}
PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0);
static constexpr std::array generalSupportHeights = { 80, 64, 48, 48 };
PaintUtilSetGeneralSupportHeight(session, height + generalSupportHeights[trackSequence]);
}
static void TrackFlatToDown60LongBase(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
TrackUp60ToFlatLongBase(session, ride, 3 - trackSequence, DirectionReverse(direction), height, trackElement, supportType);
}
static void TrackDown60ToFlatLongBase(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
{
TrackFlatToUp60LongBase(session, ride, 3 - trackSequence, DirectionReverse(direction), height, trackElement, supportType);
}
static void TrackLeftQuarterTurn3Tiles(
PaintSession& session, const Ride& ride, const uint8_t trackSequence, const Direction direction, const int32_t height,
const TrackElement& trackElement, const SupportType supportType)
@@ -1095,6 +1393,30 @@ TrackPaintFunction GetTrackPaintFunctionGoKarts(OpenRCT2::TrackElemType trackTyp
// Added by OpenRCT2
// Steep
case TrackElemType::Up60:
return TrackUp60;
case TrackElemType::Up25ToUp60:
return TrackUp25ToUp60;
case TrackElemType::Up60ToUp25:
return TrackUp60ToUp25;
case TrackElemType::Down60:
return TrackDown60;
case TrackElemType::Down25ToDown60:
return TrackDown25ToDown60;
case TrackElemType::Down60ToDown25:
return TrackDown60ToDown25;
// Flat to steep
case TrackElemType::FlatToUp60LongBase:
return TrackFlatToUp60LongBase;
case TrackElemType::Up60ToFlatLongBase:
return TrackUp60ToFlatLongBase;
case TrackElemType::FlatToDown60LongBase:
return TrackFlatToDown60LongBase;
case TrackElemType::Down60ToFlatLongBase:
return TrackDown60ToFlatLongBase;
// Small turns
case TrackElemType::LeftQuarterTurn3Tiles:
return TrackLeftQuarterTurn3Tiles;

View File

@@ -2930,6 +2930,16 @@ bool TrackTypeMustBeMadeInvisible(ride_type_t rideType, OpenRCT2::TrackElemType
{
switch (trackType)
{
case TrackElemType::Up60:
case TrackElemType::Up25ToUp60:
case TrackElemType::Up60ToUp25:
case TrackElemType::Down60:
case TrackElemType::Down25ToDown60:
case TrackElemType::Down60ToDown25:
case TrackElemType::FlatToUp60LongBase:
case TrackElemType::Up60ToFlatLongBase:
case TrackElemType::FlatToDown60LongBase:
case TrackElemType::Down60ToFlatLongBase:
case TrackElemType::LeftQuarterTurn3Tiles:
case TrackElemType::RightQuarterTurn3Tiles:
case TrackElemType::LeftQuarterTurn5Tiles:

View File

@@ -24,7 +24,7 @@ constexpr RideTypeDescriptor GoKartsRTD =
.trackStyle = TrackStyle::goKarts,
.supportType = WoodenSupportType::Truss,
.enabledTrackGroups = {TrackGroup::straight, TrackGroup::stationEnd, TrackGroup::slope, TrackGroup::curveVerySmall, TrackGroup::curveSmall, TrackGroup::curve, TrackGroup::curveLarge, TrackGroup::sBend},
.extraTrackGroups = {},
.extraTrackGroups = {TrackGroup::slopeSteepUp, TrackGroup::slopeSteepDown, TrackGroup::slopeSteepLong},
}),
.InvertedTrackPaintFunctions = {},
.Flags = EnumsToFlags(RtdFlag::hasTrackColourMain, RtdFlag::hasTrackColourSupports, RtdFlag::noTestMode, RtdFlag::hasOneStation,