Merge pull request #14271 from ZehMatt/refactor/paint-coords

Refactor uses of PaintAddImageAsParent
This commit is contained in:
ζeh Matt 2021-06-05 20:06:37 +03:00 committed by GitHub
commit c87860b3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 619 additions and 570 deletions

View File

@ -1,4 +1,4 @@
/***************************************************************************** /*****************************************************************************
* Copyright (c) 2014-2020 OpenRCT2 developers * Copyright (c) 2014-2020 OpenRCT2 developers
* *
* For a complete list of all authors, please refer to contributors.md * For a complete list of all authors, please refer to contributors.md
@ -694,9 +694,7 @@ void PaintSessionFree([[maybe_unused]] paint_session* session)
paint_struct* PaintAddImageAsParent( paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize) paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize)
{ {
return PaintAddImageAsParent( return PaintAddImageAsParent(session, image_id, offset, boundBoxSize, offset);
session, image_id, offset.x, offset.y, boundBoxSize.x, boundBoxSize.y, boundBoxSize.z, offset.z, offset.x, offset.y,
offset.z);
} }
paint_struct* PaintAddImageAsParent( paint_struct* PaintAddImageAsParent(
@ -724,17 +722,12 @@ paint_struct* PaintAddImageAsParent(
*/ */
// Track Pieces, Shops. // Track Pieces, Shops.
paint_struct* PaintAddImageAsParent( paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x, const CoordsXYZ& boundBoxOffset)
int16_t bound_box_offset_y, int16_t bound_box_offset_z)
{ {
session->LastPS = nullptr; session->LastPS = nullptr;
session->LastAttachedPS = nullptr; session->LastAttachedPS = nullptr;
CoordsXYZ offset = { x_offset, y_offset, z_offset };
CoordsXYZ boundBoxSize = { bound_box_length_x, bound_box_length_y, bound_box_length_z };
CoordsXYZ boundBoxOffset = { bound_box_offset_x, bound_box_offset_y, bound_box_offset_z };
auto* ps = CreateNormalPaintStruct(session, image_id, offset, boundBoxSize, boundBoxOffset); auto* ps = CreateNormalPaintStruct(session, image_id, offset, boundBoxSize, boundBoxOffset);
if (ps == nullptr) if (ps == nullptr)
{ {
@ -746,6 +739,16 @@ paint_struct* PaintAddImageAsParent(
return ps; return ps;
} }
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z)
{
return PaintAddImageAsParent(
session, image_id, { x_offset, y_offset, z_offset }, { bound_box_length_x, bound_box_length_y, bound_box_length_z },
{ bound_box_offset_x, bound_box_offset_y, bound_box_offset_z });
}
/** /**
* *
* rct2: 0x00686EF0, 0x00687056, 0x006871C8, 0x0068733C, 0x0098198C * rct2: 0x00686EF0, 0x00687056, 0x006871C8, 0x0068733C, 0x0098198C
@ -811,9 +814,7 @@ paint_struct* PaintAddImageAsChild(
paint_struct* parentPS = session->LastPS; paint_struct* parentPS = session->LastPS;
if (parentPS == nullptr) if (parentPS == nullptr)
{ {
return PaintAddImageAsParent( return PaintAddImageAsParent(session, image_id, offset, boundBoxLength, boundBoxOffset);
session, image_id, offset.x, offset.y, boundBoxLength.x, boundBoxLength.y, boundBoxLength.z, offset.z,
boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
} }
auto* ps = CreateNormalPaintStruct(session, image_id, offset, boundBoxLength, boundBoxOffset); auto* ps = CreateNormalPaintStruct(session, image_id, offset, boundBoxLength, boundBoxOffset);

View File

@ -298,6 +298,9 @@ paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z); int16_t bound_box_offset_y, int16_t bound_box_offset_z);
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
const CoordsXYZ& boundBoxOffset);
[[nodiscard]] paint_struct* PaintAddImageAsOrphan( [[nodiscard]] paint_struct* PaintAddImageAsOrphan(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x, paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x, int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,

View File

@ -521,9 +521,9 @@ bool wooden_a_supports_paint_setup(
{ {
imageId += word_97B3C4[slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; imageId += word_97B3C4[slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
imageId |= imageColourFlags; imageId |= imageColourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 11, z, 0, 0, z + 2); PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 32, 32, 11 }, { 0, 0, z + 2 });
PaintAddImageAsParent(session, imageId + 4, 0, 0, 32, 32, 11, z + 16, 0, 0, z + 16 + 2); PaintAddImageAsParent(session, imageId + 4, { 0, 0, z + 16 }, { 32, 32, 11 }, { 0, 0, z + 16 + 2 });
hasSupports = true; hasSupports = true;
} }
@ -552,7 +552,7 @@ bool wooden_a_supports_paint_setup(
imageId += word_97B3C4[slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; imageId += word_97B3C4[slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
imageId |= imageColourFlags; imageId |= imageColourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 11, z, 0, 0, z + 2); PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 32, 32, 11 }, { 0, 0, z + 2 });
hasSupports = true; hasSupports = true;
} }
z += 16; z += 16;
@ -562,7 +562,7 @@ bool wooden_a_supports_paint_setup(
if (drawFlatPiece) if (drawFlatPiece)
{ {
int32_t imageId = WoodenSupportImageIds[supportType].flat | imageColourFlags; int32_t imageId = WoodenSupportImageIds[supportType].flat | imageColourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, z - 2); PaintAddImageAsParent(session, imageId, { 0, 0, z - 2 }, { 32, 32, 0 });
hasSupports = true; hasSupports = true;
} }
@ -574,7 +574,7 @@ bool wooden_a_supports_paint_setup(
// Full support // Full support
int32_t imageId = WoodenSupportImageIds[supportType].full | imageColourFlags; int32_t imageId = WoodenSupportImageIds[supportType].full | imageColourFlags;
uint8_t ah = height == 2 ? 23 : 28; uint8_t ah = height == 2 ? 23 : 28;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, ah, z); PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 32, 32, ah });
hasSupports = true; hasSupports = true;
z += 32; z += 32;
height -= 2; height -= 2;
@ -584,7 +584,7 @@ bool wooden_a_supports_paint_setup(
// Half support // Half support
int32_t imageId = WoodenSupportImageIds[supportType].half | imageColourFlags; int32_t imageId = WoodenSupportImageIds[supportType].half | imageColourFlags;
uint8_t ah = height == 1 ? 7 : 12; uint8_t ah = height == 1 ? 7 : 12;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, ah, z); PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 32, 32, ah });
hasSupports = true; hasSupports = true;
z += 16; z += 16;
height -= 1; height -= 1;
@ -697,7 +697,8 @@ bool wooden_b_supports_paint_setup(
{ {
imageId += word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; imageId += word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2); PaintAddImageAsParent(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
baseHeight += 16; baseHeight += 16;
PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2); PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2);
@ -726,7 +727,8 @@ bool wooden_b_supports_paint_setup(
{ {
imageId += word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; imageId += word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2); PaintAddImageAsParent(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 3 }, { 0, 0, baseHeight + 2 });
baseHeight += 16; baseHeight += 16;
_9E32B1 = true; _9E32B1 = true;
@ -743,7 +745,7 @@ bool wooden_b_supports_paint_setup(
else else
{ {
PaintAddImageAsParent( PaintAddImageAsParent(
session, WoodenSupportImageIds[supportType].flat | imageColourFlags, 0, 0, 32, 32, 0, baseHeight - 2); session, WoodenSupportImageIds[supportType].flat | imageColourFlags, { 0, 0, baseHeight - 2 }, { 32, 32, 0 });
_9E32B1 = true; _9E32B1 = true;
} }
} }
@ -885,7 +887,7 @@ bool metal_a_supports_paint_setup(
uint32_t image_id = _metalSupportTypeToCrossbeamImages[supportType][ebp]; uint32_t image_id = _metalSupportTypeToCrossbeamImages[supportType][ebp];
image_id |= imageColourFlags; image_id |= imageColourFlags;
PaintAddImageAsParent(session, image_id, xOffset, yOffset, boundBoxLengthX, boundBoxLengthY, 1, height); PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { boundBoxLengthX, boundBoxLengthY, 1 });
segment = newSegment; segment = newSegment;
} }
@ -904,7 +906,7 @@ bool metal_a_supports_paint_setup(
image_id += metal_supports_slope_image_map[supportSegments[segment].slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]; image_id += metal_supports_slope_image_map[supportSegments[segment].slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
image_id |= imageColourFlags; image_id |= imageColourFlags;
PaintAddImageAsParent(session, image_id, xOffset, yOffset, 0, 0, 5, supportSegments[segment].height); PaintAddImageAsParent(session, image_id, { xOffset, yOffset, supportSegments[segment].height }, { 0, 0, 5 });
height = supportSegments[segment].height + 6; height = supportSegments[segment].height + 6;
} }
@ -928,7 +930,7 @@ bool metal_a_supports_paint_setup(
image_id += heightDiff - 1; image_id += heightDiff - 1;
image_id |= imageColourFlags; image_id |= imageColourFlags;
PaintAddImageAsParent(session, image_id, xOffset, yOffset, 0, 0, heightDiff - 1, height); PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { 0, 0, heightDiff - 1 });
} }
height += heightDiff; height += heightDiff;
@ -959,7 +961,7 @@ bool metal_a_supports_paint_setup(
if (count == 3 && z == 0x10) if (count == 3 && z == 0x10)
image_id++; image_id++;
PaintAddImageAsParent(session, image_id, xOffset, yOffset, 0, 0, z - 1, height); PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { 0, 0, z - 1 });
height += z; height += z;
} }
@ -1000,8 +1002,7 @@ bool metal_a_supports_paint_setup(
image_id += z - 1; image_id += z - 1;
image_id |= imageColourFlags; image_id |= imageColourFlags;
PaintAddImageAsParent( PaintAddImageAsParent(session, image_id, { xOffset, yOffset, height }, { 0, 0, 0 }, boundBoxOffset);
session, image_id, xOffset, yOffset, 0, 0, 0, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
height += z; height += z;
} }
@ -1252,7 +1253,8 @@ bool path_a_supports_paint_setup(
uint32_t imageId = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK] uint32_t imageId = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
+ railingEntry->bridge_image; + railingEntry->bridge_image;
PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2); PaintAddImageAsParent(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
baseHeight += 16; baseHeight += 16;
PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2); PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
@ -1273,7 +1275,7 @@ bool path_a_supports_paint_setup(
uint32_t ebx = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK] uint32_t ebx = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
+ railingEntry->bridge_image; + railingEntry->bridge_image;
PaintAddImageAsParent(session, ebx | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2); PaintAddImageAsParent(session, ebx | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
hasSupports = true; hasSupports = true;
baseHeight += 16; baseHeight += 16;

View File

@ -366,13 +366,14 @@ void virtual_floor_paint(paint_session* session)
uint8_t dullEdges = 0xF & ~occupiedEdges & ~litEdges; uint8_t dullEdges = 0xF & ~occupiedEdges & ~litEdges;
uint8_t paintEdges = ((weAreOccupied || weAreLit) && weAreOwned) ? ~dullEdges : 0xF; uint8_t paintEdges = ((weAreOccupied || weAreLit) && weAreOwned) ? ~dullEdges : 0xF;
const auto virtualFloorOffset = CoordsXYZ{ 0, 0, _virtualFloorHeight };
if (paintEdges & EDGE_NE) if (paintEdges & EDGE_NE)
{ {
PaintAddImageAsParent( PaintAddImageAsParent(
session, session,
SPR_G2_SELECTION_EDGE_NE SPR_G2_SELECTION_EDGE_NE
| (!(occupiedEdges & EDGE_NE) ? ((litEdges & EDGE_NE) ? remap_lit : remap_base) : remap_edge), | (!(occupiedEdges & EDGE_NE) ? ((litEdges & EDGE_NE) ? remap_lit : remap_base) : remap_edge),
0, 0, 0, 0, 1, _virtualFloorHeight, 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NE) ? -2 : 0)); virtualFloorOffset, { 0, 0, 1 }, { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NE) ? -2 : 0) });
} }
if (paintEdges & EDGE_SE) if (paintEdges & EDGE_SE)
{ {
@ -380,7 +381,7 @@ void virtual_floor_paint(paint_session* session)
session, session,
SPR_G2_SELECTION_EDGE_SE SPR_G2_SELECTION_EDGE_SE
| (!(occupiedEdges & EDGE_SE) ? ((litEdges & EDGE_SE) ? remap_lit : remap_base) : remap_edge), | (!(occupiedEdges & EDGE_SE) ? ((litEdges & EDGE_SE) ? remap_lit : remap_base) : remap_edge),
0, 0, 1, 1, 1, _virtualFloorHeight, 16, 27, _virtualFloorHeight + ((dullEdges & EDGE_SE) ? -2 : 0)); virtualFloorOffset, { 1, 1, 1 }, { 16, 27, _virtualFloorHeight + ((dullEdges & EDGE_SE) ? -2 : 0) });
} }
if (paintEdges & EDGE_SW) if (paintEdges & EDGE_SW)
{ {
@ -388,7 +389,7 @@ void virtual_floor_paint(paint_session* session)
session, session,
SPR_G2_SELECTION_EDGE_SW SPR_G2_SELECTION_EDGE_SW
| (!(occupiedEdges & EDGE_SW) ? ((litEdges & EDGE_SW) ? remap_lit : remap_base) : remap_edge), | (!(occupiedEdges & EDGE_SW) ? ((litEdges & EDGE_SW) ? remap_lit : remap_base) : remap_edge),
0, 0, 1, 1, 1, _virtualFloorHeight, 27, 16, _virtualFloorHeight + ((dullEdges & EDGE_SW) ? -2 : 0)); virtualFloorOffset, { 1, 1, 1 }, { 27, 16, _virtualFloorHeight + ((dullEdges & EDGE_SW) ? -2 : 0) });
} }
if (paintEdges & EDGE_NW) if (paintEdges & EDGE_NW)
{ {
@ -396,7 +397,7 @@ void virtual_floor_paint(paint_session* session)
session, session,
SPR_G2_SELECTION_EDGE_NW SPR_G2_SELECTION_EDGE_NW
| (!(occupiedEdges & EDGE_NW) ? ((litEdges & EDGE_NW) ? remap_lit : remap_base) : remap_edge), | (!(occupiedEdges & EDGE_NW) ? ((litEdges & EDGE_NW) ? remap_lit : remap_base) : remap_edge),
0, 0, 0, 0, 1, _virtualFloorHeight, 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0)); virtualFloorOffset, { 0, 0, 1 }, { 5, 5, _virtualFloorHeight + ((dullEdges & EDGE_NW) ? -2 : 0) });
} }
if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Glassy) if (gConfigGeneral.virtual_floor_style != VirtualFloorStyles::Glassy)
@ -406,7 +407,7 @@ void virtual_floor_paint(paint_session* session)
{ {
int32_t imageColourFlats = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT int32_t imageColourFlats = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT
| EnumValue(FilterPaletteID::PaletteWater) << 19; | EnumValue(FilterPaletteID::PaletteWater) << 19;
PaintAddImageAsParent(session, imageColourFlats, 0, 0, 30, 30, 0, _virtualFloorHeight, 2, 2, _virtualFloorHeight - 3); PaintAddImageAsParent(session, imageColourFlats, virtualFloorOffset, { 30, 30, 0 }, { 2, 2, _virtualFloorHeight - 3 });
} }
} }

View File

@ -32,7 +32,7 @@ const uint32_t vehicle_particle_base_sprites[] = {
template<> void PaintEntity(paint_session* session, const SteamParticle* particle, int32_t imageDirection) template<> void PaintEntity(paint_session* session, const SteamParticle* particle, int32_t imageDirection)
{ {
uint32_t imageId = 22637 + (particle->frame / 256); uint32_t imageId = 22637 + (particle->frame / 256);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 0, particle->z); PaintAddImageAsParent(session, imageId, { 0, 0, particle->z }, { 1, 1, 0 });
} }
template<> void PaintEntity(paint_session* session, const MoneyEffect* moneyEffect, int32_t imageDirection) template<> void PaintEntity(paint_session* session, const MoneyEffect* moneyEffect, int32_t imageDirection)
@ -63,7 +63,7 @@ template<> void PaintEntity(paint_session* session, const VehicleCrashParticle*
return; return;
uint32_t imageId = vehicle_particle_base_sprites[particle->crashed_sprite_base] + particle->frame / 256; uint32_t imageId = vehicle_particle_base_sprites[particle->crashed_sprite_base] + particle->frame / 256;
imageId = imageId | (particle->colour[0] << 19) | (particle->colour[1] << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS; imageId = imageId | (particle->colour[0] << 19) | (particle->colour[1] << 24) | IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS;
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 0, particle->z); PaintAddImageAsParent(session, imageId, { 0, 0, particle->z }, { 1, 1, 0 });
} }
template<> void PaintEntity(paint_session* session, const ExplosionCloud* particle, int32_t imageDirection) template<> void PaintEntity(paint_session* session, const ExplosionCloud* particle, int32_t imageDirection)
@ -71,7 +71,7 @@ template<> void PaintEntity(paint_session* session, const ExplosionCloud* partic
if (particle == nullptr) if (particle == nullptr)
return; return;
uint32_t imageId = 22878 + (particle->frame / 256); uint32_t imageId = 22878 + (particle->frame / 256);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 0, particle->z); PaintAddImageAsParent(session, imageId, { 0, 0, particle->z }, { 1, 1, 0 });
} }
template<> void PaintEntity(paint_session* session, const CrashSplashParticle* crashSplash, int32_t imageDirection) template<> void PaintEntity(paint_session* session, const CrashSplashParticle* crashSplash, int32_t imageDirection)
@ -79,7 +79,7 @@ template<> void PaintEntity(paint_session* session, const CrashSplashParticle* c
if (crashSplash == nullptr) if (crashSplash == nullptr)
return; return;
uint32_t imageId = 22927 + (crashSplash->frame / 256); uint32_t imageId = 22927 + (crashSplash->frame / 256);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 0, crashSplash->z); PaintAddImageAsParent(session, imageId, { 0, 0, crashSplash->z }, { 1, 1, 0 });
} }
template<> void PaintEntity(paint_session* session, const ExplosionFlare* flare, int32_t imageDirection) template<> void PaintEntity(paint_session* session, const ExplosionFlare* flare, int32_t imageDirection)
@ -88,7 +88,7 @@ template<> void PaintEntity(paint_session* session, const ExplosionFlare* flare,
if (flare == nullptr) if (flare == nullptr)
return; return;
uint32_t imageId = 22896 + (flare->frame / 256); uint32_t imageId = 22896 + (flare->frame / 256);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 0, flare->z); PaintAddImageAsParent(session, imageId, { 0, 0, flare->z }, { 1, 1, 0 });
} }
constexpr uint32_t JumpingFountainSnowBaseImage = 23037; constexpr uint32_t JumpingFountainSnowBaseImage = 23037;
@ -141,7 +141,7 @@ template<> void PaintEntity(paint_session* session, const Balloon* balloon, int3
} }
imageId = imageId | (balloon->colour << 19) | IMAGE_TYPE_REMAP; imageId = imageId | (balloon->colour << 19) | IMAGE_TYPE_REMAP;
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 0, balloon->z); PaintAddImageAsParent(session, imageId, { 0, 0, balloon->z }, { 1, 1, 0 });
} }
template<> void PaintEntity(paint_session* session, const Duck* duck, int32_t imageDirection) template<> void PaintEntity(paint_session* session, const Duck* duck, int32_t imageDirection)
@ -154,7 +154,7 @@ template<> void PaintEntity(paint_session* session, const Duck* duck, int32_t im
uint32_t imageId = duck->GetFrameImage(imageDirection); uint32_t imageId = duck->GetFrameImage(imageDirection);
if (imageId != 0) if (imageId != 0)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 0, duck->z); PaintAddImageAsParent(session, imageId, { 0, 0, duck->z }, { 1, 1, 0 });
} }
} }
} }

View File

@ -87,21 +87,21 @@ template<> void PaintEntity(paint_session* session, const Peep* peep, int32_t im
if (baseImageId >= 10717 && baseImageId < 10749) if (baseImageId >= 10717 && baseImageId < 10749)
{ {
imageId = (baseImageId + 32) | guest->HatColour << 19 | IMAGE_TYPE_REMAP; imageId = (baseImageId + 32) | guest->HatColour << 19 | IMAGE_TYPE_REMAP;
PaintAddImageAsChild(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); PaintAddImageAsChild(session, imageId, { 0, 0, peep->z }, { 1, 1, 11 }, { 0, 0, peep->z + 5 });
return; return;
} }
if (baseImageId >= 10781 && baseImageId < 10813) if (baseImageId >= 10781 && baseImageId < 10813)
{ {
imageId = (baseImageId + 32) | guest->BalloonColour << 19 | IMAGE_TYPE_REMAP; imageId = (baseImageId + 32) | guest->BalloonColour << 19 | IMAGE_TYPE_REMAP;
PaintAddImageAsChild(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); PaintAddImageAsChild(session, imageId, { 0, 0, peep->z }, { 1, 1, 11 }, { 0, 0, peep->z + 5 });
return; return;
} }
if (baseImageId >= 11197 && baseImageId < 11229) if (baseImageId >= 11197 && baseImageId < 11229)
{ {
imageId = (baseImageId + 32) | guest->UmbrellaColour << 19 | IMAGE_TYPE_REMAP; imageId = (baseImageId + 32) | guest->UmbrellaColour << 19 | IMAGE_TYPE_REMAP;
PaintAddImageAsChild(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5); PaintAddImageAsChild(session, imageId, { 0, 0, peep->z }, { 1, 1, 11 }, { 0, 0, peep->z + 5 });
return; return;
} }
} }

View File

@ -108,7 +108,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 2, 16, 1, 1, 23, height, 3, 16, height + 2); PaintAddImageAsParent(session, imageId, { 2, 16, height }, { 1, 1, 23 }, { 3, 16, height + 2 });
} }
if (!(edges & EDGE_SE)) if (!(edges & EDGE_SE))
{ {
@ -119,7 +119,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 16, 30, 1, 0, 23, height, 16, 29, height + 2); PaintAddImageAsParent(session, imageId, { 16, 30, height }, { 1, 0, 23 }, { 16, 29, height + 2 });
} }
if (!(edges & EDGE_SW)) if (!(edges & EDGE_SW))
@ -131,7 +131,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 30, 16, 0, 1, 23, height, 29, 16, height + 2); PaintAddImageAsParent(session, imageId, { 30, 16, height }, { 0, 1, 23 }, { 29, 16, height + 2 });
} }
if (!(edges & EDGE_NW)) if (!(edges & EDGE_NW))
@ -143,7 +143,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 16, 2, 1, 1, 23, height, 16, 3, height + 2); PaintAddImageAsParent(session, imageId, { 16, 2, height }, { 1, 1, 23 }, { 16, 3, height + 2 });
} }
} }
@ -177,7 +177,7 @@ static void path_bit_bins_paint(
} }
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised) if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
PaintAddImageAsParent(session, imageId, 7, 16, 1, 1, 7, height, 7, 16, height + 2); PaintAddImageAsParent(session, imageId, { 7, 16, height }, { 1, 1, 7 }, { 7, 16, height + 2 });
} }
if (!(edges & EDGE_SE)) if (!(edges & EDGE_SE))
{ {
@ -198,7 +198,7 @@ static void path_bit_bins_paint(
} }
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised) if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
PaintAddImageAsParent(session, imageId, 16, 25, 1, 1, 7, height, 16, 25, height + 2); PaintAddImageAsParent(session, imageId, { 16, 25, height }, { 1, 1, 7 }, { 16, 25, height + 2 });
} }
if (!(edges & EDGE_SW)) if (!(edges & EDGE_SW))
@ -220,7 +220,7 @@ static void path_bit_bins_paint(
} }
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised) if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
PaintAddImageAsParent(session, imageId, 25, 16, 1, 1, 7, height, 25, 16, height + 2); PaintAddImageAsParent(session, imageId, { 25, 16, height }, { 1, 1, 7 }, { 25, 16, height + 2 });
} }
if (!(edges & EDGE_NW)) if (!(edges & EDGE_NW))
@ -242,7 +242,7 @@ static void path_bit_bins_paint(
} }
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised) if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
PaintAddImageAsParent(session, imageId, 16, 7, 1, 1, 7, height, 16, 7, height + 2); PaintAddImageAsParent(session, imageId, { 16, 7, height }, { 1, 1, 7 }, { 16, 7, height + 2 });
} }
} }
@ -262,7 +262,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 7, 16, 0, 16, 7, height, 6, 8, height + 2); PaintAddImageAsParent(session, imageId, { 7, 16, height }, { 0, 16, 7 }, { 6, 8, height + 2 });
} }
if (!(edges & EDGE_SE)) if (!(edges & EDGE_SE))
{ {
@ -273,7 +273,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 16, 25, 16, 0, 7, height, 8, 23, height + 2); PaintAddImageAsParent(session, imageId, { 16, 25, height }, { 16, 0, 7 }, { 8, 23, height + 2 });
} }
if (!(edges & EDGE_SW)) if (!(edges & EDGE_SW))
@ -285,7 +285,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 25, 16, 0, 16, 7, height, 23, 8, height + 2); PaintAddImageAsParent(session, imageId, { 25, 16, height }, { 0, 16, 7 }, { 23, 8, height + 2 });
} }
if (!(edges & EDGE_NW)) if (!(edges & EDGE_NW))
@ -297,7 +297,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId, 16, 7, 16, 0, 7, height, 8, 6, height + 2); PaintAddImageAsParent(session, imageId, { 16, 7, height }, { 16, 0, 7 }, { 8, 6, height + 2 });
} }
} }
@ -311,10 +311,10 @@ static void path_bit_jumping_fountains_paint(
uint32_t imageId = pathBitEntry->image; uint32_t imageId = pathBitEntry->image;
imageId |= pathBitImageFlags; imageId |= pathBitImageFlags;
PaintAddImageAsParent(session, imageId + 1, 0, 0, 1, 1, 2, height, 3, 3, height + 2); PaintAddImageAsParent(session, imageId + 1, { 0, 0, height }, { 1, 1, 2 }, { 3, 3, height + 2 });
PaintAddImageAsParent(session, imageId + 2, 0, 0, 1, 1, 2, height, 3, 29, height + 2); PaintAddImageAsParent(session, imageId + 2, { 0, 0, height }, { 1, 1, 2 }, { 3, 29, height + 2 });
PaintAddImageAsParent(session, imageId + 3, 0, 0, 1, 1, 2, height, 29, 29, height + 2); PaintAddImageAsParent(session, imageId + 3, { 0, 0, height }, { 1, 1, 2 }, { 29, 29, height + 2 });
PaintAddImageAsParent(session, imageId + 4, 0, 0, 1, 1, 2, height, 29, 3, height + 2); PaintAddImageAsParent(session, imageId + 4, { 0, 0, height }, { 1, 1, 2 }, { 29, 3, height + 2 });
} }
/** /**
@ -336,20 +336,20 @@ static void sub_6A4101(
& FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
{ {
case 0: case 0:
PaintAddImageAsParent(session, 22 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2); PaintAddImageAsParent(session, 22 + base_image_id, { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 22 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2); PaintAddImageAsParent(session, 22 + base_image_id, { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 });
break; break;
case 1: case 1:
PaintAddImageAsParent(session, 21 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2); PaintAddImageAsParent(session, 21 + base_image_id, { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 21 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2); PaintAddImageAsParent(session, 21 + base_image_id, { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, 23 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2); PaintAddImageAsParent(session, 23 + base_image_id, { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 23 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2); PaintAddImageAsParent(session, 23 + base_image_id, { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, 20 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2); PaintAddImageAsParent(session, 20 + base_image_id, { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 20 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2); PaintAddImageAsParent(session, 20 + base_image_id, { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 });
break; break;
} }
} }
@ -358,52 +358,52 @@ static void sub_6A4101(
switch (local_ebp) switch (local_ebp)
{ {
case 1: case 1:
PaintAddImageAsParent(session, 17 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 17 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 17 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 17 + base_image_id, { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, 18 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 18 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 18 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 18 + base_image_id, { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, 17 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 17 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent( PaintAddImageAsParent(
session, 18 + base_image_id, 28, 0, 1, 28, 7, height, 28, 4, session, 18 + base_image_id, 28, 0, 1, 28, 7, height, 28, 4,
height + 2); // bound_box_offset_y seems to be a bug height + 2); // bound_box_offset_y seems to be a bug
PaintAddImageAsParent(session, 25 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 25 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 });
break; break;
case 4: case 4:
PaintAddImageAsParent(session, 19 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 19 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 19 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 19 + base_image_id, { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 });
break; break;
case 5: case 5:
PaintAddImageAsParent(session, 15 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 15 + base_image_id, { 0, 4, height }, { 32, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 15 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 15 + base_image_id, { 0, 28, height }, { 32, 1, 7 }, { 0, 28, height + 2 });
break; break;
case 6: case 6:
PaintAddImageAsParent(session, 18 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 18 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 19 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 19 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 26 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2); PaintAddImageAsParent(session, 26 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 });
break; break;
case 8: case 8:
PaintAddImageAsParent(session, 16 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 16 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 16 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 16 + base_image_id, { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 });
break; break;
case 9: case 9:
PaintAddImageAsParent(session, 16 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 16 + base_image_id, { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 });
PaintAddImageAsParent(session, 17 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 17 + base_image_id, { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 });
PaintAddImageAsParent(session, 24 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2); PaintAddImageAsParent(session, 24 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 });
break; break;
case 10: case 10:
PaintAddImageAsParent(session, 14 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 14 + base_image_id, { 4, 0, height }, { 1, 32, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 14 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 14 + base_image_id, { 28, 0, height }, { 1, 32, 7 }, { 28, 0, height + 2 });
break; break;
case 12: case 12:
PaintAddImageAsParent(session, 16 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 16 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent( PaintAddImageAsParent(
session, 19 + base_image_id, 0, 28, 28, 1, 7, height, 4, 28, session, 19 + base_image_id, 0, 28, 28, 1, 7, height, 4, 28,
height + 2); // bound_box_offset_x seems to be a bug height + 2); // bound_box_offset_x seems to be a bug
PaintAddImageAsParent(session, 27 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 27 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 });
break; break;
default: default:
// purposely left empty // purposely left empty
@ -501,20 +501,20 @@ static void sub_6A4101(
& FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
{ {
case 0: case 0:
PaintAddImageAsParent(session, 8 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2); PaintAddImageAsParent(session, 8 + base_image_id, { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 8 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2); PaintAddImageAsParent(session, 8 + base_image_id, { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 });
break; break;
case 1: case 1:
PaintAddImageAsParent(session, 7 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2); PaintAddImageAsParent(session, 7 + base_image_id, { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 7 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2); PaintAddImageAsParent(session, 7 + base_image_id, { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, 9 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2); PaintAddImageAsParent(session, 9 + base_image_id, { 0, 4, height }, { 32, 1, 23 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 9 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2); PaintAddImageAsParent(session, 9 + base_image_id, { 0, 28, height }, { 32, 1, 23 }, { 0, 28, height + 2 });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, 6 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2); PaintAddImageAsParent(session, 6 + base_image_id, { 4, 0, height }, { 1, 32, 23 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 6 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2); PaintAddImageAsParent(session, 6 + base_image_id, { 28, 0, height }, { 1, 32, 23 }, { 28, 0, height + 2 });
break; break;
} }
} }
@ -531,128 +531,128 @@ static void sub_6A4101(
// purposely left empty // purposely left empty
break; break;
case 1: case 1:
PaintAddImageAsParent(session, 3 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 3 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 3 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 3 + base_image_id, { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, 4 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 4 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 4 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 4 + base_image_id, { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 });
break; break;
case 4: case 4:
PaintAddImageAsParent(session, 5 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 5 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 5 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 5 + base_image_id, { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 });
break; break;
case 5: case 5:
PaintAddImageAsParent(session, 1 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 1 + base_image_id, { 0, 4, height }, { 32, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(session, 1 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 1 + base_image_id, { 0, 28, height }, { 32, 1, 7 }, { 0, 28, height + 2 });
break; break;
case 8: case 8:
PaintAddImageAsParent(session, 2 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 2 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 2 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 2 + base_image_id, { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 });
break; break;
case 10: case 10:
PaintAddImageAsParent(session, 0 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 0 + base_image_id, { 4, 0, height }, { 1, 32, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 0 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 0 + base_image_id, { 28, 0, height }, { 1, 32, 7 }, { 28, 0, height + 2 });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, 3 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 3 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent( PaintAddImageAsParent(
session, 4 + base_image_id, 28, 0, 1, 28, 7, height, 28, 4, session, 4 + base_image_id, 28, 0, 1, 28, 7, height, 28, 4,
height + 2); // bound_box_offset_y seems to be a bug height + 2); // bound_box_offset_y seems to be a bug
if (!(drawnCorners & FOOTPATH_CORNER_0)) if (!(drawnCorners & FOOTPATH_CORNER_0))
{ {
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 11 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 });
} }
break; break;
case 6: case 6:
PaintAddImageAsParent(session, 4 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 4 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(session, 5 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 5 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
if (!(drawnCorners & FOOTPATH_CORNER_1)) if (!(drawnCorners & FOOTPATH_CORNER_1))
{ {
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2); PaintAddImageAsParent(session, 12 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 });
} }
break; break;
case 9: case 9:
PaintAddImageAsParent(session, 2 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 2 + base_image_id, { 28, 0, height }, { 1, 28, 7 }, { 28, 0, height + 2 });
PaintAddImageAsParent(session, 3 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 3 + base_image_id, { 0, 28, height }, { 28, 1, 7 }, { 0, 28, height + 2 });
if (!(drawnCorners & FOOTPATH_CORNER_3)) if (!(drawnCorners & FOOTPATH_CORNER_3))
{ {
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2); PaintAddImageAsParent(session, 10 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 });
} }
break; break;
case 12: case 12:
PaintAddImageAsParent(session, 2 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 2 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent( PaintAddImageAsParent(
session, 5 + base_image_id, 0, 28, 28, 1, 7, height, 4, 28, session, 5 + base_image_id, 0, 28, 28, 1, 7, height, 4, 28,
height + 2); // bound_box_offset_x seems to be a bug height + 2); // bound_box_offset_x seems to be a bug
if (!(drawnCorners & FOOTPATH_CORNER_2)) if (!(drawnCorners & FOOTPATH_CORNER_2))
{ {
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 13 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 });
} }
break; break;
case 7: case 7:
PaintAddImageAsParent(session, 1 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2); PaintAddImageAsParent(session, 1 + base_image_id, { 0, 4, height }, { 32, 1, 7 }, { 0, 4, height + 2 });
if (!(drawnCorners & FOOTPATH_CORNER_0)) if (!(drawnCorners & FOOTPATH_CORNER_0))
{ {
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 11 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 });
} }
if (!(drawnCorners & FOOTPATH_CORNER_1)) if (!(drawnCorners & FOOTPATH_CORNER_1))
{ {
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2); PaintAddImageAsParent(session, 12 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 });
} }
break; break;
case 13: case 13:
PaintAddImageAsParent(session, 1 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 1 + base_image_id, { 0, 28, height }, { 32, 1, 7 }, { 0, 28, height + 2 });
if (!(drawnCorners & FOOTPATH_CORNER_2)) if (!(drawnCorners & FOOTPATH_CORNER_2))
{ {
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 13 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 });
} }
if (!(drawnCorners & FOOTPATH_CORNER_3)) if (!(drawnCorners & FOOTPATH_CORNER_3))
{ {
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2); PaintAddImageAsParent(session, 10 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 });
} }
break; break;
case 14: case 14:
PaintAddImageAsParent(session, 0 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2); PaintAddImageAsParent(session, 0 + base_image_id, { 4, 0, height }, { 1, 32, 7 }, { 4, 0, height + 2 });
if (!(drawnCorners & FOOTPATH_CORNER_1)) if (!(drawnCorners & FOOTPATH_CORNER_1))
{ {
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2); PaintAddImageAsParent(session, 12 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 });
} }
if (!(drawnCorners & FOOTPATH_CORNER_2)) if (!(drawnCorners & FOOTPATH_CORNER_2))
{ {
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 13 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 });
} }
break; break;
case 11: case 11:
PaintAddImageAsParent(session, 0 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 0 + base_image_id, { 28, 0, height }, { 1, 32, 7 }, { 28, 0, height + 2 });
if (!(drawnCorners & FOOTPATH_CORNER_0)) if (!(drawnCorners & FOOTPATH_CORNER_0))
{ {
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 11 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 });
} }
if (!(drawnCorners & FOOTPATH_CORNER_3)) if (!(drawnCorners & FOOTPATH_CORNER_3))
{ {
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2); PaintAddImageAsParent(session, 10 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 });
} }
break; break;
case 15: case 15:
if (!(drawnCorners & FOOTPATH_CORNER_0)) if (!(drawnCorners & FOOTPATH_CORNER_0))
{ {
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2); PaintAddImageAsParent(session, 11 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 });
} }
if (!(drawnCorners & FOOTPATH_CORNER_1)) if (!(drawnCorners & FOOTPATH_CORNER_1))
{ {
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2); PaintAddImageAsParent(session, 12 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 28, height + 2 });
} }
if (!(drawnCorners & FOOTPATH_CORNER_2)) if (!(drawnCorners & FOOTPATH_CORNER_2))
{ {
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2); PaintAddImageAsParent(session, 13 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 });
} }
if (!(drawnCorners & FOOTPATH_CORNER_3)) if (!(drawnCorners & FOOTPATH_CORNER_3))
{ {
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2); PaintAddImageAsParent(session, 10 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 0, height + 2 });
} }
break; break;
} }
@ -937,7 +937,7 @@ void path_paint(paint_session* session, uint16_t height, const TileElement* tile
uint32_t imageId = (SPR_HEIGHT_MARKER_BASE + heightMarkerBaseZ / 16) | COLOUR_GREY << 19 | IMAGE_TYPE_REMAP; uint32_t imageId = (SPR_HEIGHT_MARKER_BASE + heightMarkerBaseZ / 16) | COLOUR_GREY << 19 | IMAGE_TYPE_REMAP;
imageId += get_height_marker_offset(); imageId += get_height_marker_offset();
imageId -= gMapBaseZ; imageId -= gMapBaseZ;
PaintAddImageAsParent(session, imageId, 16, 16, 1, 1, 0, heightMarkerBaseZ); PaintAddImageAsParent(session, imageId, { 16, 16, heightMarkerBaseZ }, { 1, 1, 0 });
} }
PathSurfaceEntry* footpathEntry = tile_element->AsPath()->GetSurfaceEntry(); PathSurfaceEntry* footpathEntry = tile_element->AsPath()->GetSurfaceEntry();

View File

@ -657,8 +657,7 @@ static void viewport_surface_draw_tile_side_bottom(
if (curHeight != cornerHeight1 && curHeight != cornerHeight2) if (curHeight != cornerHeight1 && curHeight != cornerHeight2)
{ {
uint32_t image_id = base_image_id + image_offset; uint32_t image_id = base_image_id + image_offset;
PaintAddImageAsParent( PaintAddImageAsParent(session, image_id, { offset, curHeight * COORDS_Z_PER_TINY_Z }, { bounds, 15 });
session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, curHeight * COORDS_Z_PER_TINY_Z);
curHeight++; curHeight++;
} }
} }
@ -682,8 +681,7 @@ static void viewport_surface_draw_tile_side_bottom(
} }
const uint32_t image_id = base_image_id + image_offset; const uint32_t image_id = base_image_id + image_offset;
PaintAddImageAsParent( PaintAddImageAsParent(session, image_id, { offset, curHeight * COORDS_Z_PER_TINY_Z }, { bounds, 15 });
session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, curHeight * COORDS_Z_PER_TINY_Z);
return; return;
} }
@ -698,8 +696,7 @@ static void viewport_surface_draw_tile_side_bottom(
if (isWater || curHeight != tunnelArray[tunnelIndex].height) if (isWater || curHeight != tunnelArray[tunnelIndex].height)
{ {
PaintAddImageAsParent( PaintAddImageAsParent(session, base_image_id, { offset, curHeight * COORDS_Z_PER_TINY_Z }, { bounds, 15 });
session, base_image_id, offset.x, offset.y, bounds.x, bounds.y, 15, curHeight * COORDS_Z_PER_TINY_Z);
curHeight++; curHeight++;
continue; continue;
@ -728,8 +725,8 @@ static void viewport_surface_draw_tile_side_bottom(
uint32_t image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0); uint32_t image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0);
PaintAddImageAsParent( PaintAddImageAsParent(
session, image_id, offset.x, offset.y, tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1, zOffset, 0, 0, session, image_id, { offset, zOffset }, { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 },
boundBoxOffsetZ); { 0, 0, boundBoxOffsetZ });
boundBoxOffsetZ = curHeight * COORDS_Z_PER_TINY_Z; boundBoxOffsetZ = curHeight * COORDS_Z_PER_TINY_Z;
boundBoxLength = _tunnelHeights[tunnelType][1] * 16; boundBoxLength = _tunnelHeights[tunnelType][1] * 16;
@ -742,8 +739,9 @@ static void viewport_surface_draw_tile_side_bottom(
image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0) + 1; image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0) + 1;
PaintAddImageAsParent( PaintAddImageAsParent(
session, image_id, offset.x, offset.y, tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1, session, image_id, { offset, curHeight * COORDS_Z_PER_TINY_Z },
curHeight * COORDS_Z_PER_TINY_Z, tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ); { tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1 },
{ tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ });
curHeight += _tunnelHeights[tunnelType][0]; curHeight += _tunnelHeights[tunnelType][0];
tunnelIndex++; tunnelIndex++;
@ -877,7 +875,7 @@ static void viewport_surface_draw_tile_side_top(
{ {
const uint32_t image_id = base_image_id + image_offset; const uint32_t image_id = base_image_id + image_offset;
PaintAddImageAsParent( PaintAddImageAsParent(
session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, cur_height * COORDS_Z_PER_TINY_Z); session, image_id, { offset.x, offset.y, cur_height * COORDS_Z_PER_TINY_Z }, { bounds.x, bounds.y, 15 });
cur_height++; cur_height++;
} }
} }
@ -892,8 +890,7 @@ static void viewport_surface_draw_tile_side_top(
while (cur_height < cornerHeight1 && cur_height < neighbourCornerHeight1) while (cur_height < cornerHeight1 && cur_height < neighbourCornerHeight1)
{ {
PaintAddImageAsParent( PaintAddImageAsParent(session, base_image_id, { offset, cur_height * COORDS_Z_PER_TINY_Z }, { bounds, 15 });
session, base_image_id, offset.x, offset.y, bounds.x, bounds.y, 15, cur_height * COORDS_Z_PER_TINY_Z);
cur_height++; cur_height++;
} }
@ -909,7 +906,7 @@ static void viewport_surface_draw_tile_side_top(
} }
const uint32_t image_id = base_image_id + image_offset; const uint32_t image_id = base_image_id + image_offset;
PaintAddImageAsParent(session, image_id, offset.x, offset.y, bounds.x, bounds.y, 15, cur_height * COORDS_Z_PER_TINY_Z); PaintAddImageAsParent(session, image_id, { offset, cur_height * COORDS_Z_PER_TINY_Z }, { bounds, 15 });
} }
/** /**
@ -1049,10 +1046,10 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
if (session->VerticalTunnelHeight * COORDS_Z_PER_TINY_Z == height) if (session->VerticalTunnelHeight * COORDS_Z_PER_TINY_Z == height)
{ {
// Vertical tunnels // Vertical tunnels
PaintAddImageAsParent(session, 1575, 0, 0, 1, 30, 39, height, -2, 1, height - 40); PaintAddImageAsParent(session, 1575, { 0, 0, height }, { 1, 30, 39 }, { -2, 1, height - 40 });
PaintAddImageAsParent(session, 1576, 0, 0, 30, 1, 0, height, 1, 31, height); PaintAddImageAsParent(session, 1576, { 0, 0, height }, { 30, 1, 0 }, { 1, 31, height });
PaintAddImageAsParent(session, 1577, 0, 0, 1, 30, 0, height, 31, 1, height); PaintAddImageAsParent(session, 1577, { 0, 0, height }, { 1, 30, 0 }, { 31, 1, height });
PaintAddImageAsParent(session, 1578, 0, 0, 30, 1, 39, height, 1, -2, height - 40); PaintAddImageAsParent(session, 1578, { 0, 0, height }, { 30, 1, 39 }, { 1, -2, height - 40 });
} }
else else
{ {
@ -1081,7 +1078,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
imageId |= 0x41880000; imageId |= 0x41880000;
} }
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, -1, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, -1 });
has_surface = true; has_surface = true;
} }
@ -1124,7 +1121,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
image_id |= patrolColour << 19; image_id |= patrolColour << 19;
paint_struct* backup = session->LastPS; paint_struct* backup = session->LastPS;
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, 1, local_height); PaintAddImageAsParent(session, image_id, { 0, 0, local_height }, { 32, 32, 1 });
session->LastPS = backup; session->LastPS = backup;
} }
} }
@ -1142,7 +1139,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
const int32_t offset = (direction_reverse(spawn.direction) + rotation) & 3; const int32_t offset = (direction_reverse(spawn.direction) + rotation) & 3;
const uint32_t image_id = (PEEP_SPAWN_ARROW_0 + offset) | 0x20380000; const uint32_t image_id = (PEEP_SPAWN_ARROW_0 + offset) | 0x20380000;
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, 19, spawn.z); PaintAddImageAsParent(session, image_id, { 0, 0, spawn.z }, { 32, 32, 19 });
} }
} }
} }
@ -1160,7 +1157,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
const CoordsXY& pos = session->MapPosition; const CoordsXY& pos = session->MapPosition;
const int32_t height2 = (tile_element_height({ pos.x + 16, pos.y + 16 })) + 3; const int32_t height2 = (tile_element_height({ pos.x + 16, pos.y + 16 })) + 3;
paint_struct* backup = session->LastPS; paint_struct* backup = session->LastPS;
PaintAddImageAsParent(session, SPR_LAND_OWNERSHIP_AVAILABLE, 16, 16, 1, 1, 0, height2); PaintAddImageAsParent(session, SPR_LAND_OWNERSHIP_AVAILABLE, { 16, 16, height2 }, { 1, 1, 0 });
session->LastPS = backup; session->LastPS = backup;
} }
} }
@ -1177,7 +1174,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
const CoordsXY& pos = session->MapPosition; const CoordsXY& pos = session->MapPosition;
const int32_t height2 = tile_element_height({ pos.x + 16, pos.y + 16 }); const int32_t height2 = tile_element_height({ pos.x + 16, pos.y + 16 });
paint_struct* backup = session->LastPS; paint_struct* backup = session->LastPS;
PaintAddImageAsParent(session, SPR_LAND_CONSTRUCTION_RIGHTS_AVAILABLE, 16, 16, 1, 1, 0, height2 + 3); PaintAddImageAsParent(session, SPR_LAND_CONSTRUCTION_RIGHTS_AVAILABLE, { 16, 16, height2 + 3 }, { 1, 1, 0 });
session->LastPS = backup; session->LastPS = backup;
} }
} }
@ -1232,7 +1229,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
const int32_t image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape]) | 0x21300000; const int32_t image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape]) | 0x21300000;
paint_struct* backup = session->LastPS; paint_struct* backup = session->LastPS;
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, 1, local_height); PaintAddImageAsParent(session, image_id, { 0, 0, local_height }, { 32, 32, 1 });
session->LastPS = backup; session->LastPS = backup;
} }
} }
@ -1314,7 +1311,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
const int32_t image_id = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT const int32_t image_id = (SPR_WATER_MASK + image_offset) | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT
| EnumValue(FilterPaletteID::PaletteWater) << 19; | EnumValue(FilterPaletteID::PaletteWater) << 19;
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, -1, waterHeight); PaintAddImageAsParent(session, image_id, { 0, 0, waterHeight }, { 32, 32, -1 });
const bool transparent = gConfigGeneral.transparent_water || (session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE); const bool transparent = gConfigGeneral.transparent_water || (session->ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE);
const uint32_t overlayStart = transparent ? SPR_WATER_OVERLAY : SPR_RCT1_WATER_OVERLAY; const uint32_t overlayStart = transparent ? SPR_WATER_OVERLAY : SPR_RCT1_WATER_OVERLAY;
@ -1393,8 +1390,8 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
} }
PaintAddImageAsParent( PaintAddImageAsParent(
session, image_id, fenceData.offset.x, fenceData.offset.y, fenceData.box_size.x, fenceData.box_size.y, 9, session, image_id, { fenceData.offset, local_height }, { fenceData.box_size, 9 },
local_height, fenceData.box_offset.x, fenceData.box_offset.y, local_height + 1); { fenceData.box_offset, local_height + 1 });
} }
} }

View File

@ -124,7 +124,7 @@ static void blank_tiles_paint(paint_session* session, int32_t x, int32_t y)
session->SpritePosition.x = x; session->SpritePosition.x = x;
session->SpritePosition.y = y; session->SpritePosition.y = y;
session->InteractionType = ViewportInteractionItem::None; session->InteractionType = ViewportInteractionItem::None;
PaintAddImageAsParent(session, SPR_BLANK_TILE, 0, 0, 32, 32, -1, 16); PaintAddImageAsParent(session, SPR_BLANK_TILE, { 0, 0, 16 }, { 32, 32, -1 });
} }
bool gShowSupportSegmentHeights = false; bool gShowSupportSegmentHeights = false;
@ -200,7 +200,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
session->SpritePosition.y = y; session->SpritePosition.y = y;
session->InteractionType = ViewportInteractionItem::None; session->InteractionType = ViewportInteractionItem::None;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, -1, arrowZ, 0, 0, arrowZ + 18); PaintAddImageAsParent(session, imageId, { 0, 0, arrowZ }, { 32, 32, -1 }, { 0, 0, arrowZ + 18 });
} }
int32_t bx = dx + 52; int32_t bx = dx + 52;
@ -371,8 +371,8 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
int32_t xOffset = sy * 10; int32_t xOffset = sy * 10;
int32_t yOffset = -22 + sx * 10; int32_t yOffset = -22 + sx * 10;
paint_struct* ps = PaintAddImageAsParent( paint_struct* ps = PaintAddImageAsParent(
session, 5504 | imageColourFlats, xOffset, yOffset, 10, 10, 1, segmentHeight, xOffset + 1, yOffset + 16, session, 5504 | imageColourFlats, { xOffset, yOffset, segmentHeight }, { 10, 10, 1 },
segmentHeight); { xOffset + 1, yOffset + 16, segmentHeight });
if (ps != nullptr) if (ps != nullptr)
{ {
ps->flags &= PAINT_STRUCT_FLAG_IS_MASKED; ps->flags &= PAINT_STRUCT_FLAG_IS_MASKED;

View File

@ -251,7 +251,7 @@ void track_paint_util_paint_floor(
imageId = floorSprites[3]; imageId = floorSprites[3];
} }
PaintAddImageAsParent(session, imageId | colourFlags, 0, 0, 32, 32, 1, height, 0, 0, height); PaintAddImageAsParent(session, imageId | colourFlags, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
} }
void track_paint_util_paint_fences( void track_paint_util_paint_fences(
@ -273,12 +273,12 @@ void track_paint_util_paint_fences(
if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, rotation)) if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, rotation))
{ {
imageId = fenceSprites[1] | colourFlags; imageId = fenceSprites[1] | colourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 7, height, 0, 30, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 30, height + 2 });
} }
if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, rotation)) if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, rotation))
{ {
imageId = fenceSprites[2] | colourFlags; imageId = fenceSprites[2] | colourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 7, height, 30, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 30, 0, height + 2 });
} }
} }
@ -363,7 +363,7 @@ static void track_paint_util_draw_station_impl(
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE) imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 0, 32, 8, 1, height + fenceOffsetA); PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 32, 8, 1 });
// height -= 5 (height) // height -= 5 (height)
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, coverHeight); track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, coverHeight);
// height += 5 (height + 5) // height += 5 (height + 5)
@ -381,7 +381,7 @@ static void track_paint_util_draw_station_impl(
{ {
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height + fenceOffsetA); PaintAddImageAsParent(session, imageId, { 0, 24, height + fenceOffsetA }, { 32, 8, 1 });
// height += 2 (height + 7) // height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, session->CurrentRotation);
@ -399,19 +399,19 @@ static void track_paint_util_draw_station_impl(
{ {
imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 32, 1, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0)
{ {
// Addition: draw only small fence if there is an entrance/exit at the beginning // Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 23, 1, 8, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 31, 23, height + fenceOffsetB }, { 1, 8, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2)
{ {
// Addition: draw only small fence if there is an entrance/exit at the end // Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 23, 1, 8, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 31, 23, height + fenceOffsetB }, { 1, 8, 7 });
} }
// height -= 7 (height) // height -= 7 (height)
track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, coverHeight); track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, coverHeight);
@ -420,12 +420,12 @@ static void track_paint_util_draw_station_impl(
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0) if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0)
{ {
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 8, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 8, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2)
{ {
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 8, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 8, 7 });
} }
} }
else if (direction == 1 || direction == 3) else if (direction == 1 || direction == 3)
@ -458,7 +458,7 @@ static void track_paint_util_draw_station_impl(
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE) imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 0, 8, 32, 1, height + fenceOffsetA); PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 8, 32, 1 });
// height -= 5 (height) // height -= 5 (height)
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, coverHeight); track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, coverHeight);
// height += 5 (height + 5) // height += 5 (height + 5)
@ -476,7 +476,7 @@ static void track_paint_util_draw_station_impl(
{ {
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height + fenceOffsetA); PaintAddImageAsParent(session, imageId, { 24, 0, height + fenceOffsetA }, { 8, 32, 1 });
// height += 2 (height + 7) // height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation);
@ -494,19 +494,19 @@ static void track_paint_util_draw_station_impl(
{ {
imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 31, 0, height + fenceOffsetB }, { 1, 32, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3)
{ {
// Addition: draw only small fence if there is an entrance/exit at the beginning // Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 23, 31, 8, 1, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 23, 31, height + fenceOffsetB }, { 8, 1, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1)
{ {
// Addition: draw only small fence if there is an entrance/exit at the end // Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 23, 31, 8, 1, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 23, 31, height + fenceOffsetB }, { 8, 1, 7 });
} }
// height -= 7 (height) // height -= 7 (height)
@ -516,12 +516,12 @@ static void track_paint_util_draw_station_impl(
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3) if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3)
{ {
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 31, 8, 1, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 8, 1, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1)
{ {
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 31, 8, 1, 7, height + fenceOffsetB); PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 8, 1, 7 });
} }
} }
} }
@ -571,7 +571,7 @@ void track_paint_util_draw_station_inverted(
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE) imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 0, 32, 8, 1, height + 6); PaintAddImageAsParent(session, imageId, { 0, 0, height + 6 }, { 32, 8, 1 });
// height -= 5 (height) // height -= 5 (height)
track_paint_util_draw_station_covers_2(session, EDGE_NW, hasFence, stationObj, height, stationVariant); track_paint_util_draw_station_covers_2(session, EDGE_NW, hasFence, stationObj, height, stationVariant);
// height += 5 (height + 5) // height += 5 (height + 5)
@ -589,7 +589,7 @@ void track_paint_util_draw_station_inverted(
{ {
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height + 6); PaintAddImageAsParent(session, imageId, { 0, 24, height + 6 }, { 32, 8, 1 });
// height += 2 (height + 7) // height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, session->CurrentRotation);
@ -607,19 +607,19 @@ void track_paint_util_draw_station_inverted(
{ {
imageId = SPR_STATION_INVERTED_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_INVERTED_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + 8); PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 32, 1, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0)
{ {
// Addition: draw only small fence if there is an entrance/exit at the beginning // Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 23, 1, 8, 7, height + 8); PaintAddImageAsParent(session, imageId, { 31, 23, height + 8 }, { 1, 8, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2)
{ {
// Addition: draw only small fence if there is an entrance/exit at the end // Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 23, 1, 8, 7, height + 8); PaintAddImageAsParent(session, imageId, { 31, 23, height + 8 }, { 1, 8, 7 });
} }
// height -= 7 (height) // height -= 7 (height)
track_paint_util_draw_station_covers_2(session, EDGE_SE, hasFence, stationObj, height, stationVariant); track_paint_util_draw_station_covers_2(session, EDGE_SE, hasFence, stationObj, height, stationVariant);
@ -628,12 +628,12 @@ void track_paint_util_draw_station_inverted(
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0) if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 0)
{ {
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 8, 7, height + 8); PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 8, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 2)
{ {
imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NE_SW | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 8, 7, height + 8); PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 8, 7 });
} }
} }
else if (direction == 1 || direction == 3) else if (direction == 1 || direction == 3)
@ -666,7 +666,7 @@ void track_paint_util_draw_station_inverted(
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE) imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 0, 0, 8, 32, 1, height + 6); PaintAddImageAsParent(session, imageId, { 0, 0, height + 6 }, { 8, 32, 1 });
// height -= 5 (height) // height -= 5 (height)
track_paint_util_draw_station_covers_2(session, EDGE_NE, hasFence, stationObj, height, stationVariant); track_paint_util_draw_station_covers_2(session, EDGE_NE, hasFence, stationObj, height, stationVariant);
// height += 5 (height + 5) // height += 5 (height + 5)
@ -684,7 +684,7 @@ void track_paint_util_draw_station_inverted(
{ {
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height + 6); PaintAddImageAsParent(session, imageId, { 24, 0, height + 6 }, { 8, 32, 1 });
// height += 2 (height + 7) // height += 2 (height + 7)
hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation);
@ -702,19 +702,19 @@ void track_paint_util_draw_station_inverted(
{ {
imageId = SPR_STATION_INVERTED_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_INVERTED_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + 8); PaintAddImageAsParent(session, imageId, { 31, 0, height + 8 }, { 1, 32, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3)
{ {
// Addition: draw only small fence if there is an entrance/exit at the beginning // Addition: draw only small fence if there is an entrance/exit at the beginning
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 23, 31, 8, 1, 7, height + 8); PaintAddImageAsParent(session, imageId, { 23, 31, height + 8 }, { 8, 1, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1)
{ {
// Addition: draw only small fence if there is an entrance/exit at the end // Addition: draw only small fence if there is an entrance/exit at the end
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 23, 31, 8, 1, 7, height + 8); PaintAddImageAsParent(session, imageId, { 23, 31, height + 8 }, { 8, 1, 7 });
} }
// height -= 7 (height) // height -= 7 (height)
@ -724,12 +724,12 @@ void track_paint_util_draw_station_inverted(
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3) if (tileElement->AsTrack()->GetTrackType() == TrackElemType::BeginStation && direction == 3)
{ {
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 31, 8, 1, 7, height + 8); PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 8, 1, 7 });
} }
else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1) else if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && direction == 1)
{ {
imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_LIGHT_BACK_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 31, 8, 1, 7, height + 8); PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 8, 1, 7 });
} }
} }
} }
@ -847,17 +847,17 @@ void track_paint_util_draw_station_platform(
bool hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation); bool hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation);
uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE) uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 8, 32, 1, height + zOffset); PaintAddImageAsParent(session, imageId, { 0, 0, height + zOffset }, { 8, 32, 1 });
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
imageId = SPR_STATION_NARROW_EDGE_SW | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_NARROW_EDGE_SW | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height + zOffset); PaintAddImageAsParent(session, imageId, { 24, 0, height + zOffset }, { 8, 32, 1 });
hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation);
if (hasFence) if (hasFence)
{ {
imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + zOffset + 2); PaintAddImageAsParent(session, imageId, { 31, 0, height + zOffset + 2 }, { 1, 32, 7 });
} }
track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height);
} }
@ -866,17 +866,17 @@ void track_paint_util_draw_station_platform(
bool hasFence = track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, session->CurrentRotation); bool hasFence = track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, session->CurrentRotation);
uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW) uint32_t imageId = (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 8, 1, height + zOffset); PaintAddImageAsParent(session, imageId, { 0, 0, height + zOffset }, { 32, 8, 1 });
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
imageId = SPR_STATION_NARROW_EDGE_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_NARROW_EDGE_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height + zOffset); PaintAddImageAsParent(session, imageId, { 0, 24, height + zOffset }, { 32, 8, 1 });
hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, session->CurrentRotation);
if (hasFence) if (hasFence)
{ {
imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + zOffset + 2); PaintAddImageAsParent(session, imageId, { 0, 31, height + zOffset + 2 }, { 32, 1, 7 });
} }
track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height);
} }
@ -894,17 +894,17 @@ void track_paint_util_draw_pier(
hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation);
imageId = (hasFence ? SPR_STATION_PIER_EDGE_NE_FENCED : SPR_STATION_PIER_EDGE_NE) imageId = (hasFence ? SPR_STATION_PIER_EDGE_NE_FENCED : SPR_STATION_PIER_EDGE_NE)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 1, height, 2, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 1 }, { 2, 0, height });
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
imageId = SPR_STATION_PIER_EDGE_SW | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PIER_EDGE_SW | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height); PaintAddImageAsParent(session, imageId, { 24, 0, height }, { 8, 32, 1 });
hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation); hasFence = track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation);
if (hasFence) if (hasFence)
{ {
imageId = SPR_STATION_PIER_FENCE_SW | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PIER_FENCE_SW | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + 2); PaintAddImageAsParent(session, imageId, { 31, 0, height + 2 }, { 1, 32, 7 });
} }
track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height);
} }
@ -913,17 +913,17 @@ void track_paint_util_draw_pier(
hasFence = track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, rotation); hasFence = track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, rotation);
imageId = (hasFence ? SPR_STATION_PIER_EDGE_NW_FENCED : SPR_STATION_PIER_EDGE_NW) imageId = (hasFence ? SPR_STATION_PIER_EDGE_NW_FENCED : SPR_STATION_PIER_EDGE_NW)
| session->TrackColours[SCHEME_SUPPORTS]; | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 1, height, 0, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 1 }, { 0, 2, height });
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
imageId = SPR_STATION_PIER_EDGE_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PIER_EDGE_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height); PaintAddImageAsParent(session, imageId, { 0, 24, height }, { 32, 8, 1 });
hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, rotation); hasFence = track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, rotation);
if (hasFence) if (hasFence)
{ {
imageId = SPR_STATION_PIER_FENCE_SE | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_STATION_PIER_FENCE_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + 2); PaintAddImageAsParent(session, imageId, { 0, 31, height + 2 }, { 32, 1, 7 });
} }
track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height);
} }
@ -1654,13 +1654,16 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 16, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 16, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
} }
break; break;
@ -1669,13 +1672,16 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 0, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
} }
break; break;
@ -1684,13 +1690,16 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 0, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
} }
break; break;
@ -1699,13 +1708,16 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 16, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 16, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
} }
break; break;
@ -1847,13 +1859,16 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 0, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
} }
break; break;
@ -1862,13 +1877,16 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 0, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
} }
break; break;
@ -1877,13 +1895,16 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 16, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 0, 16, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
} }
break; break;
@ -1892,13 +1913,16 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence) switch (trackSequence)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 20, 32, thickness }, { 6, 0, height + heightOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 16, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 16, 16, thickness }, { 16, 16, height + heightOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 32, 20, thickness }, { 0, 6, height + heightOffset });
break; break;
} }
break; break;
@ -1938,16 +1962,20 @@ void track_paint_util_left_quarter_turn_1_tile_paint(
switch (direction) switch (direction)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 24, thickness, height, 6, 2, height + boundBoxZOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 26, 24, thickness }, { 6, 2, height + boundBoxZOffset });
break; break;
case 1: case 1:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 26, thickness, height, 0, 0, height + boundBoxZOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 26, 26, thickness }, { 0, 0, height + boundBoxZOffset });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 24, 26, thickness, height, 2, 6, height + boundBoxZOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 24, 26, thickness }, { 2, 6, height + boundBoxZOffset });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 24, 24, thickness, height, 6, 6, height + boundBoxZOffset); PaintAddImageAsParent(
session, imageId, { 0, 0, height }, { 24, 24, thickness }, { 6, 6, height + boundBoxZOffset });
break; break;
} }
} }
@ -2003,11 +2031,11 @@ void track_paint_util_spinning_tunnel_paint(paint_session* session, int8_t thick
imageId = trackSpritesGhostTrainSpinningTunnel[direction & 1][1][frame] | colourFlags; imageId = trackSpritesGhostTrainSpinningTunnel[direction & 1][1][frame] | colourFlags;
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 26, 1, 23, height, 4, 28, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 1, 23 }, { 4, 28, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 26, 23, height, 28, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 26, 23 }, { 28, 4, height });
} }
} }
@ -2027,24 +2055,24 @@ void track_paint_util_onride_photo_small_paint(
switch (direction) switch (direction)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 26, 0, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 26, 0, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 26, 31, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 26, 31, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 6, 0, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 6, 0, height }, { 1, 1, 19 });
break; break;
case 1: case 1:
PaintAddImageAsParent(session, imageId, 0, 6, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 31, 6, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 31, 6, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 0, 26, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 0, 26, height }, { 1, 1, 19 });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 6, 0, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 6, 31, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 6, 31, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 26, 31, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 26, 31, height }, { 1, 1, 19 });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 26, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 0, 26, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 31, 26, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 31, 26, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 31, 6, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 31, 6, height }, { 1, 1, 19 });
break; break;
} }
} }
@ -2065,24 +2093,24 @@ void track_paint_util_onride_photo_paint(
switch (direction) switch (direction)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 26, 0, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 26, 0, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 26, 31, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 26, 31, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 6, 0, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 6, 0, height }, { 1, 1, 19 });
break; break;
case 1: case 1:
PaintAddImageAsParent(session, imageId, 0, 6, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 31, 6, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 31, 6, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 0, 26, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 0, 26, height }, { 1, 1, 19 });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 6, 0, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 6, 31, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 6, 31, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 26, 31, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 26, 31, height }, { 1, 1, 19 });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 26, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 0, 26, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, imageId, 31, 26, 1, 1, 19, height); PaintAddImageAsParent(session, imageId, { 31, 26, height }, { 1, 1, 19 });
PaintAddImageAsParent(session, flashImageId, 31, 6, 1, 1, 19, height); PaintAddImageAsParent(session, flashImageId, { 31, 6, height }, { 1, 1, 19 });
break; break;
} }
} }
@ -2162,7 +2190,8 @@ void track_paint(paint_session* session, Direction direction, int32_t height, co
uint32_t imageId = SPRITE_ID_PALETTE_COLOUR_1(COLOUR_LIGHT_BLUE) | (0x1689 + get_height_marker_offset()); uint32_t imageId = SPRITE_ID_PALETTE_COLOUR_1(COLOUR_LIGHT_BLUE) | (0x1689 + get_height_marker_offset());
auto heightNum = (height + 8) / 16 - gMapBaseZ; auto heightNum = (height + 8) / 16 - gMapBaseZ;
PaintAddImageAsParent(session, imageId + heightNum, 16, 16, 1, 1, 0, height + ax + 3, 1000, 1000, 2047); PaintAddImageAsParent(
session, imageId + heightNum, { 16, 16, height + ax + 3 }, { 1, 1, 0 }, { 1000, 1000, 2047 });
} }
} }

View File

@ -437,13 +437,13 @@ static void air_powered_vertical_rc_track_banked_right_quarter_turn_5(
{ {
uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_NW_SW_PART_4 uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_NW_SW_PART_4
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height });
} }
else if (direction == 3 && trackSequence == 0) else if (direction == 3 && trackSequence == 0)
{ {
uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0 uint32_t imageId = SPR_AIR_POWERED_VERTICAL_RC_BANKED_QUARTER_TURN_5_FRONT_SE_NE_PART_0
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height });
} }
track_paint_util_right_quarter_turn_5_tiles_wooden_supports(session, height, direction, trackSequence); track_paint_util_right_quarter_turn_5_tiles_wooden_supports(session, height, direction, trackSequence);
@ -729,7 +729,7 @@ static void air_powered_vertical_rc_track_vertical_slope_up(
{ {
floorImageId = SPR_FLOOR_PLANKS | session->TrackColours[SCHEME_SUPPORTS]; floorImageId = SPR_FLOOR_PLANKS | session->TrackColours[SCHEME_SUPPORTS];
} }
PaintAddImageAsParent(session, floorImageId, 0, 0, 26, 26, 126, height, 3, 3, height); PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { 26, 26, 126 }, { 3, 3, height });
PaintAddImageAsChildRotated(session, direction, supportsImageId, 0, 0, 26, 26, 126, height, 3, 3, height); PaintAddImageAsChildRotated(session, direction, supportsImageId, 0, 0, 26, 26, 126, height, 3, 3, height);
} }
else else
@ -913,13 +913,13 @@ static void air_powered_vertical_rc_track_booster(
if (direction & 1) if (direction & 1)
{ {
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE | colour; uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_NW_SE | colour;
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
} }
else else
{ {
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE | colour; uint32_t imageId = SPR_REVERSE_FREEFALL_RC_FLAT_SW_NE | colour;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
} }

View File

@ -1651,7 +1651,7 @@ void junior_rc_paint_station(
{ {
// height -= 2 (height - 2) // height -= 2 (height - 2)
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC]; imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height });
// height += 2 (height) // height += 2 (height)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER) if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER)
@ -1673,7 +1673,7 @@ void junior_rc_paint_station(
{ {
// height -= 2 (height - 2) // height -= 2 (height - 2)
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC]; imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height });
// height += 2 (height) // height += 2 (height)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER) if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER)
@ -1897,13 +1897,13 @@ static void junior_rc_flat_to_left_bank_paint_setup(
image_id = junior_rc_track_pieces_flat_to_left_bank[direction][0] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_flat_to_left_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height, 0); paint_util_push_tunnel_right(session, height, 0);
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height, 0); paint_util_push_tunnel_left(session, height, 0);
} }
@ -1914,11 +1914,11 @@ static void junior_rc_flat_to_left_bank_paint_setup(
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 26, height, 27, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 26, height, 0, 27, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height });
} }
} }
@ -1945,13 +1945,13 @@ static void junior_rc_flat_to_right_bank_paint_setup(
image_id = junior_rc_track_pieces_flat_to_right_bank[direction][0] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_flat_to_right_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height, 0); paint_util_push_tunnel_right(session, height, 0);
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height, 0); paint_util_push_tunnel_left(session, height, 0);
} }
@ -1962,11 +1962,11 @@ static void junior_rc_flat_to_right_bank_paint_setup(
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 26, height, 27, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 26, height, 0, 27, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height });
} }
} }
@ -2075,12 +2075,12 @@ static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup(
if (direction == 1 && trackSequence == 6) if (direction == 1 && trackSequence == 6)
{ {
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_4_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_4_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height });
} }
else if (direction == 3 && trackSequence == 0) else if (direction == 3 && trackSequence == 0)
{ {
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height });
} }
int32_t supportHeight = height; int32_t supportHeight = height;
@ -2173,11 +2173,11 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup(
image_id = junior_rc_track_pieces_left_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_left_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
} }
if (junior_rc_track_pieces_left_banked_to_25_deg_up[direction][1] != 0) if (junior_rc_track_pieces_left_banked_to_25_deg_up[direction][1] != 0)
@ -2186,11 +2186,11 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup(
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height });
} }
} }
@ -2233,11 +2233,11 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup(
image_id = junior_rc_track_pieces_right_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_right_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
} }
if (junior_rc_track_pieces_right_banked_to_25_deg_up[direction][1] != 0) if (junior_rc_track_pieces_right_banked_to_25_deg_up[direction][1] != 0)
@ -2246,11 +2246,11 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup(
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height });
} }
} }
@ -2306,13 +2306,13 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup(
image_id = junior_rc_track_pieces_25_deg_up_to_left_bank[direction][0] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_25_deg_up_to_left_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
paint_util_push_tunnel_right(session, tunnelHeight, tunnelType); paint_util_push_tunnel_right(session, tunnelHeight, tunnelType);
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
paint_util_push_tunnel_left(session, tunnelHeight, tunnelType); paint_util_push_tunnel_left(session, tunnelHeight, tunnelType);
} }
@ -2323,11 +2323,11 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup(
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height });
} }
} }
@ -2367,13 +2367,13 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup(
image_id = junior_rc_track_pieces_25_deg_up_to_right_bank[direction][0] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_25_deg_up_to_right_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
paint_util_push_tunnel_right(session, tunnelHeight, tunnelType); paint_util_push_tunnel_right(session, tunnelHeight, tunnelType);
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
paint_util_push_tunnel_left(session, tunnelHeight, tunnelType); paint_util_push_tunnel_left(session, tunnelHeight, tunnelType);
} }
@ -2384,11 +2384,11 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup(
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height });
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height });
} }
} }
@ -3027,12 +3027,12 @@ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup(
if (direction == 1 && trackSequence == 3) if (direction == 1 && trackSequence == 3)
{ {
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_NW_SW_PART_2_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_NW_SW_PART_2_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height });
} }
else if (direction == 3 && trackSequence == 0) else if (direction == 3 && trackSequence == 0)
{ {
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height });
} }
uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } }; uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } };
@ -3659,13 +3659,13 @@ static void junior_rc_brake_paint_setup(
image_id = junior_rc_track_pieces_brake[direction] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_brake[direction] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 6, 0, 20, 32, 1, height); PaintAddImageAsParent(session, image_id, { 6, 0, height }, { 20, 32, 1 });
paint_util_push_tunnel_right(session, height, TUNNEL_0); paint_util_push_tunnel_right(session, height, TUNNEL_0);
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 6, 32, 20, 1, height); PaintAddImageAsParent(session, image_id, { 0, 6, height }, { 32, 20, 1 });
paint_util_push_tunnel_left(session, height, TUNNEL_0); paint_util_push_tunnel_left(session, height, TUNNEL_0);
} }
@ -3695,13 +3695,13 @@ static void junior_rc_block_brake_paint_setup(
image_id = junior_rc_track_pieces_block_brake[isBraked][direction] | session->TrackColours[SCHEME_TRACK]; image_id = junior_rc_track_pieces_block_brake[isBraked][direction] | session->TrackColours[SCHEME_TRACK];
if (direction & 1) if (direction & 1)
{ {
PaintAddImageAsParent(session, image_id, 6, 0, 20, 32, 1, height); PaintAddImageAsParent(session, image_id, { 6, 0, height }, { 20, 32, 1 });
paint_util_push_tunnel_right(session, height, TUNNEL_0); paint_util_push_tunnel_right(session, height, TUNNEL_0);
} }
else else
{ {
PaintAddImageAsParent(session, image_id, 0, 6, 32, 20, 1, height); PaintAddImageAsParent(session, image_id, { 0, 6, height }, { 32, 20, 1 });
paint_util_push_tunnel_left(session, height, TUNNEL_0); paint_util_push_tunnel_left(session, height, TUNNEL_0);
} }
@ -4562,7 +4562,7 @@ static void junior_rc_diag_flat_to_left_bank_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4589,7 +4589,7 @@ static void junior_rc_diag_flat_to_right_bank_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4616,7 +4616,7 @@ static void junior_rc_diag_left_bank_to_flat_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4643,7 +4643,7 @@ static void junior_rc_diag_right_bank_to_flat_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 27 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4670,7 +4670,7 @@ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4697,7 +4697,7 @@ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4724,7 +4724,7 @@ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4751,7 +4751,7 @@ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4778,7 +4778,7 @@ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4805,7 +4805,7 @@ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4832,7 +4832,7 @@ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {
@ -4859,7 +4859,7 @@ static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup(
{ {
uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35); PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 0 }, { -16, -16, height + 35 });
} }
if (trackSequence == 3) if (trackSequence == 3)
{ {

View File

@ -152,11 +152,11 @@ static void paint_car_ride_track_flat(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 1, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 1 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 1, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 1 });
} }
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
@ -183,11 +183,11 @@ static void paint_car_ride_track_25_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 2, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 2, height }, { 32, 20, 1 }, { 0, 6, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 2, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 2, 0, height }, { 20, 32, 1 }, { 6, 0, height });
} }
switch (direction) switch (direction)
@ -221,11 +221,11 @@ static void paint_car_ride_track_flat_to_25_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 2, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 2, height }, { 32, 20, 1 }, { 0, 6, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 2, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 2, 0, height }, { 20, 32, 1 }, { 6, 0, height });
} }
switch (direction) switch (direction)
@ -259,11 +259,11 @@ static void paint_car_ride_track_25_deg_up_to_flat(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 2, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 2, height }, { 32, 20, 1 }, { 0, 6, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 2, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 2, 0, height }, { 20, 32, 1 }, { 6, 0, height });
} }
switch (direction) switch (direction)
@ -322,22 +322,22 @@ static void paint_car_ride_station(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC]; imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height });
} }
else if (direction == 1 || direction == 3) else if (direction == 1 || direction == 3)
{ {
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC]; imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height });
} }
imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK]; imageId = car_ride_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsChild(session, imageId, 0, 6, 32, 20, 1, height, 0, 0, height); PaintAddImageAsChild(session, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 0, height });
} }
else else
{ {
PaintAddImageAsChild(session, imageId, 6, 0, 20, 32, 1, height, 0, 0, height); PaintAddImageAsChild(session, imageId, { 6, 0, height }, { 20, 32, 1 }, { 0, 0, height });
} }
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
@ -423,16 +423,16 @@ static void paint_car_ride_track_left_quarter_turn_1_tile(
switch (direction) switch (direction)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 6, 0, 26, 24, 1, height, 6, 2, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 26, 24, 1 }, { 6, 2, height });
break; break;
case 1: case 1:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 26, 1, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 26, 1 });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 6, 24, 26, 1, height, 2, 6, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 24, 26, 1 }, { 2, 6, height });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 6, 6, 24, 24, 1, height); PaintAddImageAsParent(session, imageId, { 6, 6, height }, { 24, 24, 1 });
break; break;
} }
@ -461,11 +461,11 @@ static void paint_car_ride_track_spinning_tunnel(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 1, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 1 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 1, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 1 });
} }
track_paint_util_spinning_tunnel_paint(session, 1, height, direction); track_paint_util_spinning_tunnel_paint(session, 1, height, direction);
@ -495,16 +495,16 @@ static void paint_car_ride_track_60_deg_up(
switch (direction) switch (direction)
{ {
case 0: case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
break; break;
case 1: case 1:
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 98, height, 27, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 98 }, { 27, 0, height });
break; break;
case 2: case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 98, height, 0, 27, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 98 }, { 0, 27, height });
break; break;
case 3: case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
break; break;
} }
@ -543,11 +543,11 @@ static void paint_car_ride_track_25_deg_up_to_60_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
} }
if (car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][1] != 0) if (car_ride_track_pieces_25_deg_up_to_60_deg_up[direction][1] != 0)
@ -556,11 +556,11 @@ static void paint_car_ride_track_25_deg_up_to_60_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 66, height, 0, 27, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 66, height, 27, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 66 }, { 27, 0, height });
} }
} }
@ -599,11 +599,11 @@ static void paint_car_ride_track_60_deg_up_to_25_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
} }
if (car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][1] != 0) if (car_ride_track_pieces_60_deg_up_to_25_deg_up[direction][1] != 0)
@ -612,11 +612,11 @@ static void paint_car_ride_track_60_deg_up_to_25_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 66, height, 0, 27, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 66 }, { 0, 27, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 66, height, 27, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 66 }, { 27, 0, height });
} }
} }
@ -679,11 +679,11 @@ static void paint_car_ride_track_log_bumps(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 1, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 1 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 1, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 1 });
} }
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)

View File

@ -43,7 +43,7 @@ static void paint_flying_saucers(
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC], nullptr); wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC], nullptr);
uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK]; uint32_t imageId = SPR_FLYING_SAUCERS_FLOOR | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 30, 30, 1, height, 1, 1, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
auto ride = get_ride(rideIndex); auto ride = get_ride(rideIndex);
if (ride != nullptr) if (ride != nullptr)

View File

@ -54,7 +54,7 @@ static void maze_paint_setup(
uint32_t rotation = session->CurrentRotation; uint32_t rotation = session->CurrentRotation;
// draw ground // draw ground
int32_t image_id = SPR_TERRAIN_DIRT | session->TrackColours[SCHEME_MISC]; int32_t image_id = SPR_TERRAIN_DIRT | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, 0, height); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 32, 0 });
wooden_a_supports_paint_setup(session, (rotation & 1) ? 0 : 1, 0, height, session->TrackColours[SCHEME_3], nullptr); wooden_a_supports_paint_setup(session, (rotation & 1) ? 0 : 1, 0, height, session->TrackColours[SCHEME_3], nullptr);
@ -81,92 +81,94 @@ static void maze_paint_setup(
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_CENTRE; image_id = base_image_id + SPR_MAZE_OFFSET_WALL_CENTRE;
if (maze_entry & MAZE_ENTRY_FLAG_3) if (maze_entry & MAZE_ENTRY_FLAG_3)
PaintAddImageAsParent(session, image_id, 2, 2, 10, 10, 9, height, 3, 3, height + 2); PaintAddImageAsParent(session, image_id, { 2, 2, height }, { 10, 10, 9 }, { 3, 3, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_7) if (maze_entry & MAZE_ENTRY_FLAG_7)
PaintAddImageAsParent(session, image_id, 2, 18, 10, 10, 9, height, 3, 19, height + 2); PaintAddImageAsParent(session, image_id, { 2, 18, height }, { 10, 10, 9 }, { 3, 19, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_11) if (maze_entry & MAZE_ENTRY_FLAG_11)
PaintAddImageAsParent(session, image_id, 18, 18, 10, 10, 9, height, 19, 19, height + 2); PaintAddImageAsParent(session, image_id, { 18, 18, height }, { 10, 10, 9 }, { 19, 19, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_15) if (maze_entry & MAZE_ENTRY_FLAG_15)
PaintAddImageAsParent(session, image_id, 18, 2, 10, 10, 9, height, 19, 3, height + 2); PaintAddImageAsParent(session, image_id, { 18, 2, height }, { 10, 10, 9 }, { 19, 3, height + 2 });
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_TOP_LEFT; image_id = base_image_id + SPR_MAZE_OFFSET_WALL_TOP_LEFT;
if (maze_entry & MAZE_ENTRY_FLAG_0) if (maze_entry & MAZE_ENTRY_FLAG_0)
PaintAddImageAsParent(session, image_id, 2, 0, 10, 1, 9, height, 3, 1, height + 2); PaintAddImageAsParent(session, image_id, { 2, 0, height }, { 10, 1, 9 }, { 3, 1, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_13) if (maze_entry & MAZE_ENTRY_FLAG_13)
PaintAddImageAsParent(session, image_id, 18, 0, 10, 1, 9, height, 19, 1, height + 2); PaintAddImageAsParent(session, image_id, { 18, 0, height }, { 10, 1, 9 }, { 19, 1, height + 2 });
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_BOTTOM_RIGHT; image_id = base_image_id + SPR_MAZE_OFFSET_WALL_BOTTOM_RIGHT;
if (maze_entry & MAZE_ENTRY_FLAG_5) if (maze_entry & MAZE_ENTRY_FLAG_5)
PaintAddImageAsParent(session, image_id, 2, 30, 10, 1, 9, height, 3, 30, height + 2); PaintAddImageAsParent(session, image_id, { 2, 30, height }, { 10, 1, 9 }, { 3, 30, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_8) if (maze_entry & MAZE_ENTRY_FLAG_8)
PaintAddImageAsParent(session, image_id, 18, 30, 10, 1, 9, height, 19, 30, height + 2); PaintAddImageAsParent(session, image_id, { 18, 30, height }, { 10, 1, 9 }, { 19, 30, height + 2 });
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_TOP_RIGHT; image_id = base_image_id + SPR_MAZE_OFFSET_WALL_TOP_RIGHT;
if (maze_entry & MAZE_ENTRY_FLAG_1) if (maze_entry & MAZE_ENTRY_FLAG_1)
PaintAddImageAsParent(session, image_id, 0, 2, 1, 10, 9, height, 1, 3, height + 2); PaintAddImageAsParent(session, image_id, { 0, 2, height }, { 1, 10, 9 }, { 1, 3, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_4) if (maze_entry & MAZE_ENTRY_FLAG_4)
PaintAddImageAsParent(session, image_id, 0, 18, 1, 10, 9, height, 1, 19, height + 2); PaintAddImageAsParent(session, image_id, { 0, 18, height }, { 1, 10, 9 }, { 1, 19, height + 2 });
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_BOTTOM_LEFT; image_id = base_image_id + SPR_MAZE_OFFSET_WALL_BOTTOM_LEFT;
if (maze_entry & MAZE_ENTRY_FLAG_12) if (maze_entry & MAZE_ENTRY_FLAG_12)
PaintAddImageAsParent(session, image_id, 30, 2, 1, 10, 9, height, 30, 3, height + 2); PaintAddImageAsParent(session, image_id, { 30, 2, height }, { 1, 10, 9 }, { 30, 3, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_9) if (maze_entry & MAZE_ENTRY_FLAG_9)
PaintAddImageAsParent(session, image_id, 30, 18, 1, 10, 9, height, 30, 19, height + 2); PaintAddImageAsParent(session, image_id, { 30, 18, height }, { 1, 10, 9 }, { 30, 19, height + 2 });
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_INNER_NE_SW; image_id = base_image_id + SPR_MAZE_OFFSET_WALL_INNER_NE_SW;
if (maze_entry & MAZE_ENTRY_FLAG_2) if (maze_entry & MAZE_ENTRY_FLAG_2)
PaintAddImageAsParent(session, image_id, 2, 14, 10, 4, 9, height, 3, 14, height + 2); PaintAddImageAsParent(session, image_id, { 2, 14, height }, { 10, 4, 9 }, { 3, 14, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_10) if (maze_entry & MAZE_ENTRY_FLAG_10)
PaintAddImageAsParent(session, image_id, 18, 14, 10, 4, 9, height, 19, 14, height + 2); PaintAddImageAsParent(session, image_id, { 18, 14, height }, { 10, 4, 9 }, { 19, 14, height + 2 });
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_INNER_NW_SE; image_id = base_image_id + SPR_MAZE_OFFSET_WALL_INNER_NW_SE;
if (maze_entry & MAZE_ENTRY_FLAG_14) if (maze_entry & MAZE_ENTRY_FLAG_14)
PaintAddImageAsParent(session, image_id, 14, 2, 4, 10, 9, height, 14, 3, height + 2); PaintAddImageAsParent(session, image_id, { 14, 2, height }, { 4, 10, 9 }, { 14, 3, height + 2 });
if (maze_entry & MAZE_ENTRY_FLAG_6) if (maze_entry & MAZE_ENTRY_FLAG_6)
PaintAddImageAsParent(session, image_id, 14, 18, 4, 10, 9, height, 14, 19, height + 2); PaintAddImageAsParent(session, image_id, { 14, 18, height }, { 4, 10, 9 }, { 14, 19, height + 2 });
image_id = base_image_id + SPR_MAZE_OFFSET_COLUMN_CORNER; image_id = base_image_id + SPR_MAZE_OFFSET_COLUMN_CORNER;
if (maze_entry & (MAZE_ENTRY_FLAG_0 | MAZE_ENTRY_FLAG_1)) if (maze_entry & (MAZE_ENTRY_FLAG_0 | MAZE_ENTRY_FLAG_1))
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 9, height, 1, 1, height + 2); PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 1, 9 }, { 1, 1, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_4 | MAZE_ENTRY_FLAG_5)) if (maze_entry & (MAZE_ENTRY_FLAG_4 | MAZE_ENTRY_FLAG_5))
PaintAddImageAsParent(session, image_id, 0, 30, 1, 1, 9, height, 1, 30, height + 2); PaintAddImageAsParent(session, image_id, { 0, 30, height }, { 1, 1, 9 }, { 1, 30, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_8 | MAZE_ENTRY_FLAG_9)) if (maze_entry & (MAZE_ENTRY_FLAG_8 | MAZE_ENTRY_FLAG_9))
PaintAddImageAsParent(session, image_id, 30, 30, 1, 1, 9, height, 30, 30, height + 2); PaintAddImageAsParent(session, image_id, { 30, 30, height }, { 1, 1, 9 }, { 30, 30, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_12 | MAZE_ENTRY_FLAG_13)) if (maze_entry & (MAZE_ENTRY_FLAG_12 | MAZE_ENTRY_FLAG_13))
PaintAddImageAsParent(session, image_id, 30, 0, 1, 1, 9, height, 30, 1, height + 2); PaintAddImageAsParent(session, image_id, { 30, 0, height }, { 1, 1, 9 }, { 30, 1, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_0 | MAZE_ENTRY_FLAG_13 | MAZE_ENTRY_FLAG_14)) if (maze_entry & (MAZE_ENTRY_FLAG_0 | MAZE_ENTRY_FLAG_13 | MAZE_ENTRY_FLAG_14))
PaintAddImageAsParent( PaintAddImageAsParent(
session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_LEFT, 14, 0, 2, 1, 9, height, 15, 1, height + 2); session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_LEFT, { 14, 0, height }, { 2, 1, 9 }, { 15, 1, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_5 | MAZE_ENTRY_FLAG_6 | MAZE_ENTRY_FLAG_8)) if (maze_entry & (MAZE_ENTRY_FLAG_5 | MAZE_ENTRY_FLAG_6 | MAZE_ENTRY_FLAG_8))
PaintAddImageAsParent( PaintAddImageAsParent(
session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_RIGHT, 14, 30, 2, 1, 9, height, 15, 30, height + 2); session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_RIGHT, { 14, 30, height }, { 2, 1, 9 },
{ 15, 30, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_1 | MAZE_ENTRY_FLAG_2 | MAZE_ENTRY_FLAG_4)) if (maze_entry & (MAZE_ENTRY_FLAG_1 | MAZE_ENTRY_FLAG_2 | MAZE_ENTRY_FLAG_4))
PaintAddImageAsParent( PaintAddImageAsParent(
session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_RIGHT, 0, 14, 1, 2, 9, height, 1, 15, height + 2); session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_RIGHT, { 0, 14, height }, { 1, 2, 9 }, { 1, 15, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_9 | MAZE_ENTRY_FLAG_10 | MAZE_ENTRY_FLAG_12)) if (maze_entry & (MAZE_ENTRY_FLAG_9 | MAZE_ENTRY_FLAG_10 | MAZE_ENTRY_FLAG_12))
PaintAddImageAsParent( PaintAddImageAsParent(
session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_LEFT, 30, 14, 1, 2, 9, height, 30, 15, height + 2); session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_LEFT, { 30, 14, height }, { 1, 2, 9 },
{ 30, 15, height + 2 });
if (maze_entry & (MAZE_ENTRY_FLAG_2 | MAZE_ENTRY_FLAG_6 | MAZE_ENTRY_FLAG_10 | MAZE_ENTRY_FLAG_14)) if (maze_entry & (MAZE_ENTRY_FLAG_2 | MAZE_ENTRY_FLAG_6 | MAZE_ENTRY_FLAG_10 | MAZE_ENTRY_FLAG_14))
{ {
PaintAddImageAsParent( PaintAddImageAsParent(
session, base_image_id + SPR_MAZE_OFFSET_COLUMN_CENTRE, 14, 14, 2, 2, 8, height, 15, 15, height + 2); session, base_image_id + SPR_MAZE_OFFSET_COLUMN_CENTRE, { 14, 14, height }, { 2, 2, 8 }, { 15, 15, height + 2 });
paint_util_set_segment_support_height(session, SEGMENT_C4, height + 12, 0x20); paint_util_set_segment_support_height(session, SEGMENT_C4, height + 12, 0x20);
} }

View File

@ -68,7 +68,8 @@ static void paint_merry_go_round_structure(
} }
uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags; uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags;
PaintAddImageAsParent(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height); PaintAddImageAsParent(
session, imageId, { xOffset, yOffset, height }, { 24, 24, 48 }, { xOffset + 16, yOffset + 16, height });
rct_drawpixelinfo* dpi = &session->DPI; rct_drawpixelinfo* dpi = &session->DPI;
if (dpi->zoom_level <= 0 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) if (dpi->zoom_level <= 0 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)

View File

@ -492,13 +492,13 @@ static void paint_mini_golf_track_flat(
if (direction & 1) if (direction & 1)
{ {
imageId = SPR_MINI_GOLF_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_MINI_GOLF_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height, TUNNEL_PATH_AND_MINI_GOLF); paint_util_push_tunnel_right(session, height, TUNNEL_PATH_AND_MINI_GOLF);
} }
else else
{ {
imageId = SPR_MINI_GOLF_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_MINI_GOLF_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height, TUNNEL_PATH_AND_MINI_GOLF); paint_util_push_tunnel_left(session, height, TUNNEL_PATH_AND_MINI_GOLF);
} }
@ -511,18 +511,18 @@ static void paint_mini_golf_track_flat(
if (direction & 1) if (direction & 1)
{ {
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 7, height, 10, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 10, 0, height + 2 });
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 7, height, 22, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 22, 0, height + 2 });
} }
else else
{ {
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 7, height, 0, 10, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 10, height + 2 });
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 7, height, 0, 22, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 22, height + 2 });
} }
} }
@ -700,7 +700,7 @@ static void paint_mini_golf_station(
if (hasFence) if (hasFence)
{ {
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 10, 0, 1, 32, 7, height, 31, 0, height + 2); PaintAddImageAsParent(session, imageId, { 10, 0, height }, { 1, 32, 7 }, { 31, 0, height + 2 });
} }
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
@ -723,7 +723,7 @@ static void paint_mini_golf_station(
if (hasFence) if (hasFence)
{ {
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 10, 32, 1, 7, height, 0, 31, height + 2); PaintAddImageAsParent(session, imageId, { 0, 10, height }, { 32, 1, 7 }, { 0, 31, height + 2 });
} }
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
@ -806,11 +806,11 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
{ {
case 0: case 0:
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_SW_NW | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_SW_NW | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 5, 5, 5, height, 24, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 5, 5, 5 }, { 24, 0, height + 2 });
break; break;
case 2: case 2:
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_NE_SE | session->TrackColours[SCHEME_MISC]; imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_NE_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 5, 5, 5, height, 0, 24, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 5, 5, 5 }, { 0, 24, height + 2 });
break; break;
} }
} }
@ -936,11 +936,11 @@ static void paint_mini_golf_hole_c(
{ {
case 0x01: case 0x01:
case 0x20: case 0x20:
PaintAddImageAsParent(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 26, 3 }, { 30, 3, height + 4 });
break; break;
case 0x10: case 0x10:
case 0x31: case 0x31:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 2, 3 }, { 3, 30, height + 4 });
break; break;
default: default:
PaintAddImageAsParent( PaintAddImageAsParent(
@ -1013,17 +1013,17 @@ static void paint_mini_golf_hole_d(
{ {
case 0x01: case 0x01:
case 0x32: case 0x32:
PaintAddImageAsParent(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 26, 3 }, { 30, 3, height + 4 });
break; break;
case 0x02: case 0x02:
PaintAddImageAsParent(session, imageId, 0, 0, 23, 2, 3, height, 3, 30, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 23, 2, 3 }, { 3, 30, height + 4 });
break; break;
case 0x10: case 0x10:
PaintAddImageAsParent(session, imageId, 0, 0, 2, 24, 3, height, 30, 3, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 24, 3 }, { 30, 3, height + 4 });
break; break;
case 0x20: case 0x20:
case 0x31: case 0x31:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 2, 3 }, { 3, 30, height + 4 });
break; break;
default: default:
PaintAddImageAsParent( PaintAddImageAsParent(
@ -1105,18 +1105,18 @@ static void paint_mini_golf_hole_e(
switch ((direction << 4) | trackSequence) switch ((direction << 4) | trackSequence)
{ {
case 0x01: case 0x01:
PaintAddImageAsParent(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 26, 3 }, { 30, 3, height + 4 });
break; break;
case 0x02: case 0x02:
case 0x20: case 0x20:
case 0x31: case 0x31:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 2, 3 }, { 3, 30, height + 4 });
break; break;
case 0x10: case 0x10:
PaintAddImageAsParent(session, imageId, 0, 0, 2, 24, 3, height, 30, 3, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 24, 3 }, { 30, 3, height + 4 });
break; break;
case 0x32: case 0x32:
PaintAddImageAsParent(session, imageId, 0, 0, 2, 23, 3, height, 30, 3, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 23, 3 }, { 30, 3, height + 4 });
break; break;
default: default:
PaintAddImageAsParent( PaintAddImageAsParent(
@ -1274,5 +1274,5 @@ void vehicle_visual_mini_golf_ball(
return; return;
uint32_t image_id = rideEntry->vehicles[0].base_image_id; uint32_t image_id = rideEntry->vehicles[0].base_image_id;
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z + 3); PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 1, 1, 0 }, { 0, 0, z + 3 });
} }

View File

@ -132,20 +132,20 @@ static void paint_go_karts_track_flat(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
imageId = SPR_GO_KARTS_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height, 0, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
imageId = SPR_GO_KARTS_FLAT_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 3 }, { 0, 29, height + 2 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
} }
else else
{ {
imageId = SPR_GO_KARTS_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height, 2, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
imageId = SPR_GO_KARTS_FLAT_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 29, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 3 }, { 29, 0, height + 2 });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
} }
@ -167,21 +167,21 @@ static void paint_go_karts_track_25_deg_up(
imageId = go_karts_track_pieces_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = go_karts_track_pieces_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height, 0, 2, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
} }
else else
{ {
ps = PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height, 2, 0, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
} }
imageId = go_karts_track_pieces_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = go_karts_track_pieces_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 11, height, 0, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 29, height + 2 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 11, height, 29, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 29, 0, height + 2 });
} }
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
@ -221,21 +221,21 @@ static void paint_go_karts_track_flat_to_25_deg_up(
imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height, 0, 2, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
} }
else else
{ {
ps = PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height, 2, 0, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
} }
imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = go_karts_track_pieces_flat_to_25_deg_up[direction][1] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 11, height, 0, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 29, height + 2 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 11, height, 29, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 29, 0, height + 2 });
} }
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
@ -275,21 +275,21 @@ static void paint_go_karts_track_25_deg_up_to_flat(
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height, 0, 2, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
} }
else else
{ {
ps = PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height, 2, 0, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
} }
imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = go_karts_track_pieces_25_deg_up_to_flat[direction][1] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 11, height, 0, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 29, height + 2 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 11, height, 29, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 29, 0, height + 2 });
} }
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
@ -365,11 +365,11 @@ static void paint_go_karts_station(
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height, 0, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height, 2, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
} }
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
@ -386,13 +386,13 @@ static void paint_go_karts_station(
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 3 }, { 0, 29, height + 2 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 29, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 3 }, { 29, 0, height + 2 });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
} }
@ -417,34 +417,34 @@ static void paint_go_karts_station(
case 0: case 0:
imageId = (hasGreenLight ? SPR_GO_KARTS_START_POLE_GREEN_SW_NE : SPR_GO_KARTS_START_POLE_RED_SW_NE) imageId = (hasGreenLight ? SPR_GO_KARTS_START_POLE_GREEN_SW_NE : SPR_GO_KARTS_START_POLE_RED_SW_NE)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 1, 1, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 1, height + 4 });
imageId = (hasGreenLight ? SPR_GO_KARTS_START_LIGHTS_GREEN_SW_NE : SPR_GO_KARTS_START_LIGHTS_RED_SW_NE) imageId = (hasGreenLight ? SPR_GO_KARTS_START_LIGHTS_GREEN_SW_NE : SPR_GO_KARTS_START_LIGHTS_RED_SW_NE)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 1, 28, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 28, height + 4 });
break; break;
case 1: case 1:
imageId = SPR_GO_KARTS_START_POLE_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_START_POLE_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 1, 28, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 28, height + 4 });
imageId = SPR_GO_KARTS_START_LIGHTS_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_START_LIGHTS_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 28, 28, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 28, height + 4 });
break; break;
case 2: case 2:
imageId = SPR_GO_KARTS_START_POLE_NE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_START_POLE_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 28, 1, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 1, height + 4 });
imageId = SPR_GO_KARTS_START_LIGHTS_NE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_START_LIGHTS_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 28, 28, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 28, height + 4 });
break; break;
case 3: case 3:
imageId = (hasGreenLight ? SPR_GO_KARTS_START_POLE_GREEN_SE_NW : SPR_GO_KARTS_START_POLE_RED_SE_NW) imageId = (hasGreenLight ? SPR_GO_KARTS_START_POLE_GREEN_SE_NW : SPR_GO_KARTS_START_POLE_RED_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 1, 1, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 1, 1, height + 4 });
imageId = (hasGreenLight ? SPR_GO_KARTS_START_LIGHTS_GREEN_SE_NW : SPR_GO_KARTS_START_LIGHTS_RED_SE_NW) imageId = (hasGreenLight ? SPR_GO_KARTS_START_LIGHTS_GREEN_SE_NW : SPR_GO_KARTS_START_LIGHTS_RED_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 13, height, 28, 1, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 3, 3, 13 }, { 28, 1, height + 4 });
break; break;
} }
} }
@ -466,40 +466,40 @@ static void paint_go_karts_track_left_quarter_turn_1_tile(
{ {
case 0: case 0:
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height, 0, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 28, 1 }, { 0, 2, height });
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 3, height, 29, 2, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 3 }, { 29, 2, height + 2 });
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 16, 1, 3, height, 14, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 1, 3 }, { 14, 29, height + 2 });
break; break;
case 1: case 1:
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NE_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_NE_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 30, 30, 1, height, 0, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 0, 0, height });
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NE_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_NE_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 16, 1, 3, height, 2, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 1, 3 }, { 2, 29, height + 2 });
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NE_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_NE_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 16, 3, height, 29, 2, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 16, 3 }, { 29, 2, height + 2 });
break; break;
case 2: case 2:
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height, 2, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 32, 1 }, { 2, 0, height });
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 3, height, 2, 2, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 3 }, { 2, 2, height + 2 });
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_SE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_B_SE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 16, 3, height, 29, 14, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 16, 3 }, { 29, 14, height + 2 });
break; break;
case 3: case 3:
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SW_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_SW_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SW_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_GO_KARTS_FLAT_QUARTER_TURN_1_TILE_EDGE_A_SW_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 3, height, 29, 29, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 3 }, { 29, 29, height + 2 });
// The empty sprite isn't drawn // The empty sprite isn't drawn
break; break;

View File

@ -91,7 +91,7 @@ static void top_spin_paint_vehicle(
// Left back bottom support // Left back bottom support
image_id += 572; image_id += 572;
PaintAddImageAsParent( PaintAddImageAsParent(
session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); session, image_id, { al, cl, height }, { lengthX, lengthY, 90 }, { boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ });
image_id = session->TrackColours[SCHEME_MISC]; image_id = session->TrackColours[SCHEME_MISC];
if (image_id == IMAGE_TYPE_REMAP) if (image_id == IMAGE_TYPE_REMAP)

View File

@ -193,11 +193,11 @@ static void chairlift_paint_station_ne_sw(
if (!isStart && !isEnd) if (!isStart && !isEnd)
{ {
imageId = ((direction == 0) ? SPR_20502 : SPR_20504) | session->TrackColours[SCHEME_TRACK]; imageId = ((direction == 0) ? SPR_20502 : SPR_20504) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
} }
imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
bool hasFence = track_paint_util_has_fence(EDGE_NW, pos, tileElement, ride, session->CurrentRotation); bool hasFence = track_paint_util_has_fence(EDGE_NW, pos, tileElement, ride, session->CurrentRotation);
if (hasFence) if (hasFence)
@ -217,7 +217,7 @@ static void chairlift_paint_station_ne_sw(
if (hasFence) if (hasFence)
{ {
imageId = SPR_FENCE_METAL_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_FENCE_METAL_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 27, height, 0, 30, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 30, height + 2 });
} }
track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_SE, hasFence, stationObj, height);
@ -226,10 +226,10 @@ static void chairlift_paint_station_ne_sw(
if ((direction == 0 && isStart) || (direction == 2 && isEnd)) if ((direction == 0 && isStart) || (direction == 2 && isEnd))
{ {
imageId = SPR_FENCE_METAL_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_FENCE_METAL_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 28, 27, height, 30, 2, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 27 }, { 30, 2, height + 4 });
imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK]; imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 });
imageId = SPR_CHAIRLIFT_STATION_END_CAP_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_END_CAP_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4);
@ -239,7 +239,7 @@ static void chairlift_paint_station_ne_sw(
else if ((direction == 2 && isStart) || (direction == 0 && isEnd)) else if ((direction == 2 && isStart) || (direction == 0 && isEnd))
{ {
imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK]; imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 });
imageId = SPR_CHAIRLIFT_STATION_END_CAP_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_END_CAP_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4);
@ -250,13 +250,14 @@ static void chairlift_paint_station_ne_sw(
if (drawBackColumn) if (drawBackColumn)
{ {
imageId = SPR_CHAIRLIFT_STATION_COLUMN_NE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_COLUMN_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 16, 1, 1, 7, height + 2, 1, 16, height + 2); PaintAddImageAsParent(session, imageId, { 0, 16, height + 2 }, { 1, 1, 7 }, { 1, 16, height + 2 });
} }
if (drawFrontColumn) if (drawFrontColumn)
{ {
imageId = SPR_CHAIRLIFT_STATION_COLUMN_NE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_COLUMN_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 30, 16, 1, 1, 7, height + 2, 1, 16, height + 2); // bound offset x is wrong? PaintAddImageAsParent(
session, imageId, { 30, 16, height + 2 }, { 1, 1, 7 }, { 1, 16, height + 2 }); // bound offset x is wrong?
} }
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -286,11 +287,11 @@ static void chairlift_paint_station_se_nw(
if (!isStart && !isEnd) if (!isStart && !isEnd)
{ {
imageId = ((direction == 1) ? SPR_20503 : SPR_20505) | session->TrackColours[SCHEME_TRACK]; imageId = ((direction == 1) ? SPR_20503 : SPR_20505) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
} }
imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_FLOOR_METAL | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }, { 0, 0, height });
bool hasFence = track_paint_util_has_fence(EDGE_NE, pos, tileElement, ride, session->CurrentRotation); bool hasFence = track_paint_util_has_fence(EDGE_NE, pos, tileElement, ride, session->CurrentRotation);
if (hasFence) if (hasFence)
@ -310,7 +311,7 @@ static void chairlift_paint_station_se_nw(
if (hasFence) if (hasFence)
{ {
imageId = SPR_FENCE_METAL_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_FENCE_METAL_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 27, height, 30, 0, height + 2); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 30, 0, height + 2 });
} }
track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height); track_paint_util_draw_station_covers(session, EDGE_SW, hasFence, stationObj, height);
@ -319,7 +320,7 @@ static void chairlift_paint_station_se_nw(
if ((direction == 1 && isStart) || (direction == 3 && isEnd)) if ((direction == 1 && isStart) || (direction == 3 && isEnd))
{ {
imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK]; imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 });
imageId = SPR_CHAIRLIFT_STATION_END_CAP_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_END_CAP_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4);
@ -329,10 +330,10 @@ static void chairlift_paint_station_se_nw(
else if ((direction == 3 && isStart) || (direction == 1 && isEnd)) else if ((direction == 3 && isStart) || (direction == 1 && isEnd))
{ {
imageId = SPR_FENCE_METAL_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_FENCE_METAL_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 1, 27, height, 2, 30, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 27 }, { 2, 30, height + 4 });
imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK]; imageId = chairlift_bullwheel_frames[ride->chairlift_bullwheel_rotation / 16384] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 });
imageId = SPR_CHAIRLIFT_STATION_END_CAP_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_END_CAP_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4); PaintAddImageAsChild(session, imageId, 0, 0, 4, 4, 26, height, 14, 14, height + 4);
@ -343,13 +344,14 @@ static void chairlift_paint_station_se_nw(
if (drawLeftColumn) if (drawLeftColumn)
{ {
imageId = SPR_CHAIRLIFT_STATION_COLUMN_SE_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_COLUMN_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 16, 0, 1, 1, 7, height + 2, 16, 1, height + 2); PaintAddImageAsParent(session, imageId, { 16, 0, height + 2 }, { 1, 1, 7 }, { 16, 1, height + 2 });
} }
if (drawRightColumn) if (drawRightColumn)
{ {
imageId = SPR_CHAIRLIFT_STATION_COLUMN_SE_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_STATION_COLUMN_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 16, 30, 1, 1, 7, height + 2, 16, 1, height + 2); // bound offset x is wrong? PaintAddImageAsParent(
session, imageId, { 16, 30, height + 2 }, { 1, 1, 7 }, { 16, 1, height + 2 }); // bound offset x is wrong?
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
} }
@ -381,13 +383,13 @@ static void chairlift_paint_flat(
if (direction & 1) if (direction & 1)
{ {
imageId = SPR_CHAIRLIFT_CABLE_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CABLE_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
} }
else else
{ {
imageId = SPR_CHAIRLIFT_CABLE_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CABLE_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
} }
@ -406,25 +408,25 @@ static void chairlift_paint_25_deg_up(
{ {
case 0: case 0:
imageId = SPR_CHAIRLIFT_CABLE_UP_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CABLE_UP_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_7); paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_7);
break; break;
case 1: case 1:
imageId = SPR_CHAIRLIFT_CABLE_UP_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CABLE_UP_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
paint_util_push_tunnel_right(session, height + 8, TUNNEL_SQUARE_8); paint_util_push_tunnel_right(session, height + 8, TUNNEL_SQUARE_8);
break; break;
case 2: case 2:
imageId = SPR_CHAIRLIFT_CABLE_UP_NE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CABLE_UP_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
paint_util_push_tunnel_left(session, height + 8, TUNNEL_SQUARE_8); paint_util_push_tunnel_left(session, height + 8, TUNNEL_SQUARE_8);
break; break;
case 3: case 3:
imageId = SPR_CHAIRLIFT_CABLE_UP_SE_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CABLE_UP_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_7); paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_7);
break; break;
} }
@ -444,40 +446,40 @@ static void chairlift_paint_flat_to_25_deg_up(
{ {
case 0: case 0:
imageId = SPR_20508 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20508 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
imageId = SPR_20520 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20520 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
break; break;
case 1: case 1:
imageId = SPR_20509 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20509 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
imageId = SPR_20521 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20521 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_8); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_8);
break; break;
case 2: case 2:
imageId = SPR_20510 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20510 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
imageId = SPR_20522 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20522 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_8); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_8);
break; break;
case 3: case 3:
imageId = SPR_20511 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20511 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
imageId = SPR_20523 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20523 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
break; break;
@ -499,40 +501,40 @@ static void chairlift_paint_25_deg_up_to_flat(
{ {
case 0: case 0:
imageId = SPR_20512 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20512 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
imageId = SPR_20524 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20524 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_FLAT);
break; break;
case 1: case 1:
imageId = SPR_20513 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20513 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
imageId = SPR_20525 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20525 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_right(session, height + 8, TUNNEL_14); paint_util_push_tunnel_right(session, height + 8, TUNNEL_14);
break; break;
case 2: case 2:
imageId = SPR_20514 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20514 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 2, height, 0, 13, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 6, 2 }, { 0, 13, height + 28 });
imageId = SPR_20526 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20526 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_left(session, height + 8, TUNNEL_14); paint_util_push_tunnel_left(session, height + 8, TUNNEL_14);
break; break;
case 3: case 3:
imageId = SPR_20515 | session->TrackColours[SCHEME_TRACK]; imageId = SPR_20515 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 2, height, 13, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 6, 32, 2 }, { 13, 0, height + 28 });
imageId = SPR_20527 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20527 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 4, 4, 25, height, 14, 14, height + 1); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 25 }, { 14, 14, height + 1 });
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_FLAT);
break; break;
@ -578,50 +580,50 @@ static void chairlift_paint_left_quarter_turn_1_tile(
{ {
case 0: case 0:
imageId = SPR_CHAIRLIFT_CORNER_NW_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CORNER_NW_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, 2, height, 16, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 16, 2 }, { 16, 0, height + 28 });
imageId = SPR_20532 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20532 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 16, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 16, 4, height });
imageId = SPR_20536 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20536 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 28, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 28, 4, height });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
break; break;
case 1: case 1:
imageId = SPR_CHAIRLIFT_CORNER_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CORNER_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, 2, height, 0, 0, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 16, 2 }, { 0, 0, height + 28 });
imageId = SPR_20533 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20533 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 16, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 16, 4, height });
imageId = SPR_20537 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20537 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 4, 16, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 4, 16, height });
break; break;
case 2: case 2:
imageId = SPR_CHAIRLIFT_CORNER_SE_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CORNER_SE_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, 2, height, 0, 16, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 16, 2 }, { 0, 16, height + 28 });
imageId = SPR_20534 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20534 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 4, 16, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 4, 16, height });
imageId = SPR_20538 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20538 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 16, 28, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 16, 28, height });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
break; break;
case 3: case 3:
imageId = SPR_CHAIRLIFT_CORNER_SW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_CHAIRLIFT_CORNER_SW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, 2, height, 16, 16, height + 28); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 16, 16, 2 }, { 16, 16, height + 28 });
imageId = SPR_20535 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20535 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 28, 16, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 28, 16, height });
imageId = SPR_20539 | session->TrackColours[SCHEME_SUPPORTS]; imageId = SPR_20539 | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 16, 28, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 16, 28, height });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);

View File

@ -426,11 +426,11 @@ static void paint_monorail_track_flat(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
} }
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
@ -515,11 +515,11 @@ static void paint_monorail_track_25_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
} }
switch (direction) switch (direction)
@ -557,11 +557,11 @@ static void paint_monorail_track_flat_to_25_deg_up(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
} }
switch (direction) switch (direction)
@ -599,11 +599,11 @@ static void paint_monorail_track_25_deg_up_to_flat(
if (direction == 0 || direction == 2) if (direction == 0 || direction == 2)
{ {
PaintAddImageAsParent(session, imageId, 0, 6, 32, 20, 3, height); PaintAddImageAsParent(session, imageId, { 0, 6, height }, { 32, 20, 3 });
} }
else else
{ {
PaintAddImageAsParent(session, imageId, 6, 0, 20, 32, 3, height); PaintAddImageAsParent(session, imageId, { 6, 0, height }, { 20, 32, 3 });
} }
switch (direction) switch (direction)

View File

@ -36,21 +36,22 @@ static void paint_boat_hire_track_flat(
{ {
uint32_t imageId; uint32_t imageId;
const auto offset = CoordsXYZ{ 0, 0, height };
if (direction & 1) if (direction & 1)
{ {
imageId = SPR_BOAT_HIRE_FLAT_BACK_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_BACK_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 4, 0, height); PaintAddImageAsParent(session, imageId, offset, { 1, 32, 3 }, { 4, 0, height });
imageId = SPR_BOAT_HIRE_FLAT_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 28, 0, height); PaintAddImageAsParent(session, imageId, offset, { 1, 32, 3 }, { 28, 0, height });
} }
else else
{ {
imageId = SPR_BOAT_HIRE_FLAT_BACK_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_BACK_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 4, height); PaintAddImageAsParent(session, imageId, offset, { 32, 1, 3 }, { 0, 4, height });
imageId = SPR_BOAT_HIRE_FLAT_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 28, height); PaintAddImageAsParent(session, imageId, offset, { 32, 1, 3 }, { 0, 28, height });
} }
paint_util_set_segment_support_height( paint_util_set_segment_support_height(
@ -92,35 +93,36 @@ static void paint_boat_hire_track_left_quarter_turn_1_tile(
const TileElement* tileElement) const TileElement* tileElement)
{ {
uint32_t imageId; uint32_t imageId;
const auto offset = CoordsXYZ{ 0, 0, height };
switch (direction) switch (direction)
{ {
case 0: case 0:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_SW_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_SW_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height); PaintAddImageAsParent(session, imageId, offset, { 32, 32, 0 }, { 0, 0, height });
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_SW_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_SW_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2); PaintAddImageAsParent(session, imageId, offset, { 3, 3, 3 }, { 28, 28, height + 2 });
break; break;
case 1: case 1:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height); PaintAddImageAsParent(session, imageId, offset, { 32, 32, 0 }, { 0, 0, height });
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2); PaintAddImageAsParent(session, imageId, offset, { 3, 3, 3 }, { 28, 28, height + 2 });
break; break;
case 2: case 2:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_NE_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_NE_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height); PaintAddImageAsParent(session, imageId, offset, { 32, 32, 0 }, { 0, 0, height });
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_NE_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_NE_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2); PaintAddImageAsParent(session, imageId, offset, { 3, 3, 3 }, { 28, 28, height + 2 });
break; break;
case 3: case 3:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_SE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_SE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2); PaintAddImageAsParent(session, imageId, offset, { 3, 3, 3 }, { 28, 28, height + 2 });
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_SE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_SE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height); PaintAddImageAsParent(session, imageId, offset, { 32, 32, 0 }, { 0, 0, height });
break; break;
} }

View File

@ -285,21 +285,21 @@ static void paint_river_rapids_track_flat(
{ {
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW) imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 11, height, 4, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW) imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 27, 0, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 3 }, { 27, 0, height + 17 });
} }
else else
{ {
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW) imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 11, height, 0, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW) imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 27, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 3 }, { 0, 27, height + 17 });
} }
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
@ -339,10 +339,10 @@ static void paint_river_rapids_track_25_deg(
{ {
case 0: case 0:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 4, height, 0, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height });
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 34, height, 0, 27, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height + 16 });
wooden_a_supports_paint_setup(session, 0, 9, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 0, 9, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_7); paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_7);
@ -350,11 +350,11 @@ static void paint_river_rapids_track_25_deg(
case 1: case 1:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
ps = PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 4, height, 4, 0, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height });
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 34, height, 27, 0, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height + 16 });
wooden_a_supports_paint_setup(session, 1, 10, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 1, 10, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height + 8, TUNNEL_SQUARE_8); paint_util_push_tunnel_right(session, height + 8, TUNNEL_SQUARE_8);
@ -362,11 +362,11 @@ static void paint_river_rapids_track_25_deg(
case 2: case 2:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 4, height, 0, 4, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height });
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 34, height, 0, 27, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 34 }, { 0, 27, height + 16 });
wooden_a_supports_paint_setup(session, 0, 11, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 0, 11, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height + 8, TUNNEL_SQUARE_8); paint_util_push_tunnel_left(session, height + 8, TUNNEL_SQUARE_8);
@ -374,10 +374,10 @@ static void paint_river_rapids_track_25_deg(
case 3: case 3:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 4, height, 4, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height });
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 34, height, 27, 0, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 34 }, { 27, 0, height + 16 });
wooden_a_supports_paint_setup(session, 1, 12, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 1, 12, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_7); paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_7);
@ -398,10 +398,10 @@ static void paint_river_rapids_track_25_deg_to_flat_a(
{ {
case 0: case 0:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 4, height, 0, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height });
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 18, height, 0, 27, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 18 }, { 0, 27, height + 16 });
wooden_a_supports_paint_setup(session, 0, 5, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 0, 5, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height - 8, TUNNEL_SQUARE_FLAT);
@ -409,11 +409,11 @@ static void paint_river_rapids_track_25_deg_to_flat_a(
case 1: case 1:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
ps = PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 4, height, 4, 0, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height });
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 18, height, 27, 0, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 18 }, { 27, 0, height + 16 });
wooden_a_supports_paint_setup(session, 1, 6, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 1, 6, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height + 8, TUNNEL_14); paint_util_push_tunnel_right(session, height + 8, TUNNEL_14);
@ -421,11 +421,11 @@ static void paint_river_rapids_track_25_deg_to_flat_a(
case 2: case 2:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 4, height, 0, 4, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 4 }, { 0, 4, height });
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 18, height, 0, 27, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 18 }, { 0, 27, height + 16 });
wooden_a_supports_paint_setup(session, 0, 7, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 0, 7, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height + 8, TUNNEL_14); paint_util_push_tunnel_left(session, height + 8, TUNNEL_14);
@ -433,10 +433,10 @@ static void paint_river_rapids_track_25_deg_to_flat_a(
case 3: case 3:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 4, height, 4, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 4 }, { 4, 0, height });
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 18, height, 27, 0, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 18 }, { 27, 0, height + 16 });
wooden_a_supports_paint_setup(session, 1, 8, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 1, 8, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height - 8, TUNNEL_SQUARE_FLAT);
@ -457,10 +457,10 @@ static void paint_river_rapids_track_25_deg_to_flat_b(
{ {
case 0: case 0:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 11, height, 0, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height + 16 });
wooden_a_supports_paint_setup(session, 0, 1, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 0, 1, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
@ -468,11 +468,11 @@ static void paint_river_rapids_track_25_deg_to_flat_b(
case 1: case 1:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
ps = PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 11, height, 4, 0, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height + 16 });
wooden_a_supports_paint_setup(session, 1, 2, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 1, 2, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_8); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_8);
@ -480,11 +480,11 @@ static void paint_river_rapids_track_25_deg_to_flat_b(
case 2: case 2:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 11, height, 0, 4, height); ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
session->WoodenSupportsPrependTo = ps; session->WoodenSupportsPrependTo = ps;
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 26 }, { 0, 27, height + 16 });
wooden_a_supports_paint_setup(session, 0, 3, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 0, 3, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_8); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_8);
@ -492,10 +492,10 @@ static void paint_river_rapids_track_25_deg_to_flat_b(
case 3: case 3:
imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 11, height, 4, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK]; imageId = sprites[direction][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height + 16); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 26 }, { 27, 0, height + 16 });
wooden_a_supports_paint_setup(session, 1, 4, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, 1, 4, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
@ -566,41 +566,41 @@ static void paint_river_rapids_track_left_quarter_turn_1_tile(
{ {
case 0: case 0:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SW_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SW_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 26, 11, height, 4, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 26, 11 }, { 4, 2, height });
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SW_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SW_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 1, 7, height, 28, 27, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 1, 7 }, { 28, 27, height + 13 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
break; break;
case 1: case 1:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 28, 11, height, 0, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 11 }, { 0, 0, height });
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 30, 7, height, 27, 1, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 30, 7 }, { 27, 1, height + 13 });
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 30, 1, 7, height, 1, 27, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 1, 7 }, { 1, 27, height + 13 });
break; break;
case 2: case 2:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NE_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_NE_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 26, 28, 11, height, 2, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 28, 11 }, { 2, 4, height });
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_NE_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_NE_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 2, 7, height, 27, 28, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 2, 7 }, { 27, 28, height + 13 });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
break; break;
case 3: case 3:
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_SE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 28, 11, height, 4, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 11 }, { 4, 4, height });
imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SE_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_LEFT_QUARTER_TURN_1_TILE_FRONT_SE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 7, height, 28, 28, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 7 }, { 28, 28, height + 13 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
@ -623,10 +623,10 @@ static void paint_river_rapids_track_right_quarter_turn_1_tile(
{ {
case 0: case 0:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 28, 11, height, 4, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 11 }, { 4, 4, height });
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 7, height, 28, 28, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 7 }, { 28, 28, height + 13 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
@ -634,31 +634,31 @@ static void paint_river_rapids_track_right_quarter_turn_1_tile(
case 1: case 1:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SE_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_SE_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 26, 11, height, 4, 2, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 26, 11 }, { 4, 2, height });
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_SE_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 1, 7, height, 28, 27, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 1, 7 }, { 28, 27, height + 13 });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
break; break;
case 2: case 2:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NE_NW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 28, 11, height, 0, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 11 }, { 0, 0, height });
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_LEFT_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 30, 7, height, 27, 1, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 30, 7 }, { 27, 1, height + 13 });
imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_QUARTER_TURN_1_TILE_FRONT_RIGHT_NW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 30, 1, 7, height, 1, 27, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 1, 7 }, { 1, 27, height + 13 });
break; break;
case 3: case 3:
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NW_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_NW_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 26, 28, 11, height, 2, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 28, 11 }, { 2, 4, height });
imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RIGHT_QUARTER_TURN_1_TILE_FRONT_NW_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 28, 7, height, 27, 2, height + 13); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 27, 2, height + 13 });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT); paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
break; break;
@ -682,17 +682,17 @@ static void paint_river_rapids_track_waterfall(
{ {
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_SE_NW) imageId = (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 11, height, 4, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
imageId = (SPR_RIVER_RAPIDS_WATERFALL_BASE_NE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_WATERFALL_BASE_NE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
imageId = (SPR_RIVER_RAPIDS_WATERFALL_TOP_NE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_WATERFALL_TOP_NE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 27, height, 4, 0, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 4, 0, height + 17 });
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_SE_NW) imageId = (direction == 1 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_NW_SE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 27, height, 27, 0, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 27, 0, height + 17 });
imageId = (SPR_RIVER_RAPIDS_WATERFALL_SIDE_SW_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_WATERFALL_SIDE_SW_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 27, 0, height + 17 }); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 27, 0, height + 17 });
@ -701,17 +701,17 @@ static void paint_river_rapids_track_waterfall(
{ {
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_NE_SW) imageId = (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_NE_SW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 11, height, 0, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
imageId = (SPR_RIVER_RAPIDS_WATERFALL_BASE_NW_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_WATERFALL_BASE_NW_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
imageId = (SPR_RIVER_RAPIDS_WATERFALL_TOP_NW_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_WATERFALL_TOP_NW_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 27, height, 0, 4, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 4, height + 17 });
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_NE_SW) imageId = (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_NE_SW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 27, height, 0, 27, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 27, height + 17 });
imageId = (SPR_RIVER_RAPIDS_WATERFALL_SIDE_SE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_WATERFALL_SIDE_SE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 27, height + 17 }); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 27, height + 17 });
@ -744,18 +744,18 @@ static void paint_river_rapids_track_rapids(
if (direction & 1) if (direction & 1)
{ {
imageId = (SPR_RIVER_RAPIDS_RAPIDS_NW_SE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_RAPIDS_NW_SE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 11, height, 4, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
imageId = SPR_RIVER_RAPIDS_RAPIDS_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RAPIDS_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 11, height, 27, 0, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 11 }, { 27, 0, height + 17 });
} }
else else
{ {
imageId = (SPR_RIVER_RAPIDS_RAPIDS_SW_NE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_RAPIDS_SW_NE_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 11, height, 0, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
imageId = SPR_RIVER_RAPIDS_RAPIDS_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK]; imageId = SPR_RIVER_RAPIDS_RAPIDS_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 11, height, 0, 27, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 11 }, { 0, 27, height + 17 });
} }
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
@ -796,27 +796,27 @@ static void paint_river_rapids_track_whirlpool(
{ {
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW) imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 24, 32, 11, height, 4, 0, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
imageId = (SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height });
imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW) imageId = (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 27, 0, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 3 }, { 27, 0, height + 17 });
} }
else else
{ {
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW) imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 24, 11, height, 0, 4, height); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
imageId = (SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK]; imageId = (SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height });
imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW) imageId = (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW)
| session->TrackColours[SCHEME_TRACK]; | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 27, height + 17); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 3 }, { 0, 27, height + 17 });
} }
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);

View File

@ -369,6 +369,15 @@ paint_struct* PaintAddImageAsParent(
bound_box_offset_x, bound_box_offset_y, bound_box_offset_z, session->CurrentRotation); bound_box_offset_x, bound_box_offset_y, bound_box_offset_z, session->CurrentRotation);
} }
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
const CoordsXYZ& boundBoxOffset)
{
return PaintAddImageAsParent(
session, image_id, offset.x, offset.y, boundBoxSize.x, boundBoxSize.y, boundBoxSize.z, offset.z, boundBoxOffset.x,
boundBoxOffset.y, boundBoxOffset.z);
}
paint_struct* PaintAddImageAsChild( paint_struct* PaintAddImageAsChild(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength, paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
const CoordsXYZ& boundBoxOffset) const CoordsXYZ& boundBoxOffset)