Merge pull request #15248 from ZehMatt/refactor/paint-hierarchy

Refactor PaintAddImageAsParent overloads
This commit is contained in:
Michael Steenbeek 2021-08-21 21:33:06 +02:00 committed by GitHub
commit 7b3258b17e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 447 additions and 531 deletions

View File

@ -727,14 +727,6 @@ paint_struct* PaintAddImageAsParent(
return PaintAddImageAsParent(session, image_id, offset, boundBoxSize, offset);
}
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset)
{
return PaintAddImageAsParent(
session, image_id, { x_offset, y_offset, z_offset }, { bound_box_length_x, bound_box_length_y, bound_box_length_z });
}
/**
* rct2: 0x00686806, 0x006869B2, 0x00686B6F, 0x00686D31, 0x0098197C
*
@ -769,16 +761,6 @@ paint_struct* PaintAddImageAsParent(
return ps;
}
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset, int32_t bound_box_offset_x,
int32_t bound_box_offset_y, int32_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

View File

@ -267,15 +267,8 @@ extern bool gPaintBoundingBoxes;
extern bool gPaintBlockedTiles;
extern bool gPaintWidePathsAsGhost;
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset);
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize);
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x,
int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset, int32_t bound_box_offset_x,
int32_t bound_box_offset_y, int32_t bound_box_offset_z);
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize,
const CoordsXYZ& boundBoxOffset);

View File

@ -37,14 +37,14 @@ paint_struct* PaintAddImageAsParentRotated(
if (direction & 1)
{
return PaintAddImageAsParent(
session, image_id, y_offset, x_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset,
bound_box_offset_y, bound_box_offset_x, bound_box_offset_z);
session, image_id, { y_offset, x_offset, z_offset }, { bound_box_length_y, bound_box_length_x, bound_box_length_z },
{ bound_box_offset_y, bound_box_offset_x, bound_box_offset_z });
}
else
{
return PaintAddImageAsParent(
session, image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset,
bound_box_offset_x, bound_box_offset_y, bound_box_offset_z);
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 });
}
}

View File

@ -305,12 +305,8 @@ static constexpr const uint16_t* WoodenCurveSupportImageIds[12] = {
};
struct unk_supports_desc_bound_box {
struct {
uint8_t x, y, z;
} offset;
struct {
uint8_t x, y, z;
} length;
CoordsXYZ offset;
CoordsXYZ length;
};
struct unk_supports_desc {
@ -607,8 +603,7 @@ bool wooden_a_supports_paint_setup(
if (byte_97B23C[special].var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
{
PaintAddImageAsParent(
session, imageId, 0, 0, bBox.length.x, bBox.length.y, bBox.length.z, z, bBox.offset.x, bBox.offset.y,
bBox.offset.z + z);
session, imageId, { 0, 0, z }, bBox.length, { bBox.offset.x, bBox.offset.y, bBox.offset.z + z });
hasSupports = true;
}
else
@ -701,7 +696,8 @@ bool wooden_b_supports_paint_setup(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
baseHeight += 16;
PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(
session, (imageId + 4) | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 3 }, { 0, 0, baseHeight + 2 });
baseHeight += 16;
_9E32B1 = true;
@ -757,8 +753,8 @@ bool wooden_b_supports_paint_setup(
if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session->WaterHeight)
{
PaintAddImageAsParent(
session, WoodenSupportImageIds[supportType].half | imageColourFlags, 0, 0, 32, 32,
((heightSteps == 1) ? 7 : 12), baseHeight);
session, WoodenSupportImageIds[supportType].half | imageColourFlags, { 0, 0, baseHeight },
{ 32, 32, ((heightSteps == 1) ? 7 : 12) });
heightSteps -= 1;
baseHeight += 16;
_9E32B1 = true;
@ -766,8 +762,8 @@ bool wooden_b_supports_paint_setup(
else
{
PaintAddImageAsParent(
session, WoodenSupportImageIds[supportType].full | imageColourFlags, 0, 0, 32, 32,
((heightSteps == 2) ? 23 : 28), baseHeight);
session, WoodenSupportImageIds[supportType].full | imageColourFlags, { 0, 0, baseHeight },
{ 32, 32, ((heightSteps == 2) ? 23 : 28) });
heightSteps -= 2;
baseHeight += 32;
_9E32B1 = true;
@ -779,7 +775,7 @@ bool wooden_b_supports_paint_setup(
{
uint16_t specialIndex = (special - 1) & 0xFFFF;
unk_supports_desc supportsDesc = byte_97B23C[specialIndex];
const unk_supports_desc& supportsDesc = byte_97B23C[specialIndex];
if (WoodenCurveSupportImageIds[supportType] != nullptr && WoodenCurveSupportImageIds[supportType][specialIndex] != 0
&& supportsDesc.var_7 != 0)
@ -787,13 +783,13 @@ bool wooden_b_supports_paint_setup(
uint32_t imageId = WoodenCurveSupportImageIds[supportType][specialIndex];
imageId |= imageColourFlags;
unk_supports_desc_bound_box boundBox = supportsDesc.bounding_box;
const unk_supports_desc_bound_box& boundBox = supportsDesc.bounding_box;
if (supportsDesc.var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
{
PaintAddImageAsParent(
session, imageId | imageColourFlags, 0, 0, boundBox.length.x, boundBox.length.y, boundBox.length.z,
baseHeight, boundBox.offset.x, boundBox.offset.y, boundBox.offset.z + baseHeight);
session, imageId | imageColourFlags, { 0, 0, baseHeight }, boundBox.length,
{ boundBox.offset.x, boundBox.offset.y, boundBox.offset.z + baseHeight });
_9E32B1 = true;
}
else
@ -1082,8 +1078,7 @@ bool metal_b_supports_paint_setup(
PaintAddImageAsParent(
session, _metalSupportTypeToCrossbeamImages[supportType][ebp] | imageColourFlags,
SupportBoundBoxes[originalSegment].x + loc_97B052[ebp].x, SupportBoundBoxes[originalSegment].y + loc_97B052[ebp].y,
_97B062[ebp].x, _97B062[ebp].y, 1, baseHeight);
{ SupportBoundBoxes[originalSegment] + loc_97B052[ebp], baseHeight }, { _97B062[ebp], 1 });
}
int32_t si = baseHeight;
@ -1099,8 +1094,7 @@ bool metal_b_supports_paint_setup(
uint32_t imageId = _97B15C[supportType].base_id + imageOffset;
PaintAddImageAsParent(
session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0, 5,
supportSegments[segment].height);
session, imageId | imageColourFlags, { SupportBoundBoxes[segment], supportSegments[segment].height }, { 0, 0, 5 });
baseHeight = supportSegments[segment].height + 6;
}
@ -1115,8 +1109,8 @@ bool metal_b_supports_paint_setup(
if (heightDiff > 0)
{
PaintAddImageAsParent(
session, (_97B15C[supportType].beam_id + (heightDiff - 1)) | imageColourFlags, SupportBoundBoxes[segment].x,
SupportBoundBoxes[segment].y, 0, 0, heightDiff - 1, baseHeight);
session, (_97B15C[supportType].beam_id + (heightDiff - 1)) | imageColourFlags,
{ SupportBoundBoxes[segment], baseHeight }, { 0, 0, heightDiff - 1 });
}
baseHeight += heightDiff;
@ -1151,8 +1145,7 @@ bool metal_b_supports_paint_setup(
}
PaintAddImageAsParent(
session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0,
beamLength - 1, baseHeight);
session, imageId | imageColourFlags, { SupportBoundBoxes[segment], baseHeight }, { 0, 0, beamLength - 1 });
baseHeight += beamLength;
i++;
@ -1181,8 +1174,8 @@ bool metal_b_supports_paint_setup(
uint32_t imageId = _97B15C[supportType].beam_id + (beamLength - 1);
PaintAddImageAsParent(
session, imageId | imageColourFlags, SupportBoundBoxes[originalSegment].x, SupportBoundBoxes[originalSegment].y,
0, 0, 0, baseHeight, SupportBoundBoxes[originalSegment].x, SupportBoundBoxes[originalSegment].y, height);
session, imageId | imageColourFlags, { SupportBoundBoxes[originalSegment], baseHeight }, { 0, 0, 0 },
{ SupportBoundBoxes[originalSegment], height });
baseHeight += beamLength;
}
}
@ -1237,7 +1230,8 @@ bool path_a_supports_paint_setup(
if (session->Support.slope & 0x20)
{
// save dx2
PaintAddImageAsParent(session, (railingEntry->bridge_image + 48) | imageColourFlags, 0, 0, 32, 32, 0, baseHeight - 2);
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 48) | imageColourFlags, { 0, 0, baseHeight - 2 }, { 32, 32, 0 });
hasSupports = true;
}
else if (session->Support.slope & 0x10)
@ -1257,7 +1251,8 @@ bool path_a_supports_paint_setup(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
baseHeight += 16;
PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(
session, (imageId + 4) | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, 11 }, { 0, 0, baseHeight + 2 });
baseHeight += 16;
hasSupports = true;
@ -1287,7 +1282,8 @@ bool path_a_supports_paint_setup(
{
uint32_t imageId = (supportType * 24) + railingEntry->bridge_image + 23;
PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, ((heightSteps == 1) ? 7 : 12), baseHeight);
PaintAddImageAsParent(
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, ((heightSteps == 1) ? 7 : 12) });
heightSteps -= 1;
baseHeight += 16;
hasSupports = true;
@ -1297,7 +1293,7 @@ bool path_a_supports_paint_setup(
uint32_t imageId = (supportType * 24) + railingEntry->bridge_image + 22;
PaintAddImageAsParent(
session, imageId | imageColourFlags, 0, 0, 32, 32, ((heightSteps == 2) ? 23 : 28), baseHeight);
session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, ((heightSteps == 2) ? 23 : 28) });
heightSteps -= 2;
baseHeight += 32;
hasSupports = true;
@ -1310,14 +1306,14 @@ bool path_a_supports_paint_setup(
uint32_t imageId = railingEntry->bridge_image + 55 + specialIndex;
unk_supports_desc supportsDesc = byte_98D8D4[specialIndex];
unk_supports_desc_bound_box boundBox = supportsDesc.bounding_box;
const unk_supports_desc& supportsDesc = byte_98D8D4[specialIndex];
const unk_supports_desc_bound_box& boundBox = supportsDesc.bounding_box;
if (supportsDesc.var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
{
PaintAddImageAsParent(
session, imageId | imageColourFlags, 0, 0, boundBox.length.y, boundBox.length.x, boundBox.length.z, baseHeight,
boundBox.offset.x, boundBox.offset.y, baseHeight + boundBox.offset.z);
session, imageId | imageColourFlags, { 0, 0, baseHeight }, boundBox.length,
{ boundBox.offset.x, boundBox.offset.y, baseHeight + boundBox.offset.z });
hasSupports = true;
}
else
@ -1385,8 +1381,8 @@ bool path_b_supports_paint_setup(
baseHeight = supportSegments[segment].height;
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 37 + imageOffset) | imageColourFlags, SupportBoundBoxes[segment].x,
SupportBoundBoxes[segment].y, 0, 0, 5, baseHeight);
session, (railingEntry->bridge_image + 37 + imageOffset) | imageColourFlags,
{ SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, { 0, 0, 5 });
baseHeight += 6;
}
@ -1404,8 +1400,8 @@ bool path_b_supports_paint_setup(
if (heightDiff > 0)
{
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 20 + (heightDiff - 1)) | imageColourFlags, SupportBoundBoxes[segment].x,
SupportBoundBoxes[segment].y, 0, 0, heightDiff - 1, baseHeight);
session, (railingEntry->bridge_image + 20 + (heightDiff - 1)) | imageColourFlags,
{ SupportBoundBoxes[segment], baseHeight }, { 0, 0, heightDiff - 1 });
}
baseHeight += heightDiff;
@ -1437,8 +1433,8 @@ bool path_b_supports_paint_setup(
}
PaintAddImageAsParent(
session, (railingEntry->bridge_image + 20 + (z - 1)) | imageColourFlags, SupportBoundBoxes[segment].x,
SupportBoundBoxes[segment].y, 0, 0, (z - 1), baseHeight);
session, (railingEntry->bridge_image + 20 + (z - 1)) | imageColourFlags,
{ SupportBoundBoxes[segment], baseHeight }, { 0, 0, (z - 1) });
baseHeight += z;
}
@ -1455,8 +1451,7 @@ bool path_b_supports_paint_setup(
}
PaintAddImageAsParent(
session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0, (z - 1),
baseHeight);
session, imageId | imageColourFlags, { SupportBoundBoxes[segment], baseHeight }, { 0, 0, (z - 1) });
baseHeight += z;
}
@ -1485,8 +1480,8 @@ bool path_b_supports_paint_setup(
uint32_t imageId = railingEntry->bridge_image + 20 + (z - 1);
PaintAddImageAsParent(
session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0, 0,
baseHeight, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight);
session, imageId | imageColourFlags, { SupportBoundBoxes[segment], baseHeight }, { 0, 0, 0 },
{ SupportBoundBoxes[segment], baseHeight });
baseHeight += z;
}

View File

@ -83,5 +83,5 @@ template<> void PaintEntity(paint_session* session, const Litter* litter, int32_
// In the following call to PaintAddImageAsParent, we add 4 (instead of 2) to the
// bound_box_offset_z to make sure litter is drawn on top of railways
PaintAddImageAsParent(session, image_id, 0, 0, 4, 4, -1, litter->z, -4, -4, litter->z + 4);
PaintAddImageAsParent(session, image_id, { 0, 0, litter->z }, { 4, 4, -1 }, { -4, -4, litter->z + 4 });
}

View File

@ -80,7 +80,7 @@ template<> void PaintEntity(paint_session* session, const Peep* peep, int32_t im
+ imageOffset * 4;
uint32_t imageId = baseImageId | peep->TshirtColour << 19 | peep->TrousersColour << 24 | IMAGE_TYPE_REMAP
| IMAGE_TYPE_REMAP_2_PLUS;
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
PaintAddImageAsParent(session, imageId, { 0, 0, peep->z }, { 1, 1, 11 }, { 0, 0, peep->z + 5 });
auto* guest = peep->As<Guest>();
if (guest != nullptr)
{

View File

@ -78,12 +78,12 @@ void PaintBanner(paint_session* session, uint8_t direction, int32_t height, cons
image_id |= (banner->colour << 19) | IMAGE_TYPE_REMAP;
}
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 0x15, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 1, 0x15 }, boundBoxOffset);
boundBoxOffset.x = BannerBoundBoxes[direction][1].x;
boundBoxOffset.y = BannerBoundBoxes[direction][1].y;
image_id++;
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 0x15, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 1, 1, 0x15 }, boundBoxOffset);
// Opposite direction
direction = direction_reverse(direction);

View File

@ -129,7 +129,7 @@ static void ride_entrance_exit_paint(
int16_t lengthY = (direction & 1) ? 28 : 2;
int16_t lengthX = (direction & 1) ? 2 : 28;
PaintAddImageAsParent(session, image_id, 0, 0, lengthX, lengthY, ah, height, 2, 2, height);
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { lengthX, lengthY, ah }, { 2, 2, height });
if (transparant_image_id)
{
@ -148,7 +148,8 @@ static void ride_entrance_exit_paint(
image_id += 4;
PaintAddImageAsParent(
session, image_id, 0, 0, lengthX, lengthY, ah, height, (direction & 1) ? 28 : 2, (direction & 1) ? 2 : 28, height);
session, image_id, { 0, 0, height }, { lengthX, lengthY, ah },
{ (direction & 1) ? 28 : 2, (direction & 1) ? 2 : 28, height });
if (transparant_image_id)
{
@ -260,7 +261,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
if (path_entry != nullptr)
{
image_id = (path_entry->image + 5 * (1 + (direction & 1))) | ghost_id;
PaintAddImageAsParent(session, image_id, 0, 0, 32, 0x1C, 0, height, 0, 2, height);
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 0x1C, 0 }, { 0, 2, height });
}
entrance = static_cast<rct_entrance_type*>(object_entry_get_chunk(ObjectType::ParkEntrance, 0));
@ -269,7 +270,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
return;
}
image_id = (entrance->image_id + direction * 3) | ghost_id;
PaintAddImageAsParent(session, image_id, 0, 0, 0x1C, 0x1C, 0x2F, height, 2, 2, height + 32);
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 0x1C, 0x1C, 0x2F }, { 2, 2, height + 32 });
if ((direction + 1) & (1 << 1))
break;
@ -322,7 +323,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
return;
}
image_id = (entrance->image_id + part_index + direction * 3) | ghost_id;
PaintAddImageAsParent(session, image_id, 0, 0, 0x1A, di, 0x4F, height, 3, 3, height);
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 0x1A, di, 0x4F }, { 3, 3, height });
break;
}
@ -353,7 +354,7 @@ void PaintEntrance(paint_session* session, uint8_t direction, int32_t height, co
uint32_t image_id = 0x20101689 + get_height_marker_offset() + (z / 16);
image_id -= gMapBaseZ;
PaintAddImageAsParent(session, image_id, 16, 16, 1, 1, 0, height, 31, 31, z + 64);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 1, 1, 0 }, { 31, 31, z + 64 });
}
}

View File

@ -244,8 +244,6 @@ void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t heigh
uint32_t dword_F4387C = 0;
image_id |= SPRITE_ID_PALETTE_COLOUR_2(tileElement.GetPrimaryColour(), tileElement.GetSecondaryColour());
CoordsXYZ boxlength;
CoordsXYZ boxoffset;
if (gTrackDesignSaveMode)
{
if (!track_design_save_contains_tile_element(reinterpret_cast<const TileElement*>(&tileElement)))
@ -283,14 +281,9 @@ void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t heigh
edi = rol16(edi, direction);
esi = (edi & 0xF) | (edi >> 12);
}
boxoffset.x = s98E3C4[esi].offset.x;
boxoffset.y = s98E3C4[esi].offset.y;
boxoffset.z = height;
boxlength.x = s98E3C4[esi].length.x;
boxlength.y = s98E3C4[esi].length.y;
boxlength.z = boxlengthZ;
PaintAddImageAsParent(
session, image_id, 0, 0, boxlength.x, boxlength.y, boxlengthZ, height, boxoffset.x, boxoffset.y, boxoffset.z);
const CoordsXYZ bbLength = { s98E3C4[esi].offset, height };
const CoordsXYZ bbOffset = { s98E3C4[esi].length, boxlengthZ };
PaintAddImageAsParent(session, image_id, { 0, 0, height }, bbLength, bbOffset);
if (sceneryEntry->scrolling_mode == SCROLLING_MODE_NONE || direction == 1 || direction == 2)
{
large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile);
@ -454,7 +447,7 @@ void PaintLargeScenery(paint_session* session, uint8_t direction, uint16_t heigh
uint16_t scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0;
PaintAddImageAsChild(
session, scrolling_text_setup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollMode, textColour), 0, 0, 1, 1, 21,
height + 25, boxoffset.x, boxoffset.y, boxoffset.z);
height + 25, bbOffset.x, bbOffset.y, bbOffset.z);
}
large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile);

View File

@ -370,8 +370,8 @@ static void sub_6A4101(
case 3:
PaintAddImageAsParent(session, 17 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(
session, 18 + base_image_id, 28, 0, 1, 28, 7, height, 28, 4,
height + 2); // bound_box_offset_y seems to be a bug
session, 18 + base_image_id, { 28, 0, height }, { 1, 28, 7 },
{ 28, 4, height + 2 }); // bound_box_offset_y seems to be a bug
PaintAddImageAsParent(session, 25 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 });
break;
case 4:
@ -403,8 +403,8 @@ static void sub_6A4101(
case 12:
PaintAddImageAsParent(session, 16 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(
session, 19 + base_image_id, 0, 28, 28, 1, 7, height, 4, 28,
height + 2); // bound_box_offset_x seems to be a bug
session, 19 + base_image_id, { 0, 28, height }, { 28, 1, 7 },
{ 4, 28, height + 2 }); // bound_box_offset_x seems to be a bug
PaintAddImageAsParent(session, 27 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 });
break;
default:
@ -434,15 +434,13 @@ static void sub_6A4101(
uint32_t imageId = (direction << 1) + base_image_id + 28;
// Draw pole in the back
PaintAddImageAsParent(
session, imageId, 0, 0, 1, 1, 21, height, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 21 }, boundBoxOffsets);
// Draw pole in the front and banner
boundBoxOffsets.x = BannerBoundBoxes[direction][1].x;
boundBoxOffsets.y = BannerBoundBoxes[direction][1].y;
imageId++;
PaintAddImageAsParent(
session, imageId, 0, 0, 1, 1, 21, height, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 1, 21 }, boundBoxOffsets);
direction--;
// If text shown
@ -559,8 +557,8 @@ static void sub_6A4101(
case 3:
PaintAddImageAsParent(session, 3 + base_image_id, { 0, 4, height }, { 28, 1, 7 }, { 0, 4, height + 2 });
PaintAddImageAsParent(
session, 4 + base_image_id, 28, 0, 1, 28, 7, height, 28, 4,
height + 2); // bound_box_offset_y seems to be a bug
session, 4 + base_image_id, { 28, 0, height }, { 1, 28, 7 },
{ 28, 4, height + 2 }); // bound_box_offset_y seems to be a bug
if (!(drawnCorners & FOOTPATH_CORNER_0))
{
PaintAddImageAsParent(session, 11 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 0, 28, height + 2 });
@ -585,8 +583,8 @@ static void sub_6A4101(
case 12:
PaintAddImageAsParent(session, 2 + base_image_id, { 4, 0, height }, { 1, 28, 7 }, { 4, 0, height + 2 });
PaintAddImageAsParent(
session, 5 + base_image_id, 0, 28, 28, 1, 7, height, 4, 28,
height + 2); // bound_box_offset_x seems to be a bug
session, 5 + base_image_id, { 0, 28, height }, { 28, 1, 7 },
{ 4, 28, height + 2 }); // bound_box_offset_x seems to be a bug
if (!(drawnCorners & FOOTPATH_CORNER_2))
{
PaintAddImageAsParent(session, 13 + base_image_id, { 0, 0, height }, { 4, 4, 7 }, { 28, 0, height + 2 });
@ -928,7 +926,7 @@ void PaintPath(paint_session* session, uint16_t height, const PathElement& tileE
}
PaintAddImageAsParent(
session, imageId | patrolColour << 19 | IMAGE_TYPE_REMAP, 16, 16, 1, 1, 0, patrolAreaBaseZ + 2);
session, imageId | patrolColour << 19 | IMAGE_TYPE_REMAP, { 16, 16, patrolAreaBaseZ + 2 }, { 1, 1, 0 });
}
}
@ -1047,8 +1045,8 @@ void path_paint_box_support(
if (!hasSupports || !session->DidPassSurface)
{
PaintAddImageAsParent(
session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, boundBoxOffset.y,
height + boundingBoxZOffset);
session, imageId | imageFlags, { 0, 0, height }, { boundBoxSize, 0 },
{ boundBoxOffset, height + boundingBoxZOffset });
}
else
{
@ -1064,8 +1062,8 @@ void path_paint_box_support(
}
PaintAddImageAsParent(
session, image_id | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, boundBoxOffset.y,
height + boundingBoxZOffset);
session, image_id | imageFlags, { 0, 0, height }, { boundBoxSize, 0 },
{ boundBoxOffset, height + boundingBoxZOffset });
// TODO: Revert this when path import works correctly.
if (!pathElement.IsQueue() && !pathElement.ShouldDrawPathOverSupports())
@ -1194,8 +1192,8 @@ void path_paint_pole_support(
if (!hasSupports || !session->DidPassSurface)
{
PaintAddImageAsParent(
session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, boundBoxOffset.y,
height + boundingBoxZOffset);
session, imageId | imageFlags, { 0, 0, height }, { boundBoxSize.x, boundBoxSize.y, 0 },
{ boundBoxOffset.x, boundBoxOffset.y, height + boundingBoxZOffset });
}
else
{
@ -1213,8 +1211,8 @@ void path_paint_pole_support(
}
PaintAddImageAsParent(
session, bridgeImage | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x,
boundBoxOffset.y, height + boundingBoxZOffset);
session, bridgeImage | imageFlags, { 0, 0, height }, { boundBoxSize, 0 },
{ boundBoxOffset, height + boundingBoxZOffset });
// TODO: Revert this when path import works correctly.
if (pathElement.IsQueue() || pathElement.ShouldDrawPathOverSupports())

View File

@ -159,8 +159,7 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
if (!(scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED)))
{
PaintAddImageAsParent(
session, baseImageid, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
session, baseImageid, { x_offset, y_offset, height }, { boxlength.x, boxlength.y, boxlength.z - 1 }, boxoffset);
}
if (scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_HAS_GLASS))
@ -326,8 +325,8 @@ void PaintSmallScenery(paint_session* session, uint8_t direction, int32_t height
if (scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED))
{
PaintAddImageAsParent(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
session, image_id, { x_offset, y_offset, height }, { boxlength.x, boxlength.y, boxlength.z - 1 },
boxoffset);
}
else
{

View File

@ -1037,7 +1037,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
image_id += get_height_marker_offset();
image_id -= gMapBaseZ;
PaintAddImageAsParent(session, image_id, 16, 16, 1, 1, 0, height);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 1, 1, 0 });
}
bool has_surface = false;
@ -1137,7 +1137,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co
{
if ((spawn.x & 0xFFE0) == pos.x && (spawn.y & 0xFFE0) == pos.y)
{
PaintAddImageAsParent(session, SPR_TERRAIN_SELECTION_SQUARE_SIMPLE, 0, 0, 32, 32, 16, spawn.z);
PaintAddImageAsParent(session, SPR_TERRAIN_SELECTION_SQUARE_SIMPLE, { 0, 0, spawn.z }, { 32, 32, 16 });
const int32_t offset = (direction_reverse(spawn.direction) + rotation) & 3;
const uint32_t image_id = (PEEP_SPAWN_ARROW_0 + offset) | 0x20380000;

View File

@ -59,17 +59,13 @@ static void PaintWallDoor(
{
paint_struct* ps;
ps = PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsR1.x, boundsR1.y,
static_cast<int8_t>(boundsR1.z), offset.z, boundsR1_.x, boundsR1_.y, boundsR1_.z);
ps = PaintAddImageAsParent(session, imageId, offset, boundsR1, boundsR1_);
if (ps != nullptr)
{
ps->tertiary_colour = tertiaryColour;
}
ps = PaintAddImageAsParent(
session, imageId + 1, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsR2.x, boundsR2.y,
static_cast<int8_t>(boundsR2.z), offset.z, boundsR2_.x, boundsR2_.y, boundsR2_.z);
ps = PaintAddImageAsParent(session, imageId + 1, offset, boundsR2, boundsR2_);
if (ps != nullptr)
{
ps->tertiary_colour = tertiaryColour;
@ -79,9 +75,7 @@ static void PaintWallDoor(
{
paint_struct* ps;
ps = PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsL1.x, boundsL1.y,
static_cast<int8_t>(boundsL1.z), offset.z, boundsL1_.x, boundsL1_.y, boundsL1_.z);
ps = PaintAddImageAsParent(session, imageId, offset, boundsL1, boundsL1_);
if (ps != nullptr)
{
ps->tertiary_colour = tertiaryColour;
@ -117,9 +111,7 @@ static void PaintWallWall(
imageId = (imageId & 0x7FFFF) | dword_141F710;
}
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y,
static_cast<int8_t>(bounds.z), offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z);
PaintAddImageAsParent(session, imageId, offset, bounds, boundsOffset);
if (dword_141F710 == 0)
{
imageId = baseImageId + dword_141F718;
@ -140,9 +132,7 @@ static void PaintWallWall(
imageId = (imageId & 0x7FFFF) | dword_141F710;
}
paint_struct* paint = PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y,
static_cast<int8_t>(bounds.z), offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z);
paint_struct* paint = PaintAddImageAsParent(session, imageId, offset, bounds, boundsOffset);
if (paint != nullptr)
{
paint->tertiary_colour = tertiaryColour;

View File

@ -829,9 +829,7 @@ bool track_paint_util_draw_station_covers_2(
if (baseImageId & IMAGE_TYPE_TRANSPARENT)
{
imageId = (baseImageId & ~IMAGE_TYPE_TRANSPARENT) + imageOffset;
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y,
static_cast<int8_t>(bounds.z), offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z);
PaintAddImageAsParent(session, imageId, offset, bounds, boundsOffset);
uint32_t edi = session->TrackColours[SCHEME_TRACK] & (0b11111 << 19);
@ -844,9 +842,7 @@ bool track_paint_util_draw_station_covers_2(
}
imageId = (baseImageId + imageOffset) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y,
static_cast<int8_t>(bounds.z), offset.z, boundsOffset.x, boundsOffset.y, boundsOffset.z);
PaintAddImageAsParent(session, imageId, offset, bounds, boundsOffset);
return true;
}
@ -1036,8 +1032,8 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][0]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness[0], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
session, imageId, { offset, height }, { boundsLength, thickness[0] },
{ boundsOffset.x, boundsOffset.y, height + boundsOffset.z });
}
if (sprites[direction][index][1] != 0)
{
@ -1046,9 +1042,7 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction][index][1];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][1]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness[1], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
PaintAddImageAsParent(session, imageId, { offset, height }, { boundsLength, thickness[1] }, boundsOffset);
}
}
@ -1134,8 +1128,8 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][0]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness[0], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
session, imageId, { offset, height }, { boundsLength, thickness[0] },
{ boundsOffset.x, boundsOffset.y, height + boundsOffset.z });
}
if (sprites[direction][index][1] != 0)
{
@ -1145,8 +1139,8 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][1]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness[1], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
session, imageId, { offset, height }, { boundsLength, thickness[1] },
{ boundsOffset.x, boundsOffset.y, height + boundsOffset.z });
}
}
@ -1305,8 +1299,8 @@ void track_paint_util_eighth_to_diag_tiles_paint(
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness[direction][index], height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
session, imageId, { offset.x, offset.y, height }, { boundsLength.x, boundsLength.y, thickness[direction][index] },
{ boundsOffset.x, boundsOffset.y, height + boundsOffset.z });
}
constexpr CoordsXY defaultDiagTileOffsets[4] = {
@ -1346,8 +1340,8 @@ void track_paint_util_diag_tiles_paint(
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
session, imageId, { offset, height }, { boundsLength, thickness },
{ boundsOffset.x, boundsOffset.y, height + boundsOffset.z });
}
const uint8_t mapLeftQuarterTurn5TilesToRightQuarterTurn5Tiles[] = {
@ -1468,8 +1462,8 @@ void track_paint_util_right_quarter_turn_5_tiles_paint(
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
session, imageId, { static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), height },
{ boundsLength.x, boundsLength.y, thickness }, { boundsOffset.x, boundsOffset.y, height + boundsOffset.z });
}
void track_paint_util_right_quarter_turn_5_tiles_paint_2(
@ -1483,11 +1477,12 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_2(
}
const sprite_bb* spriteBB = &sprites[direction][sprite];
uint32_t imageId = spriteBB->sprite_id | colourFlags;
const uint32_t imageId = spriteBB->sprite_id | colourFlags;
const auto& offset = spriteBB->offset;
const auto& bbOffset = spriteBB->offset;
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(spriteBB->offset.x), static_cast<int8_t>(spriteBB->offset.y), spriteBB->bb_size.x,
spriteBB->bb_size.y, static_cast<int8_t>(spriteBB->bb_size.z), height + spriteBB->offset.z, spriteBB->bb_offset.x,
spriteBB->bb_offset.y, height + spriteBB->bb_offset.z);
session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size,
{ bbOffset.x, bbOffset.y, height + bbOffset.z });
}
void track_paint_util_right_quarter_turn_5_tiles_paint_3(
@ -1501,10 +1496,9 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_3(
}
const sprite_bb* spriteBB = &sprites[direction][sprite];
uint32_t imageId = spriteBB->sprite_id | colourFlags;
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(spriteBB->offset.x), static_cast<int8_t>(spriteBB->offset.y), spriteBB->bb_size.x,
spriteBB->bb_size.y, static_cast<int8_t>(spriteBB->bb_size.z), height + spriteBB->offset.z);
const uint32_t imageId = spriteBB->sprite_id | colourFlags;
const auto& offset = spriteBB->offset;
PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size);
}
void track_paint_util_right_quarter_turn_5_tiles_tunnel(
@ -1644,8 +1638,8 @@ void track_paint_util_right_quarter_turn_3_tiles_paint(
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y,
thickness, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z);
session, imageId, { offset, height }, { boundsLength.x, boundsLength.y, thickness },
{ boundsOffset.x, boundsOffset.y, height + boundsOffset.z });
}
void track_paint_util_right_quarter_turn_3_tiles_paint_2(
@ -1754,11 +1748,11 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_3(
return;
}
const sprite_bb* spriteBB = &sprites[direction][sprite];
const auto& offset = spriteBB->offset;
const auto& bbOffset = spriteBB->bb_offset;
PaintAddImageAsParent(
session, spriteBB->sprite_id | colourFlags, static_cast<int8_t>(spriteBB->offset.x),
static_cast<int8_t>(spriteBB->offset.y), spriteBB->bb_size.x, spriteBB->bb_size.y,
static_cast<int8_t>(spriteBB->bb_size.z), spriteBB->offset.z + height, spriteBB->bb_offset.x, spriteBB->bb_offset.y,
height + spriteBB->bb_offset.z);
session, spriteBB->sprite_id | colourFlags, { offset.x, offset.y, offset.z + height }, spriteBB->bb_size,
{ bbOffset.x, bbOffset.y, height + bbOffset.z });
}
void track_paint_util_right_quarter_turn_3_tiles_paint_4(
@ -1772,10 +1766,9 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_4(
}
const sprite_bb* spriteBB = &sprites[direction][sprite];
uint32_t imageId = spriteBB->sprite_id | colourFlags;
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(spriteBB->offset.x), static_cast<int8_t>(spriteBB->offset.y), spriteBB->bb_size.x,
spriteBB->bb_size.y, static_cast<int8_t>(spriteBB->bb_size.z), height + spriteBB->offset.z);
const uint32_t imageId = spriteBB->sprite_id | colourFlags;
const auto& offset = spriteBB->offset;
PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size);
}
void track_paint_util_right_quarter_turn_3_tiles_tunnel(

View File

@ -918,7 +918,8 @@ static void vehicle_sprite_paint(
image_id |= CONSTRUCTION_MARKER;
}
paint_struct* ps = PaintAddImageAsParent(
session, image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z);
session, image_id, { 0, 0, z }, { bb.length_x, bb.length_y, bb.length_z },
{ bb.offset_x, bb.offset_y, bb.offset_z + z });
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -3144,7 +3145,7 @@ template<> void PaintEntity(paint_session* session, const Vehicle* vehicle, int3
if (vehicle->IsCrashedVehicle)
{
uint32_t ebx = 22965 + vehicle->animation_frame;
PaintAddImageAsParent(session, ebx, 0, 0, 1, 1, 0, z, 0, 0, z + 2);
PaintAddImageAsParent(session, ebx, { 0, 0, z }, { 1, 1, 0 }, { 0, 0, z + 2 });
return;
}

View File

@ -2467,9 +2467,8 @@ static void junior_rc_left_bank_paint_setup(
image_id = junior_rc_track_pieces_left_bank[direction] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, image_id, 0, 0, junior_rc_left_bank_bound_lengths[direction].x, junior_rc_left_bank_bound_lengths[direction].y,
static_cast<int8_t>(junior_rc_left_bank_bound_lengths[direction].z), height,
junior_rc_left_bank_bound_offsets[direction].x, junior_rc_left_bank_bound_offsets[direction].y, height);
session, image_id, { 0, 0, height }, junior_rc_left_bank_bound_lengths[direction],
{ junior_rc_left_bank_bound_offsets[direction], height });
if (direction & 1)
{
@ -2732,13 +2731,11 @@ static void junior_rc_s_bend_left_paint_setup(
CoordsXY bounds = boundsList[trackSequence];
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y, 1, height);
PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 1 });
}
else
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.y), static_cast<int8_t>(offset.x), bounds.y, bounds.x, 1, height);
PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 1 });
}
if (direction == 0 || direction == 2)
@ -2838,13 +2835,11 @@ static void junior_rc_s_bend_right_paint_setup(
CoordsXY bounds = boundsList[trackSequence];
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y, 1, height);
PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 1 });
}
else
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.y), static_cast<int8_t>(offset.x), bounds.y, bounds.x, 1, height);
PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 1 });
}
if (direction == 0 || direction == 2)
@ -3088,9 +3083,9 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up(
break;
}
if (imageId != 0)
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y, 1,
height, boundsOffset.x, boundsOffset.y, height);
{
PaintAddImageAsParent(session, imageId, { offset, height }, { boundsLength, 1 }, { boundsOffset, height });
}
if (direction == 0 && trackSequence == 0)
{
@ -3167,9 +3162,10 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down(
break;
}
if (imageId != 0)
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), boundsLength.x, boundsLength.y, 1,
height, boundsOffset.x, boundsOffset.y, height);
session, imageId, { offset, height }, { boundsLength.x, boundsLength.y, 1 }, { boundsOffset, height });
}
if (direction == 0 && trackSequence == 0)
{
@ -4962,10 +4958,9 @@ void junior_rc_paint_track_60_deg_up(
image_id |= junior_rc_track_pieces_60_deg_up[EnumValue(chainType)][direction];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].x),
static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].y), junior_rc_60_deg_up_bound_lengths[direction].x,
junior_rc_60_deg_up_bound_lengths[direction].y, junior_rc_60_deg_up_bound_thickness[direction], height,
junior_rc_60_deg_up_bound_offsets[direction].x, junior_rc_60_deg_up_bound_offsets[direction].y, height);
session, image_id, { junior_rc_60_deg_up_tile_offsets[direction], height },
{ junior_rc_60_deg_up_bound_lengths[direction], junior_rc_60_deg_up_bound_thickness[direction] },
{ junior_rc_60_deg_up_bound_offsets[direction], height });
switch (direction)
{
@ -5038,13 +5033,10 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up(
image_id |= junior_rc_track_pieces_25_deg_up_to_60_deg_up[EnumValue(chainType)][direction][0];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].x),
static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].y),
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x,
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].y,
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].x,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].y, height);
session, image_id, { junior_rc_60_deg_up_tile_offsets[direction], height },
{ junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0],
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0], height });
if (junior_rc_track_pieces_25_deg_up_to_60_deg_up[EnumValue(chainType)][direction][1] != 0)
{
@ -5053,13 +5045,10 @@ void junior_rc_paint_track_25_deg_up_to_60_deg_up(
image_id |= junior_rc_track_pieces_25_deg_up_to_60_deg_up[EnumValue(chainType)][direction][1];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].x),
static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].y),
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].x,
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].y,
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][1].x,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][1].y, height);
session, image_id, { junior_rc_60_deg_up_tile_offsets[direction], height },
{ junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1],
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][1], height });
}
switch (direction)
@ -5117,13 +5106,10 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up(
image_id |= junior_rc_track_pieces_60_deg_up_to_25_deg_up[EnumValue(chainType)][direction][0];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].x),
static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].y),
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].x,
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0].y,
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].x,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0].y, height);
session, image_id, { junior_rc_60_deg_up_tile_offsets[direction], height },
{ junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][0],
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][0], height });
if (junior_rc_track_pieces_60_deg_up_to_25_deg_up[EnumValue(chainType)][direction][1] != 0)
{
@ -5132,13 +5118,10 @@ void junior_rc_paint_track_60_deg_up_to_25_deg_up(
image_id |= junior_rc_track_pieces_60_deg_up_to_25_deg_up[EnumValue(chainType)][direction][1];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].x),
static_cast<int8_t>(junior_rc_60_deg_up_tile_offsets[direction].y),
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].x,
junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1].y,
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction], height,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][1].x,
junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][1].y, height);
session, image_id, { junior_rc_60_deg_up_tile_offsets[direction], height },
{ junior_rc_25_deg_up_to_60_deg_up_bound_lengths[direction][1],
junior_rc_25_deg_up_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_25_deg_up_to_60_deg_up_bound_offsets[direction][1], height });
}
switch (direction)
@ -5258,7 +5241,7 @@ void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up(
session,
junior_rc_track_pieces_diag_60_deg_up_to_25_deg_up[EnumValue(chainType)][direction]
| session->TrackColours[SCHEME_TRACK],
-16, -16, 16, 16, 1, height, 0, 0, height);
{ -16, -16, height }, { 16, 16, 1 }, { 0, 0, height });
}
else
{
@ -5290,7 +5273,7 @@ void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down(
session,
junior_rc_track_pieces_diag_25_deg_down_to_60_deg_down[EnumValue(chainType)][direction]
| session->TrackColours[SCHEME_TRACK],
-16, -16, 16, 16, 1, height, 0, 0, height);
{ -16, -16, height }, { 16, 16, 1 }, { 0, 0, height });
}
else
{
@ -5434,12 +5417,9 @@ static void junior_rc_flat_to_60_deg_up_paint_setup(
image_id |= junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][0];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].x),
static_cast<int8_t>(junior_rc_flat_to_60_deg_up_tile_offsets[direction][0].y),
junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].y,
junior_rc_flat_to_60_deg_up_bound_thickness[direction], height + 24,
junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].x, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].y,
height);
session, image_id, { junior_rc_flat_to_60_deg_up_tile_offsets[direction][0], height + 24 },
{ junior_rc_flat_to_60_deg_up_bound_lengths[direction][0], junior_rc_flat_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_flat_to_60_deg_up_bound_offsets[direction][0], height });
if (junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][1] != 0)
{
@ -5448,12 +5428,9 @@ static void junior_rc_flat_to_60_deg_up_paint_setup(
image_id |= junior_rc_track_pieces_flat_to_60_deg_up[isChained][direction][1];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].x),
static_cast<int8_t>(junior_rc_flat_to_60_deg_up_tile_offsets[direction][1].y),
junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].x,
junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction],
height, junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].x,
junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].y, height);
session, image_id, { junior_rc_flat_to_60_deg_up_tile_offsets[direction][1], height },
{ junior_rc_flat_to_60_deg_up_bound_lengths[direction][1], junior_rc_flat_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_flat_to_60_deg_up_bound_offsets[direction][1], height });
}
switch (direction)
@ -5503,12 +5480,9 @@ static void junior_rc_60_deg_up_to_flat_paint_setup(
image_id |= junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][0];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].x),
static_cast<int8_t>(junior_rc_60_deg_up_to_flat_tile_offsets[direction][0].y),
junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].x, junior_rc_flat_to_60_deg_up_bound_lengths[direction][0].y,
junior_rc_flat_to_60_deg_up_bound_thickness[direction], height + 24,
junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].x, junior_rc_flat_to_60_deg_up_bound_offsets[direction][0].y,
height);
session, image_id, { junior_rc_60_deg_up_to_flat_tile_offsets[direction][0], height + 24 },
{ junior_rc_flat_to_60_deg_up_bound_lengths[direction][0], junior_rc_flat_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_flat_to_60_deg_up_bound_offsets[direction][0], height });
if (junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][1] != 0)
{
@ -5517,12 +5491,9 @@ static void junior_rc_60_deg_up_to_flat_paint_setup(
image_id |= junior_rc_track_pieces_60_deg_up_to_flat[isChained][direction][1];
PaintAddImageAsParent(
session, image_id, static_cast<int8_t>(junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].x),
static_cast<int8_t>(junior_rc_60_deg_up_to_flat_tile_offsets[direction][1].y),
junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].x,
junior_rc_flat_to_60_deg_up_bound_lengths[direction][1].y, junior_rc_flat_to_60_deg_up_bound_thickness[direction],
height, junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].x,
junior_rc_flat_to_60_deg_up_bound_offsets[direction][1].y, height);
session, image_id, { junior_rc_60_deg_up_to_flat_tile_offsets[direction][1], height },
{ junior_rc_flat_to_60_deg_up_bound_lengths[direction][1], junior_rc_flat_to_60_deg_up_bound_thickness[direction] },
{ junior_rc_flat_to_60_deg_up_bound_offsets[direction][1], height });
}
switch (direction)
@ -5643,14 +5614,14 @@ static void junior_rc_booster_paint_setup(
if (direction & 1)
{
PaintAddImageAsParent(
session, SPR_JUNIOR_RC_BOOSTER_NE_SW | session->TrackColours[SCHEME_TRACK], 0, 0, 20, 32, 1, height);
session, SPR_JUNIOR_RC_BOOSTER_NE_SW | session->TrackColours[SCHEME_TRACK], { 0, 0, height }, { 20, 32, 1 });
paint_util_push_tunnel_right(session, height, TUNNEL_0);
}
else
{
PaintAddImageAsParent(
session, SPR_JUNIOR_RC_BOOSTER_NW_SE | session->TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height);
session, SPR_JUNIOR_RC_BOOSTER_NW_SE | session->TrackColours[SCHEME_TRACK], { 0, 0, height }, { 32, 20, 1 });
paint_util_push_tunnel_left(session, height, TUNNEL_0);
}

View File

@ -202,13 +202,13 @@ static void paint_reverse_freefall_rc_flat(
if (direction & 1)
{
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_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_SQUARE_FLAT);
}
else
{
uint32_t imageId = SPR_REVERSE_FREEFALL_RC_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_SQUARE_FLAT);
}
@ -227,7 +227,7 @@ static void paint_reverse_freefall_rc_station(
{
// height -= 2 (height - 2)
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)
imageId = reverse_freefall_rc_track_pieces_station[direction] | session->TrackColours[SCHEME_TRACK];
@ -241,7 +241,7 @@ static void paint_reverse_freefall_rc_station(
{
// height -= 2 (height - 2)
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)
imageId = reverse_freefall_rc_track_pieces_station[direction] | session->TrackColours[SCHEME_TRACK];
@ -323,7 +323,7 @@ static void paint_reverse_freefall_rc_slope(
{
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, isDirection03 ? 26 : 18, 26, 126, height, isDirection03 ? 3 : 11,
3, height);
@ -365,7 +365,7 @@ static void paint_reverse_freefall_rc_vertical(
case 0:
supportsImageId = reverse_freefall_rc_track_pieces_vertical_supports[direction]
| session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, supportsImageId, 0, 0, 26, 26, 79, height, 3, 3, height);
PaintAddImageAsParent(session, supportsImageId, { 0, 0, height }, { 26, 26, 79 }, { 3, 3, height });
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
paint_util_set_general_support_height(session, height + 80, 0x20);
break;

View File

@ -182,7 +182,8 @@ void vehicle_visual_virginia_reel(
image_id = (image_id & 0x7FFFF) | CONSTRUCTION_MARKER;
}
PaintAddImageAsParent(
session, image_id, 0, 0, bb->length_x, bb->length_y, bb->length_z, z, bb->offset_x, bb->offset_y, bb->offset_z + z);
session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z },
{ bb->offset_x, bb->offset_y, bb->offset_z + z });
if (session->DPI.zoom_level < 2 && vehicle->num_peeps > 0 && !vehicle->IsGhost())
{
@ -221,12 +222,12 @@ static void paint_virginia_reel_track_flat(
uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
}
else
{
PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
}
@ -252,11 +253,11 @@ static void paint_virginia_reel_track_25_deg_up(
if (direction & 1)
{
ps = PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
}
else
{
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height });
}
if (direction == 1 || direction == 2)
@ -304,27 +305,27 @@ static void paint_virginia_reel_track_flat_to_25_deg_up(
switch (direction)
{
case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height });
wooden_a_supports_paint_setup(session, 0, 1, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
break;
case 1:
ps = PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
session->WoodenSupportsPrependTo = ps;
wooden_a_supports_paint_setup(session, 1, 2, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_8);
break;
case 2:
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height });
session->WoodenSupportsPrependTo = ps;
wooden_a_supports_paint_setup(session, 0, 3, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_8);
break;
case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
wooden_a_supports_paint_setup(session, 1, 4, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
@ -351,11 +352,11 @@ static void paint_virginia_reel_track_25_deg_up_to_flat(
if (direction & 1)
{
ps = PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 27, 32, 2 }, { 2, 0, height });
}
else
{
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
ps = PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 27, 2 }, { 0, 2, height });
}
if (direction == 1 || direction == 2)
@ -421,7 +422,7 @@ static void paint_virginia_reel_station(
if (direction == 0 || direction == 2)
{
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 2 }, { 0, 2, height });
imageId = SPR_VIRGINIA_REEL_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 2, height, 0, 0, height);
@ -431,7 +432,7 @@ static void paint_virginia_reel_station(
else if (direction == 1 || direction == 3)
{
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 2 }, { 2, 0, height });
imageId = SPR_VIRGINIA_REEL_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 2, height, 0, 0, height);

View File

@ -591,10 +591,10 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down(
{
int32_t part = trackSequence == 0 ? 0 : 1;
const sprite_bb* sbb = &imageIds[direction][part];
const auto& offset = sbb->offset;
PaintAddImageAsParent(
session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], static_cast<int8_t>(sbb->offset.x),
static_cast<int8_t>(sbb->offset.y), sbb->bb_size.x, sbb->bb_size.y, static_cast<int8_t>(sbb->bb_size.z),
height + static_cast<int8_t>(sbb->offset.z));
session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], { offset.x, offset.y, height + offset.z },
sbb->bb_size);
}
track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel(
@ -660,9 +660,8 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up(
int32_t part = trackSequence == 0 ? 0 : 1;
const sprite_bb* sbb = &imageIds[direction][part];
PaintAddImageAsParent(
session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], static_cast<int8_t>(sbb->offset.x),
static_cast<int8_t>(sbb->offset.y), sbb->bb_size.x, sbb->bb_size.y, static_cast<int8_t>(sbb->bb_size.z),
height + static_cast<int8_t>(sbb->offset.z));
session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK],
{ sbb->offset.x, sbb->offset.y, height + sbb->offset.z }, sbb->bb_size);
}
track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(session, height, direction, trackSequence, TUNNEL_1, TUNNEL_2);
@ -733,16 +732,16 @@ static void wild_mouse_track_left_quarter_turn_1(
switch (direction)
{
case 0:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 24, 2, height, 6, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 24, 2 }, { 6, 2, height });
break;
case 1:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 26, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 26, 2 });
break;
case 2:
PaintAddImageAsParent(session, imageId, 0, 0, 24, 26, 2, height, 2, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 26, 2 }, { 2, 6, height });
break;
case 3:
PaintAddImageAsParent(session, imageId, 0, 0, 24, 24, 2, height, 6, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 24, 2 }, { 6, 6, height });
break;
}
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);

View File

@ -428,8 +428,8 @@ static void wooden_rc_track_paint_bb(paint_session* session, const sprite_bb_2*
uint32_t railsImageId = bb->sprite_id_b | wooden_rc_get_rails_colour(session);
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(bb->offset.x), static_cast<int8_t>(bb->offset.y), bb->bb_size.x, bb->bb_size.y,
static_cast<int8_t>(bb->bb_size.z), height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z);
session, imageId, { bb->offset.x, bb->offset.y, height + bb->offset.z },
{ bb->bb_size.x, bb->bb_size.y, bb->bb_size.z }, { bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z });
PaintAddImageAsChild(
session, railsImageId, static_cast<int8_t>(bb->offset.x), static_cast<int8_t>(bb->offset.y), bb->bb_size.x,
bb->bb_size.y, static_cast<int8_t>(bb->bb_size.z), height + bb->offset.z, bb->bb_offset.x, bb->bb_offset.y,

View File

@ -570,16 +570,16 @@ static void wooden_wild_mouse_track_left_quarter_turn_1(
switch (direction)
{
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;
case 1:
PaintAddImageAsParent(session, imageId, 0, 0, 26, 26, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 26, 1 });
break;
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;
case 3:
PaintAddImageAsParent(session, imageId, 6, 6, 24, 24, 1, height);
PaintAddImageAsParent(session, imageId, { 6, 6, height }, { 24, 24, 1 });
break;
}
wooden_a_supports_paint_setup(session, supportType[direction], 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);

View File

@ -43,7 +43,8 @@ static void paint_circus_tent(
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].Body, ride->vehicle_colours[0].Trim);
}
PaintAddImageAsParent(session, imageId | imageColourFlags, al, cl, 24, 24, 47, height + 3, al + 16, cl + 16, height + 3);
PaintAddImageAsParent(
session, imageId | imageColourFlags, { al, cl, height + 3 }, { 24, 24, 47 }, { al + 16, cl + 16, height + 3 });
session->CurrentlyDrawnItem = savedTileElement;
session->InteractionType = ViewportInteractionItem::Ride;

View File

@ -16,17 +16,15 @@
struct rct_crooked_house_bound_box
{
int16_t offset_x;
int16_t offset_y;
int16_t length_x;
int16_t length_y;
CoordsXY offset;
CoordsXY length;
};
static constexpr const rct_crooked_house_bound_box crooked_house_data[] = { { 6, 0, 42, 24 },
{ 0, 0, 0, 0 },
{ -16, -16, 32, 32 },
{ 0, 0, 0, 0 }, // Unused
{ 0, 6, 24, 42 } };
static constexpr const rct_crooked_house_bound_box crooked_house_data[] = { { { 6, 0 }, { 42, 24 } },
{ { 0, 0 }, { 0, 0 } },
{ { -16, -16 }, { 32, 32 } },
{ { 0, 0 }, { 0, 0 } }, // Unused
{ { 0, 6 }, { 24, 42 } } };
/**
* rct2: 0x0088ABA4
@ -56,10 +54,9 @@ static void paint_crooked_house_structure(
uint32_t image_id = (direction + rideEntry->vehicles[0].base_image_id) | session->TrackColours[SCHEME_MISC];
rct_crooked_house_bound_box boundBox = crooked_house_data[segment];
const rct_crooked_house_bound_box& boundBox = crooked_house_data[segment];
PaintAddImageAsParent(
session, image_id, x_offset, y_offset, boundBox.length_x, boundBox.length_y, 127, height + 3, boundBox.offset_x,
boundBox.offset_y, height + 3);
session, image_id, { x_offset, y_offset, height + 3 }, { boundBox.length, 127 }, { boundBox.offset, height + 3 });
}
static void paint_crooked_house(

View File

@ -31,7 +31,7 @@ static constexpr const uint32_t dodgems_fence_sprites[] = { SPR_DODGEMS_FENCE_TO
static void paint_dodgems_roof(paint_session* session, int32_t height, int32_t offset)
{
uint32_t image_id = (SPR_DODGEMS_ROOF_FRAME + offset) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, 2, height);
PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 32, 2 });
image_id = (SPR_DODGEMS_ROOF_GLASS + offset) | (EnumValue(FilterPaletteID::PaletteDarken3) << 19) | IMAGE_TYPE_TRANSPARENT;
PaintAttachToPreviousPS(session, image_id, 0, 0);
@ -48,7 +48,7 @@ static void paint_dodgems(
wooden_a_supports_paint_setup(session, direction & 1, 0, height, session->TrackColours[SCHEME_MISC], nullptr);
uint32_t imageId = SPR_DODGEMS_FLOOR | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 30, 30, 1, height, 1, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 30, 30, 1 }, { 1, 1, height });
if (ride != nullptr)
{

View File

@ -32,18 +32,16 @@ static constexpr const uint8_t edges_1x4_nw_se[] = {
struct ferris_wheel_bound_box
{
int16_t length_x;
int16_t length_y;
int16_t offset_x;
int16_t offset_y;
CoordsXY length;
CoordsXY offset;
};
/** rct2: 0x008A8CA8 */
static ferris_wheel_bound_box ferris_wheel_data[] = {
{ 31, 16, 1, 8 },
{ 16, 31, 8, 1 },
{ 31, 16, 1, 8 },
{ 16, 31, 8, 1 },
static constexpr ferris_wheel_bound_box ferris_wheel_data[] = {
{ { 31, 16 }, { 1, 8 } },
{ { 16, 31 }, { 8, 1 } },
{ { 31, 16 }, { 1, 8 } },
{ { 16, 31 }, { 8, 1 } },
};
/**
@ -89,17 +87,16 @@ static void paint_ferris_wheel_structure(
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(ride->vehicle_colours[0].Body, ride->vehicle_colours[0].Trim);
}
ferris_wheel_bound_box boundBox = ferris_wheel_data[direction];
const ferris_wheel_bound_box& boundBox = ferris_wheel_data[direction];
imageId = (22150 + (direction & 1) * 2) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, imageId, { xOffset, yOffset, height }, { boundBox.length, 127 }, { boundBox.offset, height });
imageId = (baseImageId + direction * 8 + imageOffset) | imageColourFlags;
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, imageId, xOffset, yOffset, boundBox.length.x, boundBox.length.y, 127, height, boundBox.offset.x,
boundBox.offset.y, height);
if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)
{
@ -115,15 +112,15 @@ static void paint_ferris_wheel_structure(
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[i], vehicle->peep_tshirt_colours[i + 1]);
imageId = (baseImageId + 32 + direction * 128 + frameNum) | imageColourFlags;
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, imageId, xOffset, yOffset, boundBox.length.x, boundBox.length.y, 127, height, boundBox.offset.x,
boundBox.offset.y, height);
}
}
imageId = (22150 + (direction & 1) * 2 + 1) | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, imageId, xOffset, yOffset, boundBox.length.x, boundBox.length.y, 127, height, boundBox.offset.x,
boundBox.offset.y, height);
session->CurrentlyDrawnItem = savedTileElement;
session->InteractionType = ViewportInteractionItem::Ride;
@ -175,12 +172,12 @@ static void paint_ferris_wheel(
{
// Bound box is slightly different from track_paint_util_paint_fences
imageId = SPR_FENCE_ROPE_SE | colourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 0, 29, height + 3 });
}
if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, session->MapPosition, trackElement, ride, rotation))
{
imageId = SPR_FENCE_ROPE_SW | 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 });
}
}

View File

@ -17,15 +17,14 @@
struct haunted_house_bound_box
{
int16_t offset_x;
int16_t offset_y;
int16_t length_x;
int16_t length_y;
CoordsXY offset;
CoordsXY length;
};
/** rct2: 0x1428180 */
static haunted_house_bound_box haunted_house_data[] = {
{ 6, 0, 42, 24 }, { 0, 0, 0, 0 }, { -16, -16, 32, 32 }, { 0, 0, 0, 0 }, { 0, 6, 24, 42 }, { 0, 0, 0, 0 },
static constexpr haunted_house_bound_box haunted_house_data[] = {
{ { 6, 0 }, { 42, 24 } }, { { 0, 0 }, { 0, 0 } }, { { -16, -16 }, { 32, 32 } },
{ { 0, 0 }, { 0, 0 } }, { { 0, 6 }, { 24, 42 } }, { { 0, 0 }, { 0, 0 } },
};
/**
@ -56,10 +55,10 @@ static void paint_haunted_house_structure(
}
uint32_t imageId = (baseImageId + direction) | session->TrackColours[SCHEME_MISC];
haunted_house_bound_box boundBox = haunted_house_data[part];
const haunted_house_bound_box& boundBox = haunted_house_data[part];
PaintAddImageAsParent(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, imageId, { xOffset, yOffset, height }, { boundBox.length, 127 }, { boundBox.offset, height });
rct_drawpixelinfo* dpi = &session->DPI;
if (dpi->zoom_level <= 0 && frameNum != 0)
@ -81,8 +80,8 @@ static void paint_haunted_house_structure(
}
imageId = imageId | session->TrackColours[SCHEME_MISC];
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, imageId, xOffset, yOffset, boundBox.length.x, boundBox.length.y, 127, height, boundBox.offset.x,
boundBox.offset.y, height);
}
session->CurrentlyDrawnItem = savedTileElement;

View File

@ -451,13 +451,13 @@ static paint_struct* mini_golf_paint_util_7c(
if (direction & 1)
{
return PaintAddImageAsParent(
session, image_id, y_offset, x_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset,
bound_box_offset_y, bound_box_offset_x, bound_box_offset_z);
session, image_id, { y_offset, x_offset, z_offset }, { bound_box_length_y, bound_box_length_x, bound_box_length_z },
{ bound_box_offset_y, bound_box_offset_x, bound_box_offset_z });
}
return PaintAddImageAsParent(
session, image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset,
bound_box_offset_x, bound_box_offset_y, bound_box_offset_z);
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 });
}
static bool mini_golf_paint_util_should_draw_fence(paint_session* session, const TrackElement& trackElement)
@ -691,7 +691,7 @@ static void paint_mini_golf_station(
if (hasFence)
{
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, -10, 0, 1, 32, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, imageId, { -10, 0, height }, { 1, 32, 7 }, { 0, 0, height + 2 });
}
bool hasSWFence = track_paint_util_has_fence(
@ -714,7 +714,7 @@ static void paint_mini_golf_station(
if (hasFence)
{
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, -10, 32, 1, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, imageId, { 0, -10, height }, { 32, 1, 7 }, { 0, 0, height + 2 });
}
bool hasSEFence = track_paint_util_has_fence(
@ -859,13 +859,13 @@ static void paint_mini_golf_hole_ab(
imageId = sprites[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 }, { boundBoxOffset.x, boundBoxOffset.y, height + 24 });
if (drewSupports)
{
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
imageId = sprites[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(
@ -875,7 +875,7 @@ static void paint_mini_golf_hole_ab(
{
imageId = sprites[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
}
}
@ -943,7 +943,8 @@ static void paint_mini_golf_hole_c(
break;
default:
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 },
{ boundBoxOffset.x, boundBoxOffset.y, height + 24 });
break;
}
@ -951,7 +952,7 @@ static void paint_mini_golf_hole_c(
{
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(
@ -961,7 +962,7 @@ static void paint_mini_golf_hole_c(
{
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
}
}
@ -1026,7 +1027,8 @@ static void paint_mini_golf_hole_d(
break;
default:
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 },
{ boundBoxOffset.x, boundBoxOffset.y, height + 24 });
break;
}
@ -1044,7 +1046,7 @@ static void paint_mini_golf_hole_d(
{
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(
@ -1054,7 +1056,7 @@ static void paint_mini_golf_hole_d(
{
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
}
}
@ -1119,7 +1121,8 @@ static void paint_mini_golf_hole_e(
break;
default:
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 },
{ boundBoxOffset.x, boundBoxOffset.y, height + 24 });
break;
}
@ -1137,7 +1140,7 @@ static void paint_mini_golf_hole_e(
{
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(
@ -1147,7 +1150,7 @@ static void paint_mini_golf_hole_e(
{
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height });
}
}
@ -1239,7 +1242,7 @@ void vehicle_visual_mini_golf_player(
uint32_t image_id = rideEntry->vehicles[0].base_image_id + 1 + ebx;
uint32_t peep_palette = peep->TshirtColour << 19 | peep->TrousersColour << 24 | 0x0A0000000;
PaintAddImageAsParent(session, image_id | peep_palette, 0, 0, 1, 1, 11, z, 0, 0, z + 5);
PaintAddImageAsParent(session, image_id | peep_palette, { 0, 0, z }, { 1, 1, 11 }, { 0, 0, z + 5 });
}
/**

View File

@ -26,7 +26,7 @@ static void paint_mini_helicopters_track_station(
if (direction == 0 || direction == 2)
{
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 });
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
@ -38,7 +38,7 @@ static void paint_mini_helicopters_track_station(
else if (direction == 1 || direction == 3)
{
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 = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);
@ -64,13 +64,13 @@ static void paint_mini_helicopters_track_flat(
if (direction & 1)
{
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height, TUNNEL_0);
}
else
{
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height, TUNNEL_0);
}
@ -97,22 +97,22 @@ static void paint_mini_helicopters_track_flat_to_25_deg_up(
{
case 0:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height, TUNNEL_0);
break;
case 1:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height, TUNNEL_2);
break;
case 2:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height, TUNNEL_2);
break;
case 3:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_TO_25_DEG_UP_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height, TUNNEL_0);
break;
}
@ -138,22 +138,22 @@ static void paint_mini_helicopters_track_25_deg_up(
{
case 0:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height - 8, TUNNEL_1);
break;
case 1:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height + 8, TUNNEL_2);
break;
case 2:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height + 8, TUNNEL_2);
break;
case 3:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height - 8, TUNNEL_1);
break;
}
@ -179,22 +179,22 @@ static void paint_mini_helicopters_track_25_deg_up_to_flat(
{
case 0:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height - 8, TUNNEL_0);
break;
case 1:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height + 8, TUNNEL_12);
break;
case 2:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
paint_util_push_tunnel_left(session, height + 8, TUNNEL_12);
break;
case 3:
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_25_DEG_UP_TO_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 3 }, { 6, 0, height });
paint_util_push_tunnel_right(session, height - 8, TUNNEL_0);
break;
}

View File

@ -153,13 +153,13 @@ static paint_struct* paint_monorail_cycles_util_7c(
if (flip)
{
return PaintAddImageAsParent(
session, image_id, y_offset, x_offset, bound_box_length_y, bound_box_length_x, bound_box_length_z, z_offset,
bound_box_offset_y, bound_box_offset_x, bound_box_offset_z);
session, image_id, { y_offset, x_offset, z_offset }, { bound_box_length_y, bound_box_length_x, bound_box_length_z },
{ bound_box_offset_y, bound_box_offset_x, bound_box_offset_z });
}
return PaintAddImageAsParent(
session, image_id, x_offset, y_offset, bound_box_length_x, bound_box_length_y, bound_box_length_z, z_offset,
bound_box_offset_x, bound_box_offset_y, bound_box_offset_z);
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: 0x0088AD48 */
@ -199,7 +199,7 @@ static void paint_monorail_cycles_station(
if (direction == 0 || direction == 2)
{
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 });
imageId = SPR_MONORAIL_CYCLES_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
@ -211,7 +211,7 @@ static void paint_monorail_cycles_station(
else if (direction == 1 || direction == 3)
{
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 = SPR_MONORAIL_CYCLES_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);

View File

@ -65,7 +65,7 @@ void vehicle_visual_observation_tower(
{
image_id = (image_id & 0x7FFFF) | CONSTRUCTION_MARKER;
}
paint_struct* ps = PaintAddImageAsParent(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
paint_struct* ps = PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 2, 2, 41 }, { -11, -11, z + 1 });
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -73,7 +73,7 @@ void vehicle_visual_observation_tower(
image_id++;
ps = PaintAddImageAsParent(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
ps = PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 });
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -95,7 +95,7 @@ static void paint_observation_tower_base(
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr);
uint32_t imageId = SPR_FLOOR_METAL_B | 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 });
if (ride != nullptr)
{
@ -107,13 +107,13 @@ static void paint_observation_tower_base(
if (trackSequence == 0)
{
imageId = SPR_OBSERVATION_TOWER_SEGMENT_BASE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 32, 8, 8, height + 32);
PaintAddImageAsParent(session, imageId, { 0, 0, height + 32 }, { 2, 2, 30 }, { 8, 8, height + 32 });
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 64, 8, 8, height + 64);
PaintAddImageAsParent(session, imageId, { 0, 0, height + 64 }, { 2, 2, 30 }, { 8, 8, height + 64 });
paint_util_set_vertical_tunnel(session, height + 96);
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -170,7 +170,7 @@ static void paint_observation_tower_section(
}
uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
const TileElement* nextTileElement = reinterpret_cast<const TileElement*>(&trackElement) + 1;
if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ())

View File

@ -67,7 +67,7 @@ static void paint_space_rings_structure(
}
uint32_t imageId = (baseImageId + frameNum) | imageColourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 20, 20, 23, height, -10, -10, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 20, 23 }, { -10, -10, height });
if (vehicle != nullptr && vehicle->num_peeps > 0)
{
@ -111,12 +111,12 @@ static void paint_space_rings(
if (track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, session->CurrentRotation))
{
imageId = SPR_SPACE_RINGS_FENCE_SW | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 28, 7, height, 29, 0, height + 2);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 29, 0, height + 2 });
}
if (track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, session->CurrentRotation))
{
imageId = SPR_SPACE_RINGS_FENCE_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 2);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 0, 29, height + 2 });
}
break;
default:

