Fix looping coaster brake sprites

This commit is contained in:
X123M3-256 2023-07-19 19:51:56 +01:00 committed by Spacek531
parent ee6b8e6605
commit 94cced27a1
9 changed files with 29 additions and 9 deletions

View File

@ -24730,13 +24730,25 @@
"palette": "keep"
},
{
"path": "track/looping/brake_horizontal.png",
"path": "track/looping/brake_horizontal_1.png",
"x_offset": -32,
"y_offset": 0,
"palette": "keep"
},
{
"path": "track/looping/brake_vertical.png",
"path": "track/looping/brake_horizontal_2.png",
"x_offset": -32,
"y_offset": 0,
"palette": "keep"
},
{
"path": "track/looping/brake_vertical_1.png",
"x_offset": -15,
"y_offset": -8,
"palette": "keep"
},
{
"path": "track/looping/brake_vertical_2.png",
"x_offset": -15,
"y_offset": -8,
"palette": "keep"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -24,11 +24,10 @@ static constexpr auto SPR_LOOPING_RC_BOOSTER_NW_SE = 15011;
static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_SW_NE = 15016;
static constexpr auto SPR_LOOPING_RC_FLAT_CHAINED_NW_SE = 15017;
static constexpr const uint32_t LoopingRCDiagBrakeImages[NumOrthogonalDirections] = {
SPR_G2_LOOPING_DIAG_BRAKES,
SPR_G2_LOOPING_DIAG_BRAKES + 1,
SPR_G2_LOOPING_DIAG_BRAKES,
SPR_G2_LOOPING_DIAG_BRAKES + 1,
static constexpr const uint32_t LoopingRCDiagBrakeImages[2 * NumOrthogonalDirections] = {
SPR_G2_LOOPING_DIAG_BRAKES, SPR_G2_LOOPING_DIAG_BRAKES + 2, SPR_G2_LOOPING_DIAG_BRAKES,
SPR_G2_LOOPING_DIAG_BRAKES + 2, SPR_G2_LOOPING_DIAG_BRAKES + 1, SPR_G2_LOOPING_DIAG_BRAKES + 3,
SPR_G2_LOOPING_DIAG_BRAKES + 1, SPR_G2_LOOPING_DIAG_BRAKES + 3,
};
/** rct2: 0x008A6370 */
@ -5487,6 +5486,13 @@ static void LoopingRCTrackDiagFlat(
}
}
static constexpr CoordsXYZ diagBrakeBoundsOffsets[4] = {
{ 0, 0, 24 },
{ 0, 0, 24 },
{ 0, 0, 24 },
{ 0, 0, 24 },
};
static void LoopingRCTrackDiagBrakes(
PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement)
@ -5495,7 +5501,9 @@ static void LoopingRCTrackDiagBrakes(
session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], LoopingRCDiagBrakeImages,
defaultDiagTileOffsets, defaultDiagBoundLengths, nullptr);
// TODO: draw brake sprite layers
TrackPaintUtilDiagTilesPaint(
session, 3, height, direction, trackSequence, session.TrackColours[SCHEME_TRACK], LoopingRCDiagBrakeImages + 4,
defaultDiagTileOffsets, defaultDiagBoundLengths, diagBrakeBoundsOffsets);
if (trackSequence == 3)
{

View File

@ -1456,7 +1456,7 @@ enum
SPR_G2_STANDUP_DIAG_BRAKES = SPR_G2_STEEPLECHASE_DIAG_BRAKES + 2,
SPR_G2_MINETRAIN_DIAG_BRAKES = SPR_G2_STANDUP_DIAG_BRAKES + 6,
SPR_G2_LOOPING_DIAG_BRAKES = SPR_G2_MINETRAIN_DIAG_BRAKES + 6,
SPR_G2_LIM_LAUNCHED_DIAG_BRAKES = SPR_G2_LOOPING_DIAG_BRAKES + 2,
SPR_G2_LIM_LAUNCHED_DIAG_BRAKES = SPR_G2_LOOPING_DIAG_BRAKES + 4,
SPR_G2_BM_INVERTED_DIAG_BRAKES = SPR_G2_LIM_LAUNCHED_DIAG_BRAKES + 6,
SPR_G2_DIAG_BRAKES_END = SPR_G2_BM_INVERTED_DIAG_BRAKES + 2,