View File

@ -60,7 +60,7 @@ static void spiral_slide_paint_tile_right(
if (direction == 3)
image_id = SPIRAL_SLIDE_RIGHT_R3 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 16, 16, 108, height, 16, 0, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 16, 108 }, { 16, 0, height + 3 });
}
static void spiral_slide_paint_tile_left(
@ -78,7 +78,7 @@ static void spiral_slide_paint_tile_left(
if (direction == 3)
image_id = SPIRAL_SLIDE_LEFT_R3 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 16, 16, 108, height, 0, 16, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 16, 108 }, { 0, 16, height + 3 });
}
static void spiral_slide_paint_tile_front(
@ -93,33 +93,33 @@ static void spiral_slide_paint_tile_front(
if (direction == 1)
{
image_id = SPIRAL_SLIDE_INSIDE_R1 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 2, 16, 108, height, -12, 0, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 2, 16, 108 }, { -12, 0, height + 3 });
}
else if (direction == 2)
{
image_id = SPIRAL_SLIDE_INSIDE_R2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 16, 2, 108, height, 0, -12, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 2, 108 }, { 0, -12, height + 3 });
}
if (direction == 0)
{
image_id = SPIRAL_SLIDE_CENTRE_R0 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 16, 8, 108, height, 0, 8, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 8, 108 }, { 0, 8, height + 3 });
}
else if (direction == 1)
{
image_id = SPIRAL_SLIDE_CENTRE_R1 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 2, 16, 108, height, 14, 0, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 2, 16, 108 }, { 14, 0, height + 3 });
}
else if (direction == 2)
{
image_id = SPIRAL_SLIDE_CENTRE_R2 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 16, 2, 108, height, 0, 14, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 16, 2, 108 }, { 0, 14, height + 3 });
}
else if (direction == 3)
{
image_id = SPIRAL_SLIDE_CENTRE_R3 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, image_id, 16, 16, 8, 16, 108, height, 8, 0, height + 3);
PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 8, 16, 108 }, { 8, 0, height + 3 });
}
rct_drawpixelinfo* dpi = &session->DPI;
@ -202,7 +202,7 @@ static void paint_spiral_slide(
// Base
uint32_t imageId = ((direction & 1) ? SPIRAL_SLIDE_BASE_B : SPIRAL_SLIDE_BASE_A) | 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 });
if (ride != nullptr)
{

View File

@ -51,8 +51,8 @@ static void facility_paint_setup(
uint32_t foundationImageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)
| session->TrackColours[SCHEME_3];
PaintAddImageAsParent(
session, foundationImageId, 0, 0, lengthX, lengthY, 29, height, direction == 3 ? 28 : 2, direction == 0 ? 28 : 2,
height);
session, foundationImageId, { 0, 0, height }, { lengthX, lengthY, 29 },
{ direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height });
// Door image or base
PaintAddImageAsChild(
@ -62,19 +62,20 @@ static void facility_paint_setup(
{
// Door image or base
PaintAddImageAsParent(
session, imageId, 0, 0, lengthX, lengthY, 29, height, direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height);
session, imageId, { 0, 0, height }, { lengthX, lengthY, 29 },
{ direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height });
}
// Base image if door was drawn
if (direction == 1)
{
imageId += 2;
PaintAddImageAsParent(session, imageId, 0, 0, 2, 28, 29, height, 28, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 28, 29 }, { 28, 2, height });
}
else if (direction == 2)
{
imageId += 4;
PaintAddImageAsParent(session, imageId, 0, 0, 28, 2, 29, height, 2, 28, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 2, 29 }, { 2, 28, height });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -52,13 +52,13 @@ static void shop_paint_setup(
{
uint32_t foundationImageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)
| session->TrackColours[SCHEME_3];
PaintAddImageAsParent(session, foundationImageId, 0, 0, 28, 28, 45, height, 2, 2, height);
PaintAddImageAsParent(session, foundationImageId, { 0, 0, height }, { 28, 28, 45 }, { 2, 2, height });
PaintAddImageAsChild(session, imageId, 0, 0, 28, 28, 45, height, 2, 2, height);
}
else
{
PaintAddImageAsParent(session, imageId, 0, 0, 28, 28, 45, height, 2, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 28, 45 }, { 2, 2, height });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -42,7 +42,8 @@ static void paint_3d_cinema_structure(
}
uint32_t imageId = (rideEntry->vehicles[0].base_image_id + direction) | imageColourFlags;
PaintAddImageAsParent(session, imageId, xOffset, yOffset, 24, 24, 47, height + 3, xOffset + 16, yOffset + 16, height + 3);
PaintAddImageAsParent(
session, imageId, { xOffset, yOffset, height + 3 }, { 24, 24, 47 }, { xOffset + 16, yOffset + 16, height + 3 });
session->CurrentlyDrawnItem = savedTileElement;
session->InteractionType = ViewportInteractionItem::Ride;

View File

@ -53,7 +53,7 @@ static void paint_enterprise_structure(
}
uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags;
PaintAddImageAsParent(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, { xOffset, yOffset, height }, { 24, 24, 48 }, { 0, 0, height });
rct_drawpixelinfo* dpi = &session->DPI;

View File

@ -44,11 +44,11 @@ void vehicle_visual_launched_freefall(
// Draw back:
int32_t baseImage_id = vehicleEntry->base_image_id + ((vehicle->restraints_position / 64) * 2);
auto image_id = (baseImage_id + 2) | imageFlags;
PaintAddImageAsParent(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 2, 2, 41 }, { -11, -11, z + 1 });
// Draw front:
image_id = (baseImage_id + 1) | imageFlags;
PaintAddImageAsParent(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 });
// Draw peeps:
if (session->DPI.zoom_level < 2 && vehicle->num_peeps > 0 && !vehicle->IsGhost())
@ -97,7 +97,7 @@ static void paint_launched_freefall_base(
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr);
uint32_t 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 });
if (ride != nullptr)
{
@ -109,15 +109,15 @@ static void paint_launched_freefall_base(
if (trackSequence == 0)
{
imageId = SPR_LAUNCHED_FREEFALL_TOWER_BASE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });
height += 32;
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
height += 32;
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
paint_util_set_vertical_tunnel(session, height + 32);
@ -171,7 +171,7 @@ static void paint_launched_freefall_tower_section(
}
uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
const TileElement* nextTileElement = reinterpret_cast<const TileElement*>(&trackElement) + 1;
if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ())

View File

@ -84,9 +84,7 @@ static void paint_magic_carpet_frame(
imageId |= session->TrackColours[SCHEME_TRACK];
if (plane == PLANE_BACK)
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bbSize.x, bbSize.y, 127, offset.z,
bbOffset.x, bbOffset.y, bbOffset.z);
PaintAddImageAsParent(session, imageId, offset, { bbSize.x, bbSize.y, 127 }, bbOffset);
}
else
{
@ -241,7 +239,7 @@ static void paint_magic_carpet(
}
uint32_t imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
break;
}

View File

@ -83,32 +83,38 @@ static void paint_motionsimulator_vehicle(
case 0:
// Simulator
imageId = simulatorImageId;
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 20, 20, 44 }, { offsetX, offsetY, offsetZ });
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsChild(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
// Stairs (rail)
imageId = (SPR_MOTION_SIMULATOR_STAIRS_RAIL_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 2, 44, offsetZ, offsetX, offsetY + 32, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 20, 2, 44 }, { offsetX, offsetY + 32, offsetZ });
break;
case 1:
// Simulator
imageId = simulatorImageId;
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 20, 20, 44 }, { offsetX, offsetY, offsetZ });
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsChild(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
// Stairs (rail)
imageId = (SPR_MOTION_SIMULATOR_STAIRS_RAIL_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 2, 20, 44, offsetZ, offsetX + 34, offsetY, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 2, 20, 44 }, { offsetX + 34, offsetY, offsetZ });
break;
case 2:
// Stairs (rail)
imageId = (SPR_MOTION_SIMULATOR_STAIRS_RAIL_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 2, 44, offsetZ, offsetX, offsetY - 10, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 20, 2, 44 }, { offsetX, offsetY - 10, offsetZ });
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY + 5, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 20, 20, 44 }, { offsetX, offsetY + 5, offsetZ });
// Simulator
imageId = simulatorImageId;
PaintAddImageAsChild(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY + 5, offsetZ);
@ -116,10 +122,12 @@ static void paint_motionsimulator_vehicle(
case 3:
// Stairs (rail)
imageId = (SPR_MOTION_SIMULATOR_STAIRS_RAIL_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 2, 20, 44, offsetZ, offsetX - 10, offsetY, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 2, 20, 44 }, { offsetX - 10, offsetY, offsetZ });
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX + 5, offsetY, offsetZ);
PaintAddImageAsParent(
session, imageId, { offsetX, offsetY, offsetZ }, { 20, 20, 44 }, { offsetX + 5, offsetY, offsetZ });
// Simulator
imageId = simulatorImageId;
PaintAddImageAsChild(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX + 5, offsetY, offsetZ);

View File

@ -52,11 +52,11 @@ void vehicle_visual_roto_drop(
// Draw back:
image_id = baseImage_id | imageFlags;
PaintAddImageAsParent(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 2, 2, 41 }, { -11, -11, z + 1 });
// Draw front:
image_id = (baseImage_id + 4) | imageFlags;
PaintAddImageAsParent(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsParent(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 });
if (vehicle->num_peeps > 0 && !vehicle->IsGhost())
{
@ -107,7 +107,7 @@ static void paint_roto_drop_base(
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_MISC], nullptr);
uint32_t imageId = SPR_FLOOR_METAL_B | 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 });
if (ride != nullptr)
{
@ -120,15 +120,15 @@ static void paint_roto_drop_base(
{
imageId = (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_90_DEG : SPR_ROTO_DROP_TOWER_BASE)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 27 }, { 8, 8, height + 3 });
imageId = (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_SEGMENT_90_DEG : SPR_ROTO_DROP_TOWER_BASE_SEGMENT)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 32, 8, 8, height + 32);
PaintAddImageAsParent(session, imageId, { 0, 0, height + 32 }, { 2, 2, 30 }, { 8, 8, height + 32 });
imageId = (direction & 1 ? SPR_ROTO_DROP_TOWER_BASE_SEGMENT_90_DEG : SPR_ROTO_DROP_TOWER_BASE_SEGMENT)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 64, 8, 8, height + 64);
PaintAddImageAsParent(session, imageId, { 0, 0, height + 64 }, { 2, 2, 30 }, { 8, 8, height + 64 });
paint_util_set_vertical_tunnel(session, height + 96);
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -186,7 +186,7 @@ static void paint_roto_drop_tower_section(
}
uint32_t imageId = SPR_ROTO_DROP_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height });
const TileElement* nextTileElement = reinterpret_cast<const TileElement*>(&trackElement) + 1;
if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ())

View File

@ -101,8 +101,8 @@ static void paint_swinging_inverter_ship_structure(
if (direction & 2)
{
PaintAddImageAsParent(
session, vehicleImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, vehicleImageId, { xOffset, yOffset, height }, { boundBox.length_x, boundBox.length_y, 127 },
{ boundBox.offset_x, boundBox.offset_y, height });
PaintAddImageAsChild(
session, frameImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
@ -110,8 +110,8 @@ static void paint_swinging_inverter_ship_structure(
else
{
PaintAddImageAsParent(
session, frameImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
session, frameImageId, { xOffset, yOffset, height }, { boundBox.length_x, boundBox.length_y, 127 },
{ boundBox.offset_x, boundBox.offset_y, height });
PaintAddImageAsChild(
session, vehicleImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
@ -143,17 +143,17 @@ static void paint_swinging_inverter_ship(
}
imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
switch (direction)
{
case 0:
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height + 9);
PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 });
break;
case 1:
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height + 9);
PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 });
break;
case 2:
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK];

View File

@ -113,8 +113,8 @@ static void paint_swinging_ship_structure(
imageId = swinging_ship_frame_sprites[(direction & 1)][0] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(
session, imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y,
height);
session, imageId, { xOffset, yOffset, height }, { bounds.length_x, bounds.length_y, 80 },
{ bounds.offset_x, bounds.offset_y, height });
imageId = baseImageId | imageColourFlags;
PaintAddImageAsChild(
@ -194,7 +194,7 @@ static void paint_swinging_ship(
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
imageId = SPR_STATION_BASE_A_NW_SE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
}
else
{
@ -202,7 +202,7 @@ static void paint_swinging_ship(
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
imageId = SPR_STATION_BASE_A_SW_NE | session->TrackColours[SCHEME_SUPPORTS];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -226,7 +226,7 @@ static void paint_swinging_ship(
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height + 9);
PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 });
hasFence = track_paint_util_has_fence(EDGE_SW, session->MapPosition, trackElement, ride, session->CurrentRotation);
if (relativeTrackSequence == 3)
@ -234,21 +234,21 @@ static void paint_swinging_ship(
if (hasFence)
{
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 });
}
else
{
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 23, 31, 8, 1, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 23, 31, height + 11 }, { 8, 1, 7 });
}
imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 31, 8, 1, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 8, 1, 7 });
}
else if (hasFence)
{
imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 });
}
}
}
@ -271,7 +271,7 @@ static void paint_swinging_ship(
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height + 9);
PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 });
hasFence = track_paint_util_has_fence(EDGE_SE, session->MapPosition, trackElement, ride, session->CurrentRotation);
if (relativeTrackSequence == 3)
@ -279,21 +279,21 @@ static void paint_swinging_ship(
if (hasFence)
{
imageId = SPR_STATION_BEGIN_ANGLE_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 });
}
else
{
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 31, 23, 1, 8, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 31, 23, height + 11 }, { 1, 8, 7 });
}
imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 31, 0, 1, 8, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 8, 7 });
}
else if (hasFence)
{
imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + 11);
PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 });
}
}
}

View File

@ -57,7 +57,8 @@ static void paint_twist_structure(
uint32_t structureFrameNum = frameNum % 24;
uint32_t imageId = (baseImageId + structureFrameNum) | 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;
@ -102,12 +103,12 @@ static void paint_twist(
if (track_paint_util_has_fence(EDGE_SW, session->MapPosition, trackElement, ride, session->CurrentRotation))
{
imageId = SPR_FENCE_ROPE_SW | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 1, 28, 7, height, 29, 0, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 29, 0, height + 3 });
}
if (track_paint_util_has_fence(EDGE_SE, session->MapPosition, trackElement, ride, session->CurrentRotation))
{
imageId = SPR_FENCE_ROPE_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 0, 29, height + 3 });
}
break;
default:

View File

@ -39,10 +39,10 @@ static void paint_lift_cage(paint_session* session, int8_t index, uint32_t colou
uint32_t imageId;
imageId = lift_cage_sprites[1 + index][0] | colourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 2, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 2, 2, height });
imageId = lift_cage_sprites[1 + index][1] | colourFlags;
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 28, 28, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 28, 28, height });
}
/** rct2: 0x0076C6CC */
@ -75,7 +75,7 @@ static void paint_lift_base(
int32_t edges = edges_3x3[trackSequence];
uint32_t imageId = SPR_FLOOR_METAL_B | 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 });
if (ride != nullptr)
{

View File

@ -1286,7 +1286,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles(
if (trackSequence == 1 && direction == 0)
{
uint32_t imageId = SPR_G2_MINIATURE_RAILWAY_QUARTER_TURN_3_TILES_SW_SE_PART_3 | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 8, 8, 2, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 8, 8, 2 }, { 0, 0, height });
}
}
else
@ -1442,8 +1442,7 @@ static void paint_miniature_railway_track_left_eighth_to_diag(
bounds = miniature_railway_track_pieces_right_eight_to_orthog_bounds[direction][index];
offset = miniature_railway_track_pieces_right_eight_to_orthog_offset[direction][index];
}
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, bounds, { offset, height });
}
}
else
@ -1452,8 +1451,7 @@ static void paint_miniature_railway_track_left_eighth_to_diag(
| session->TrackColours[SCHEME_SUPPORTS];
CoordsXY offset = miniature_railway_track_floor_pieces_left_eight_to_diag_offset[direction][trackSequence];
CoordsXYZ bounds = miniature_railway_track_floor_pieces_left_eight_to_diag_bounds[direction][trackSequence];
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, bounds, { offset, height });
int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence];
if (index >= 0)
@ -1582,8 +1580,7 @@ static void paint_miniature_railway_track_right_eighth_to_diag(
bounds = miniature_railway_track_pieces_left_eight_to_orthog_bounds[direction][index];
offset = miniature_railway_track_pieces_left_eight_to_orthog_offset[direction][index];
}
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, bounds, { offset, height });
}
}
else
@ -1592,8 +1589,7 @@ static void paint_miniature_railway_track_right_eighth_to_diag(
| session->TrackColours[SCHEME_SUPPORTS];
CoordsXY offset = miniature_railway_track_floor_pieces_right_eight_to_diag_offset[direction][trackSequence];
CoordsXYZ bounds = miniature_railway_track_floor_pieces_right_eight_to_diag_bounds[direction][trackSequence];
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, bounds, { offset, height });
int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence];
if (index >= 0)
@ -1709,8 +1705,8 @@ static void miniature_railway_track_diag_flat(
if (isSupported)
{
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height);
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], { 0, 0, height },
{ floorBoundSize, (drawRail ? 2 : 0) }, { floorBoundOffset, height });
if (drawRail)
{
PaintAddImageAsChild(
@ -1721,7 +1717,7 @@ static void miniature_railway_track_diag_flat(
else if (drawRail)
{
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -1804,9 +1800,9 @@ static void miniature_railway_track_diag_25_deg_up(
if (hasSupports)
{
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height + offsetsB[direction][trackSequence][0], floorBoundOffset.x, floorBoundOffset.y,
height + offsetsB[direction][trackSequence][1]);
session, floorImage | session->TrackColours[SCHEME_SUPPORTS],
{ 0, 0, height + offsetsB[direction][trackSequence][0] }, { floorBoundSize, (drawRail ? 2 : 0) },
{ floorBoundOffset, height + offsetsB[direction][trackSequence][1] });
if (drawRail)
{
PaintAddImageAsChild(
@ -1817,8 +1813,8 @@ static void miniature_railway_track_diag_25_deg_up(
else if (drawRail)
{
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + offsetB[direction]);
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + offsetB[direction] });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -1857,8 +1853,8 @@ static void miniature_railway_track_diag_flat_to_25_deg_up(
if (hasSupports)
{
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height);
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], { 0, 0, height },
{ floorBoundSize, (drawRail ? 2 : 0) }, { floorBoundOffset, height });
if (drawRail)
{
PaintAddImageAsChild(
@ -1869,7 +1865,7 @@ static void miniature_railway_track_diag_flat_to_25_deg_up(
else if (drawRail)
{
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -1931,9 +1927,9 @@ static void miniature_railway_track_diag_25_deg_up_to_flat(
if (hasSupports)
{
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height + offsetsB[direction][trackSequence][0], floorBoundOffset.x, floorBoundOffset.y,
height + offsetsB[direction][trackSequence][1]);
session, floorImage | session->TrackColours[SCHEME_SUPPORTS],
{ 0, 0, height + offsetsB[direction][trackSequence][0] }, { floorBoundSize, (drawRail ? 2 : 0) },
{ floorBoundOffset, height + offsetsB[direction][trackSequence][1] });
if (drawRail)
{
PaintAddImageAsChild(
@ -1944,8 +1940,8 @@ static void miniature_railway_track_diag_25_deg_up_to_flat(
else if (drawRail)
{
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + railOffsets[direction]);
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + railOffsets[direction] });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -2006,9 +2002,9 @@ static void miniature_railway_track_diag_25_deg_down(
if (hasSupports)
{
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height + offsetsB[direction][trackSequence][0], floorBoundOffset.x, floorBoundOffset.y,
height + offsetsB[direction][trackSequence][1]);
session, floorImage | session->TrackColours[SCHEME_SUPPORTS],
{ 0, 0, height + offsetsB[direction][trackSequence][0] }, { floorBoundSize, (drawRail ? 2 : 0) },
{ floorBoundOffset, height + offsetsB[direction][trackSequence][1] });
if (drawRail)
{
PaintAddImageAsChild(
@ -2019,8 +2015,8 @@ static void miniature_railway_track_diag_25_deg_down(
else if (drawRail)
{
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + railOffsets[direction]);
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + railOffsets[direction] });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -2080,9 +2076,9 @@ static void miniature_railway_track_diag_flat_to_25_deg_down(
if (hasSupports)
{
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height + offsetsB[direction][trackSequence][0], floorBoundOffset.x, floorBoundOffset.y,
height + offsetsB[direction][trackSequence][1]);
session, floorImage | session->TrackColours[SCHEME_SUPPORTS],
{ 0, 0, height + offsetsB[direction][trackSequence][0] }, { floorBoundSize, (drawRail ? 2 : 0) },
{ floorBoundOffset, height + offsetsB[direction][trackSequence][1] });
if (drawRail)
{
PaintAddImageAsChild(
@ -2093,8 +2089,8 @@ static void miniature_railway_track_diag_flat_to_25_deg_down(
else if (drawRail)
{
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + railOffsets[direction]);
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + railOffsets[direction] });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -2131,8 +2127,8 @@ static void miniature_railway_track_diag_25_deg_down_to_flat(
if (hasSupports)
{
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height);
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], { 0, 0, height },
{ floorBoundSize, (drawRail ? 2 : 0) }, { floorBoundOffset, height });
if (drawRail)
{
PaintAddImageAsChild(
@ -2143,7 +2139,7 @@ static void miniature_railway_track_diag_25_deg_down_to_flat(
else if (drawRail)
{
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -469,12 +469,12 @@ static void paint_monorail_station(
if (direction == 0 || direction == 2)
{
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 2 }, { 0, 2, height });
}
else if (direction == 1 || direction == 3)
{
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 2 }, { 2, 0, height });
}
}
@ -765,13 +765,11 @@ static void paint_monorail_track_s_bend_left(
CoordsXY bounds = boundsList[trackSequence];
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y, 3, height);
PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 });
}
else
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.y), static_cast<int8_t>(offset.x), bounds.y, bounds.x, 3, height);
PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 3 });
}
if (direction == 0 || direction == 2)
@ -871,13 +869,11 @@ static void paint_monorail_track_s_bend_right(
CoordsXY bounds = boundsList[trackSequence];
if (direction == 0 || direction == 2)
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.x), static_cast<int8_t>(offset.y), bounds.x, bounds.y, 3, height);
PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 });
}
else
{
PaintAddImageAsParent(
session, imageId, static_cast<int8_t>(offset.y), static_cast<int8_t>(offset.x), bounds.y, bounds.x, 3, height);
PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 3 });
}
if (direction == 0 || direction == 2)
@ -1007,7 +1003,7 @@ static void paint_monorail_track_left_eighth_to_diag(
uint32_t imageId = ghost_train_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK];
const CoordsXY offset = ghost_train_track_pieces_left_eight_to_diag_offset[direction][index];
const CoordsXY bounds = ghost_train_track_pieces_left_eight_to_diag_bounds[direction][index];
PaintAddImageAsParent(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height });
}
switch (trackSequence)
@ -1075,7 +1071,7 @@ static void paint_monorail_track_right_eighth_to_diag(
uint32_t imageId = ghost_train_track_pieces_right_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK];
const CoordsXY offset = ghost_train_track_pieces_right_eight_to_diag_offset[direction][index];
const CoordsXY bounds = ghost_train_track_pieces_right_eight_to_diag_bounds[direction][index];
PaintAddImageAsParent(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height });
}
switch (trackSequence)
@ -1174,7 +1170,7 @@ static void paint_monorail_track_diag_flat(
if (monorail_diag_image_segment[direction][trackSequence])
{
uint32_t imageId = monorail_track_pieces_diag_flat[direction] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
if (trackSequence == 3)
@ -1197,7 +1193,7 @@ static void paint_monorail_track_diag_25_deg_up(
if (monorail_diag_image_segment[direction][trackSequence])
{
uint32_t imageId = monorail_track_pieces_diag_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
if (trackSequence == 3)
@ -1220,7 +1216,7 @@ static void paint_monorail_track_diag_flat_to_25_deg_up(
if (monorail_diag_image_segment[direction][trackSequence])
{
uint32_t imageId = monorail_track_pieces_diag_flat_to_25_deg_up[direction] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
if (trackSequence == 3)
@ -1243,7 +1239,7 @@ static void paint_monorail_track_diag_25_deg_up_to_flat(
if (monorail_diag_image_segment[direction][trackSequence])
{
uint32_t imageId = monorail_track_pieces_diag_25_deg_up_to_flat[direction] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
if (trackSequence == 3)
@ -1266,7 +1262,7 @@ static void paint_monorail_track_diag_25_deg_down(
if (monorail_diag_image_segment[direction][trackSequence])
{
uint32_t imageId = monorail_track_pieces_diag_25_deg_up[(direction + 2) % 4] | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
if (trackSequence == 3)
@ -1290,7 +1286,7 @@ static void paint_monorail_track_diag_flat_to_25_deg_down(
{
uint32_t imageId = monorail_track_pieces_diag_25_deg_up_to_flat[(direction + 2) % 4]
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
if (trackSequence == 3)
@ -1314,7 +1310,7 @@ static void paint_monorail_track_diag_25_deg_down_to_flat(
{
uint32_t imageId = monorail_track_pieces_diag_flat_to_25_deg_up[(direction + 2) % 4]
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, { -16, -16, height }, { 32, 32, 2 }, { -16, -16, height });
}
if (trackSequence == 3)

View File

@ -196,7 +196,7 @@ static void paint_log_flume_track_station(
{
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
}
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
if (direction & 1)
{
@ -755,7 +755,7 @@ static void paint_log_flume_track_on_ride_photo(
const TrackElement& trackElement)
{
uint32_t imageId = SPR_STATION_BASE_D | IMAGE_TYPE_REMAP;
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
if (direction & 1)
{

View File

@ -229,7 +229,8 @@ void vehicle_visual_river_rapids(
image_id |= CONSTRUCTION_MARKER;
}
PaintAddImageAsParent(
session, image_id, 0, 0, bb->length_x, bb->length_y, bb->length_z, z, bb->offset_x, bb->offset_y, bb->offset_z + z);
session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z },
{ bb->offset_x, bb->offset_y, bb->offset_z + z });
if (session->DPI.zoom_level < 2 && vehicle->num_peeps > 0 && !vehicle->IsGhost())
{

View File

@ -749,21 +749,21 @@ static void paint_splash_boats_track_flat(
{
imageId = (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 2, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 2 }, { 6, 0, height });
imageId = (direction == 1 ? SPR_SPLASH_BOATS_FLAT_SIDE_NW_SE : SPR_SPLASH_BOATS_FLAT_SIDE_SE_NW)
| 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 });
}
else
{
imageId = (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 2, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 6, height });
imageId = (direction == 0 ? SPR_SPLASH_BOATS_FLAT_SIDE_SW_NE : SPR_SPLASH_BOATS_FLAT_SIDE_NE_SW)
| 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 });
}
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
@ -790,19 +790,19 @@ static void paint_splash_boats_station(
{
uint32_t imageId = (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height + 3 });
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
}
else
{
uint32_t imageId = (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW)
| session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height + 3);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height + 3 });
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height);
PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 });
}
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);

View File

@ -62,7 +62,8 @@ void vehicle_visual_submarine(
image_id = baseImage_id | imageFlags;
paint_struct* ps = PaintAddImageAsParent(
session, image_id, 0, 0, bb.length_x, bb.length_y, bb.length_z, z, bb.offset_x, bb.offset_y, bb.offset_z + z);
session, image_id, { 0, 0, z }, { bb.length_x, bb.length_y, bb.length_z },
{ bb.offset_x, bb.offset_y, bb.offset_z + z });
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -70,7 +71,7 @@ void vehicle_visual_submarine(
image_id = (baseImage_id + 1) | imageFlags;
ps = PaintAddImageAsParent(
session, image_id, 0, 0, bb.length_x, bb.length_y, 2, z, bb.offset_x, bb.offset_y, bb.offset_z + z - 10);
session, image_id, { 0, 0, z }, { bb.length_x, bb.length_y, 2 }, { bb.offset_x, bb.offset_y, bb.offset_z + z - 10 });
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -94,7 +95,7 @@ static void submarine_ride_paint_track_station(
if (direction & 1)
{
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, heightLower, 6, 0, heightLower);
PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 20, 32, 3 }, { 6, 0, heightLower });
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
track_paint_util_draw_pier(
@ -103,7 +104,7 @@ static void submarine_ride_paint_track_station(
else
{
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, heightLower, 0, 6, heightLower);
PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 32, 20, 3 }, { 0, 6, heightLower });
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
track_paint_util_draw_pier(
@ -124,13 +125,13 @@ static void submarine_ride_paint_track_flat(
if (direction & 1)
{
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, heightLower, 6, 0, heightLower);
PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 20, 32, 3 }, { 6, 0, heightLower });
paint_util_push_tunnel_right(session, heightLower, TUNNEL_0);
}
else
{
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, heightLower, 0, 6, heightLower);
PaintAddImageAsParent(session, imageId, { 0, 0, heightLower }, { 32, 20, 3 }, { 0, 6, heightLower });
paint_util_push_tunnel_left(session, heightLower, TUNNEL_0);
}