Rename main paint add image functions

This commit is contained in:
duncanspumpkin 2020-10-22 18:18:30 +01:00
parent 6abeeae4b7
commit d6669be939
61 changed files with 838 additions and 836 deletions

View File

@ -729,7 +729,7 @@ paint_struct* sub_98196C(
assert(static_cast<uint16_t>(bound_box_length_x) == static_cast<int16_t>(bound_box_length_x));
assert(static_cast<uint16_t>(bound_box_length_y) == static_cast<int16_t>(bound_box_length_y));
session->LastRootPS = nullptr;
session->LastPS = nullptr;
session->LastAttachedPS = nullptr;
if (session->NoPaintStructsAvailable())
@ -853,12 +853,12 @@ paint_struct* sub_98196C(
* @return (ebp) paint_struct on success (CF == 0), nullptr on failure (CF == 1)
*/
// Track Pieces, Shops.
paint_struct* sub_98197C(
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z)
{
session->LastRootPS = nullptr;
session->LastPS = nullptr;
session->LastAttachedPS = nullptr;
CoordsXYZ offset = { x_offset, y_offset, z_offset };
@ -892,8 +892,9 @@ paint_struct* sub_98197C(
* @param bound_box_offset_y (0x009DEA54)
* @param bound_box_offset_z (0x009DEA56)
* @return (ebp) paint_struct on success (CF == 0), nullptr on failure (CF == 1)
* Creates a paint struct but does not allocate to a paint quadrant. Result cannot be ignored!
*/
paint_struct* sub_98198C(
[[nodiscard]] paint_struct* PaintAddImageAsOrphan(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z)
@ -901,7 +902,7 @@ paint_struct* sub_98198C(
assert(static_cast<uint16_t>(bound_box_length_x) == static_cast<int16_t>(bound_box_length_x));
assert(static_cast<uint16_t>(bound_box_length_y) == static_cast<int16_t>(bound_box_length_y));
session->LastRootPS = nullptr;
session->LastPS = nullptr;
session->LastAttachedPS = nullptr;
CoordsXYZ offset = { x_offset, y_offset, z_offset };
@ -931,14 +932,15 @@ paint_struct* sub_98198C(
* @param bound_box_offset_y (0x009DEA54)
* @param bound_box_offset_z (0x009DEA56)
* @return (ebp) paint_struct on success (CF == 0), nullptr on failure (CF == 1)
* If there is no parent paint struct then image is added as a parent
*/
paint_struct* sub_98199C(
paint_struct* PaintAddImageAsChild(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
const CoordsXYZ& boundBoxOffset)
{
if (session->LastRootPS == nullptr)
if (session->LastPS == nullptr)
{
return sub_98197C(
return PaintAddImageAsParent(
session, image_id, offset.x, offset.y, boundBoxLength.x, boundBoxLength.y, boundBoxLength.z, offset.z,
boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
}
@ -950,20 +952,20 @@ paint_struct* sub_98199C(
return nullptr;
}
paint_struct* old_ps = session->LastRootPS;
paint_struct* parentPS = session->LastPS;
auto ps = session->AllocateRootPaintEntry(std::move(*newPS));
old_ps->children = ps;
parentPS->children = ps;
return ps;
}
paint_struct* sub_98199C(
paint_struct* PaintAddImageAsChild(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z)
{
assert(static_cast<uint16_t>(bound_box_length_x) == static_cast<int16_t>(bound_box_length_x));
assert(static_cast<uint16_t>(bound_box_length_y) == static_cast<int16_t>(bound_box_length_y));
return sub_98199C(
return PaintAddImageAsChild(
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 });
}
@ -1021,7 +1023,7 @@ bool PaintAttachToPreviousPS(paint_session* session, uint32_t image_id, int16_t
ps.y = y;
ps.flags = 0;
paint_struct* masterPs = session->LastRootPS;
paint_struct* masterPs = session->LastPS;
if (masterPs == nullptr)
{
return false;

View File

@ -147,7 +147,7 @@ struct paint_session
paint_entry* EndOfPaintStructArray;
paint_entry* NextFreePaintStruct;
CoordsXY SpritePosition;
paint_struct* LastRootPS;
paint_struct* LastPS;
attached_paint_struct* LastAttachedPS;
ViewportInteractionItem InteractionType;
uint8_t CurrentRotation;
@ -178,9 +178,9 @@ struct paint_session
constexpr paint_struct* AllocateRootPaintEntry(paint_struct&& entry) noexcept
{
NextFreePaintStruct->basic = entry;
LastRootPS = &NextFreePaintStruct->basic;
LastPS = &NextFreePaintStruct->basic;
NextFreePaintStruct++;
return LastRootPS;
return LastPS;
}
constexpr attached_paint_struct* AllocateAttachedPaintEntry(attached_paint_struct&& entry) noexcept
@ -225,19 +225,19 @@ extern bool gPaintWidePathsAsGhost;
paint_struct* sub_98196C(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset);
paint_struct* sub_98197C(
paint_struct* PaintAddImageAsParent(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z);
paint_struct* sub_98198C(
[[nodiscard]] paint_struct* PaintAddImageAsOrphan(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z);
paint_struct* sub_98199C(
paint_struct* PaintAddImageAsChild(
paint_session* session, uint32_t image_id, int8_t x_offset, int8_t y_offset, int16_t bound_box_length_x,
int16_t bound_box_length_y, int8_t bound_box_length_z, int16_t z_offset, int16_t bound_box_offset_x,
int16_t bound_box_offset_y, int16_t bound_box_offset_z);
paint_struct* sub_98199C(
paint_struct* PaintAddImageAsChild(
paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength,
const CoordsXYZ& boundBoxOffset);

View File

@ -34,13 +34,13 @@ paint_struct* sub_98197C_rotated(
{
if (direction & 1)
{
return sub_98197C(
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);
}
else
{
return sub_98197C(
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);
}
@ -53,13 +53,13 @@ paint_struct* sub_98199C_rotated(
{
if (direction & 1)
{
return sub_98199C(
return PaintAddImageAsChild(
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);
}
else
{
return sub_98199C(
return PaintAddImageAsChild(
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);
}

View File

@ -163,7 +163,7 @@ paint_session* Painter::CreateSession(rct_drawpixelinfo* dpi, uint32_t viewFlags
session->DPI = *dpi;
session->EndOfPaintStructArray = &session->PaintStructs[4000 - 1];
session->NextFreePaintStruct = session->PaintStructs;
session->LastRootPS = nullptr;
session->LastPS = nullptr;
session->LastAttachedPS = nullptr;
session->ViewFlags = viewFlags;
for (auto& quadrant : session->Quadrants)

View File

@ -521,9 +521,9 @@ bool wooden_a_supports_paint_setup(
{
imageId += word_97B3C4[slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
imageId |= imageColourFlags;
sub_98197C(session, imageId, 0, 0, 32, 32, 11, z, 0, 0, z + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 11, z, 0, 0, z + 2);
sub_98197C(session, imageId + 4, 0, 0, 32, 32, 11, z + 16, 0, 0, z + 16 + 2);
PaintAddImageAsParent(session, imageId + 4, 0, 0, 32, 32, 11, z + 16, 0, 0, z + 16 + 2);
hasSupports = true;
}
@ -552,7 +552,7 @@ bool wooden_a_supports_paint_setup(
imageId += word_97B3C4[slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
imageId |= imageColourFlags;
sub_98197C(session, imageId, 0, 0, 32, 32, 11, z, 0, 0, z + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 11, z, 0, 0, z + 2);
hasSupports = true;
}
z += 16;
@ -606,7 +606,7 @@ bool wooden_a_supports_paint_setup(
if (byte_97B23C[special].var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
{
sub_98197C(
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);
hasSupports = true;
@ -614,7 +614,7 @@ bool wooden_a_supports_paint_setup(
else
{
hasSupports = true;
paint_struct* ps = sub_98198C(
paint_struct* ps = PaintAddImageAsOrphan(
session, imageId, 0, 0, bBox.length.x, bBox.length.y, bBox.length.z, z, bBox.offset.x, bBox.offset.y,
bBox.offset.z + z);
if (ps != nullptr)
@ -697,10 +697,10 @@ bool wooden_b_supports_paint_setup(
{
imageId += word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
sub_98197C(session, imageId | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
baseHeight += 16;
sub_98197C(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2);
baseHeight += 16;
_9E32B1 = true;
@ -726,7 +726,7 @@ bool wooden_b_supports_paint_setup(
{
imageId += word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK];
sub_98197C(session, imageId | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, 3, baseHeight, 0, 0, baseHeight + 2);
baseHeight += 16;
_9E32B1 = true;
@ -788,14 +788,14 @@ bool wooden_b_supports_paint_setup(
if (supportsDesc.var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
{
sub_98197C(
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);
_9E32B1 = true;
}
else
{
paint_struct* paintStruct = sub_98198C(
paint_struct* paintStruct = PaintAddImageAsOrphan(
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);
_9E32B1 = true;
@ -999,7 +999,7 @@ bool metal_a_supports_paint_setup(
image_id += z - 1;
image_id |= imageColourFlags;
sub_98197C(session, image_id, xOffset, yOffset, 0, 0, 0, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
PaintAddImageAsParent(session, image_id, xOffset, yOffset, 0, 0, 0, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
height += z;
}
@ -1177,7 +1177,7 @@ bool metal_b_supports_paint_setup(
}
uint32_t imageId = _97B15C[supportType].beam_id + (beamLength - 1);
sub_98197C(
PaintAddImageAsParent(
session, imageId | imageColourFlags, SupportBoundBoxes[originalSegment].x, SupportBoundBoxes[originalSegment].y,
0, 0, 0, baseHeight, SupportBoundBoxes[originalSegment].x, SupportBoundBoxes[originalSegment].y, height);
baseHeight += beamLength;
@ -1250,10 +1250,10 @@ bool path_a_supports_paint_setup(
uint32_t imageId = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
+ railingEntry->bridge_image;
sub_98197C(session, imageId | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
baseHeight += 16;
sub_98197C(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(session, (imageId + 4) | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
baseHeight += 16;
hasSupports = true;
@ -1271,7 +1271,7 @@ bool path_a_supports_paint_setup(
uint32_t ebx = (supportType * 24) + word_97B3C4[session->Support.slope & TILE_ELEMENT_SURFACE_SLOPE_MASK]
+ railingEntry->bridge_image;
sub_98197C(session, ebx | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
PaintAddImageAsParent(session, ebx | imageColourFlags, 0, 0, 32, 32, 11, baseHeight, 0, 0, baseHeight + 2);
hasSupports = true;
baseHeight += 16;
@ -1310,14 +1310,14 @@ bool path_a_supports_paint_setup(
if (supportsDesc.var_6 == 0 || session->WoodenSupportsPrependTo == nullptr)
{
sub_98197C(
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);
hasSupports = true;
}
else
{
paint_struct* paintStruct = sub_98198C(
paint_struct* paintStruct = PaintAddImageAsOrphan(
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);
hasSupports = true;
@ -1479,7 +1479,7 @@ bool path_b_supports_paint_setup(
}
uint32_t imageId = railingEntry->bridge_image + 20 + (z - 1);
sub_98197C(
PaintAddImageAsParent(
session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0, 0,
baseHeight, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight);

View File

@ -367,7 +367,7 @@ void virtual_floor_paint(paint_session* session)
if (paintEdges & EDGE_NE)
{
sub_98197C(
PaintAddImageAsParent(
session,
SPR_G2_SELECTION_EDGE_NE
| (!(occupiedEdges & EDGE_NE) ? ((litEdges & EDGE_NE) ? remap_lit : remap_base) : remap_edge),
@ -375,7 +375,7 @@ void virtual_floor_paint(paint_session* session)
}
if (paintEdges & EDGE_SE)
{
sub_98197C(
PaintAddImageAsParent(
session,
SPR_G2_SELECTION_EDGE_SE
| (!(occupiedEdges & EDGE_SE) ? ((litEdges & EDGE_SE) ? remap_lit : remap_base) : remap_edge),
@ -383,7 +383,7 @@ void virtual_floor_paint(paint_session* session)
}
if (paintEdges & EDGE_SW)
{
sub_98197C(
PaintAddImageAsParent(
session,
SPR_G2_SELECTION_EDGE_SW
| (!(occupiedEdges & EDGE_SW) ? ((litEdges & EDGE_SW) ? remap_lit : remap_base) : remap_edge),
@ -391,7 +391,7 @@ void virtual_floor_paint(paint_session* session)
}
if (paintEdges & EDGE_NW)
{
sub_98197C(
PaintAddImageAsParent(
session,
SPR_G2_SELECTION_EDGE_NW
| (!(occupiedEdges & EDGE_NW) ? ((litEdges & EDGE_NW) ? remap_lit : remap_base) : remap_edge),
@ -405,7 +405,7 @@ void virtual_floor_paint(paint_session* session)
{
int32_t imageColourFlats = SPR_G2_SURFACE_GLASSY_RECOLOURABLE | IMAGE_TYPE_REMAP | IMAGE_TYPE_TRANSPARENT
| PALETTE_WATER << 19;
sub_98197C(session, imageColourFlats, 0, 0, 30, 30, 0, _virtualFloorHeight, 2, 2, _virtualFloorHeight - 3);
PaintAddImageAsParent(session, imageColourFlats, 0, 0, 30, 30, 0, _virtualFloorHeight, 2, 2, _virtualFloorHeight - 3);
}
}

View File

@ -81,7 +81,7 @@ void litter_paint(paint_session* session, const Litter* litter, int32_t imageDir
uint32_t image_id = imageDirection + litter_sprites[litter->type].base_id;
// In the following call to sub_98197C, we add 4 (instead of 2) to the
// 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
sub_98197C(session, image_id, 0, 0, 4, 4, -1, litter->z, -4, -4, litter->z + 4);
PaintAddImageAsParent(session, image_id, 0, 0, 4, 4, -1, litter->z, -4, -4, litter->z + 4);
}

View File

@ -75,32 +75,32 @@ void peep_paint(paint_session* session, const Peep* peep, int32_t imageDirection
imageOffset = 0;
}
// In the following 4 calls to sub_98197C/sub_98199C, we add 5 (instead of 3) to the
// In the following 4 calls to PaintAddImageAsParent/PaintAddImageAsChild, we add 5 (instead of 3) to the
// bound_box_offset_z to make sure peeps are drawn on top of railways
uint32_t baseImageId = (imageDirection >> 3) + GetPeepAnimation(peep->SpriteType, actionSpriteType).base_image
+ imageOffset * 4;
uint32_t imageId = baseImageId | peep->TshirtColour << 19 | peep->TrousersColour << 24 | IMAGE_TYPE_REMAP
| IMAGE_TYPE_REMAP_2_PLUS;
sub_98197C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
if (baseImageId >= 10717 && baseImageId < 10749)
{
imageId = (baseImageId + 32) | peep->HatColour << 19 | IMAGE_TYPE_REMAP;
sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
PaintAddImageAsChild(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
return;
}
if (baseImageId >= 10781 && baseImageId < 10813)
{
imageId = (baseImageId + 32) | peep->BalloonColour << 19 | IMAGE_TYPE_REMAP;
sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
PaintAddImageAsChild(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
return;
}
if (baseImageId >= 11197 && baseImageId < 11229)
{
imageId = (baseImageId + 32) | peep->UmbrellaColour << 19 | IMAGE_TYPE_REMAP;
sub_98199C(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
PaintAddImageAsChild(session, imageId, 0, 0, 1, 1, 11, peep->z, 0, 0, peep->z + 5);
return;
}
}

View File

@ -79,12 +79,12 @@ void banner_paint(paint_session* session, uint8_t direction, int32_t height, con
image_id |= (banner->colour << 19) | IMAGE_TYPE_REMAP;
}
sub_98197C(session, image_id, 0, 0, 1, 1, 0x15, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 0x15, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
boundBoxOffset.x = BannerBoundBoxes[direction][1].x;
boundBoxOffset.y = BannerBoundBoxes[direction][1].y;
image_id++;
sub_98197C(session, image_id, 0, 0, 1, 1, 0x15, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 0x15, height, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
// Opposite direction
direction = direction_reverse(direction);
@ -118,5 +118,5 @@ void banner_paint(paint_session* session, uint8_t direction, int32_t height, con
uint16_t string_width = gfx_get_string_width(gCommonStringFormatBuffer);
uint16_t scroll = (gCurrentTicks / 2) % string_width;
auto scrollIndex = scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK);
sub_98199C(session, scrollIndex, 0, 0, 1, 1, 0x15, height + 22, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
PaintAddImageAsChild(session, scrollIndex, 0, 0, 1, 1, 0x15, height + 22, boundBoxOffset.x, boundBoxOffset.y, boundBoxOffset.z);
}

View File

@ -120,7 +120,7 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
int16_t lengthY = (direction & 1) ? 28 : 2;
int16_t lengthX = (direction & 1) ? 2 : 28;
sub_98197C(session, image_id, 0, 0, lengthX, lengthY, ah, height, 2, 2, height);
PaintAddImageAsParent(session, image_id, 0, 0, lengthX, lengthY, ah, height, 2, 2, height);
if (transparant_image_id)
{
@ -133,18 +133,18 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
transparant_image_id |= stationObj->BaseImageId + direction + 16;
}
sub_98199C(session, transparant_image_id, 0, 0, lengthX, lengthY, ah, height, 2, 2, height);
PaintAddImageAsChild(session, transparant_image_id, 0, 0, lengthX, lengthY, ah, height, 2, 2, height);
}
image_id += 4;
sub_98197C(
PaintAddImageAsParent(
session, image_id, 0, 0, lengthX, lengthY, ah, height, (direction & 1) ? 28 : 2, (direction & 1) ? 2 : 28, height);
if (transparant_image_id)
{
transparant_image_id += 4;
sub_98199C(
PaintAddImageAsChild(
session, transparant_image_id, 0, 0, lengthX, lengthY, ah, height, (direction & 1) ? 28 : 2,
(direction & 1) ? 2 : 28, height);
}
@ -188,7 +188,7 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
uint16_t stringWidth = gfx_get_string_width(entrance_string);
uint16_t scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0;
sub_98199C(
PaintAddImageAsChild(
session, scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, stationObj->ScrollingMode, COLOUR_BLACK),
0, 0, 0x1C, 0x1C, 0x33, height + stationObj->Height, 2, 2, height + stationObj->Height);
}
@ -249,7 +249,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;
sub_98197C(session, image_id, 0, 0, 32, 0x1C, 0, height, 0, 2, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 0x1C, 0, height, 0, 2, height);
}
entrance = static_cast<rct_entrance_type*>(object_entry_get_chunk(OBJECT_TYPE_PARK_ENTRANCE, 0));
@ -258,7 +258,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
return;
}
image_id = (entrance->image_id + direction * 3) | ghost_id;
sub_98197C(session, image_id, 0, 0, 0x1C, 0x1C, 0x2F, height, 2, 2, height + 32);
PaintAddImageAsParent(session, image_id, 0, 0, 0x1C, 0x1C, 0x2F, height, 2, 2, height + 32);
if ((direction + 1) & (1 << 1))
break;
@ -302,7 +302,7 @@ static void park_entrance_paint(paint_session* session, uint8_t direction, int32
int32_t stsetup = scrolling_text_setup(
session, STR_BANNER_TEXT_FORMAT, ft, scroll, entrance->scrolling_mode + direction / 2, COLOUR_BLACK);
int32_t text_height = height + entrance->text_height;
sub_98199C(session, stsetup, 0, 0, 0x1C, 0x1C, 0x2F, text_height, 2, 2, text_height);
PaintAddImageAsChild(session, stsetup, 0, 0, 0x1C, 0x1C, 0x2F, text_height, 2, 2, text_height);
}
break;
case 1:
@ -313,7 +313,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;
sub_98197C(session, image_id, 0, 0, 0x1A, di, 0x4F, height, 3, 3, height);
PaintAddImageAsParent(session, image_id, 0, 0, 0x1A, di, 0x4F, height, 3, 3, height);
break;
}
@ -344,7 +344,7 @@ void entrance_paint(paint_session* session, uint8_t direction, int32_t height, c
uint32_t image_id = 0x20101689 + get_height_marker_offset() + (z / 16);
image_id -= gMapBaseZ;
sub_98197C(session, image_id, 16, 16, 1, 1, 0, height, 31, 31, z + 64);
PaintAddImageAsParent(session, image_id, 16, 16, 1, 1, 0, height, 31, 31, z + 64);
}
}

View File

@ -276,7 +276,7 @@ void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t hei
boxlength.x = s98E3C4[esi].length.x;
boxlength.y = s98E3C4[esi].length.y;
boxlength.z = ah;
sub_98197C(session, image_id, 0, 0, boxlength.x, boxlength.y, ah, height, boxoffset.x, boxoffset.y, boxoffset.z);
PaintAddImageAsParent(session, image_id, 0, 0, boxlength.x, boxlength.y, ah, height, boxoffset.x, boxoffset.y, boxoffset.z);
if (entry->large_scenery.scrolling_mode == SCROLLING_MODE_NONE || direction == 1 || direction == 2)
{
large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile);
@ -444,7 +444,7 @@ void large_scenery_paint(paint_session* session, uint8_t direction, uint16_t hei
uint16_t stringWidth = gfx_get_string_width(signString);
uint16_t scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0;
sub_98199C(
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);
}

View File

@ -107,7 +107,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 2, 16, 1, 1, 23, height, 3, 16, height + 2);
PaintAddImageAsParent(session, imageId, 2, 16, 1, 1, 23, height, 3, 16, height + 2);
}
if (!(edges & EDGE_SE))
{
@ -118,7 +118,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 16, 30, 1, 0, 23, height, 16, 29, height + 2);
PaintAddImageAsParent(session, imageId, 16, 30, 1, 0, 23, height, 16, 29, height + 2);
}
if (!(edges & EDGE_SW))
@ -130,7 +130,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 30, 16, 0, 1, 23, height, 29, 16, height + 2);
PaintAddImageAsParent(session, imageId, 30, 16, 0, 1, 23, height, 29, 16, height + 2);
}
if (!(edges & EDGE_NW))
@ -142,7 +142,7 @@ static void path_bit_lights_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 16, 2, 1, 1, 23, height, 16, 3, height + 2);
PaintAddImageAsParent(session, imageId, 16, 2, 1, 1, 23, height, 16, 3, height + 2);
}
}
@ -176,7 +176,7 @@ static void path_bit_bins_paint(
}
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
sub_98197C(session, imageId, 7, 16, 1, 1, 7, height, 7, 16, height + 2);
PaintAddImageAsParent(session, imageId, 7, 16, 1, 1, 7, height, 7, 16, height + 2);
}
if (!(edges & EDGE_SE))
{
@ -197,7 +197,7 @@ static void path_bit_bins_paint(
}
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
sub_98197C(session, imageId, 16, 25, 1, 1, 7, height, 16, 25, height + 2);
PaintAddImageAsParent(session, imageId, 16, 25, 1, 1, 7, height, 16, 25, height + 2);
}
if (!(edges & EDGE_SW))
@ -219,7 +219,7 @@ static void path_bit_bins_paint(
}
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
sub_98197C(session, imageId, 25, 16, 1, 1, 7, height, 25, 16, height + 2);
PaintAddImageAsParent(session, imageId, 25, 16, 1, 1, 7, height, 25, 16, height + 2);
}
if (!(edges & EDGE_NW))
@ -241,7 +241,7 @@ static void path_bit_bins_paint(
}
if (!(session->ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) || binIsFull || binsAreVandalised)
sub_98197C(session, imageId, 16, 7, 1, 1, 7, height, 16, 7, height + 2);
PaintAddImageAsParent(session, imageId, 16, 7, 1, 1, 7, height, 16, 7, height + 2);
}
}
@ -261,7 +261,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 7, 16, 0, 16, 7, height, 6, 8, height + 2);
PaintAddImageAsParent(session, imageId, 7, 16, 0, 16, 7, height, 6, 8, height + 2);
}
if (!(edges & EDGE_SE))
{
@ -272,7 +272,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 16, 25, 16, 0, 7, height, 8, 23, height + 2);
PaintAddImageAsParent(session, imageId, 16, 25, 16, 0, 7, height, 8, 23, height + 2);
}
if (!(edges & EDGE_SW))
@ -284,7 +284,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 25, 16, 0, 16, 7, height, 23, 8, height + 2);
PaintAddImageAsParent(session, imageId, 25, 16, 0, 16, 7, height, 23, 8, height + 2);
}
if (!(edges & EDGE_NW))
@ -296,7 +296,7 @@ static void path_bit_benches_paint(
imageId |= pathBitImageFlags;
sub_98197C(session, imageId, 16, 7, 16, 0, 7, height, 8, 6, height + 2);
PaintAddImageAsParent(session, imageId, 16, 7, 16, 0, 7, height, 8, 6, height + 2);
}
}
@ -310,10 +310,10 @@ static void path_bit_jumping_fountains_paint(
uint32_t imageId = pathBitEntry->image;
imageId |= pathBitImageFlags;
sub_98197C(session, imageId + 1, 0, 0, 1, 1, 2, height, 3, 3, height + 2);
sub_98197C(session, imageId + 2, 0, 0, 1, 1, 2, height, 3, 29, height + 2);
sub_98197C(session, imageId + 3, 0, 0, 1, 1, 2, height, 29, 29, height + 2);
sub_98197C(session, imageId + 4, 0, 0, 1, 1, 2, height, 29, 3, height + 2);
PaintAddImageAsParent(session, imageId + 1, 0, 0, 1, 1, 2, height, 3, 3, height + 2);
PaintAddImageAsParent(session, imageId + 2, 0, 0, 1, 1, 2, height, 3, 29, height + 2);
PaintAddImageAsParent(session, imageId + 3, 0, 0, 1, 1, 2, height, 29, 29, height + 2);
PaintAddImageAsParent(session, imageId + 4, 0, 0, 1, 1, 2, height, 29, 3, height + 2);
}
/**
@ -335,20 +335,20 @@ static void sub_6A4101(
& FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
{
case 0:
sub_98197C(session, 22 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
sub_98197C(session, 22 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 22 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 22 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
break;
case 1:
sub_98197C(session, 21 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
sub_98197C(session, 21 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 21 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 21 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
break;
case 2:
sub_98197C(session, 23 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
sub_98197C(session, 23 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 23 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 23 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
break;
case 3:
sub_98197C(session, 20 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
sub_98197C(session, 20 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 20 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 20 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
break;
}
}
@ -357,52 +357,52 @@ static void sub_6A4101(
switch (local_ebp)
{
case 1:
sub_98197C(session, 17 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
sub_98197C(session, 17 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 17 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 17 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
break;
case 2:
sub_98197C(session, 18 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(session, 18 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 18 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 18 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
break;
case 3:
sub_98197C(session, 17 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
sub_98197C(
PaintAddImageAsParent(session, 17 + base_image_id, 0, 4, 28, 1, 7, height, 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
sub_98197C(session, 25 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 25 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
break;
case 4:
sub_98197C(session, 19 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
sub_98197C(session, 19 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 19 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 19 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
break;
case 5:
sub_98197C(session, 15 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2);
sub_98197C(session, 15 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 15 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 15 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2);
break;
case 6:
sub_98197C(session, 18 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(session, 19 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
sub_98197C(session, 26 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
PaintAddImageAsParent(session, 18 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 19 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 26 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
break;
case 8:
sub_98197C(session, 16 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(session, 16 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 16 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 16 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
break;
case 9:
sub_98197C(session, 16 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
sub_98197C(session, 17 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
sub_98197C(session, 24 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, 16 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 17 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 24 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
break;
case 10:
sub_98197C(session, 14 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2);
sub_98197C(session, 14 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 14 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 14 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2);
break;
case 12:
sub_98197C(session, 16 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(
PaintAddImageAsParent(session, 16 + base_image_id, 4, 0, 1, 28, 7, height, 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
sub_98197C(session, 27 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 27 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
break;
default:
// purposely left empty
@ -431,13 +431,13 @@ static void sub_6A4101(
uint32_t imageId = (direction << 1) + base_image_id + 28;
// Draw pole in the back
sub_98197C(session, imageId, 0, 0, 1, 1, 21, height, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 21, height, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
// Draw pole in the front and banner
boundBoxOffsets.x = BannerBoundBoxes[direction][1].x;
boundBoxOffsets.y = BannerBoundBoxes[direction][1].y;
imageId++;
sub_98197C(session, imageId, 0, 0, 1, 1, 21, height, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 1, 21, height, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
direction--;
// If text shown
@ -473,7 +473,7 @@ static void sub_6A4101(
uint16_t stringWidth = gfx_get_string_width(gCommonStringFormatBuffer);
uint16_t scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0;
sub_98199C(
PaintAddImageAsChild(
session, scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK), 0, 0,
1, 1, 21, height + 7, boundBoxOffsets.x, boundBoxOffsets.y, boundBoxOffsets.z);
}
@ -500,20 +500,20 @@ static void sub_6A4101(
& FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK)
{
case 0:
sub_98197C(session, 8 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
sub_98197C(session, 8 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 8 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 8 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
break;
case 1:
sub_98197C(session, 7 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
sub_98197C(session, 7 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 7 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 7 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
break;
case 2:
sub_98197C(session, 9 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
sub_98197C(session, 9 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 9 + base_image_id, 0, 4, 32, 1, 23, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 9 + base_image_id, 0, 28, 32, 1, 23, height, 0, 28, height + 2);
break;
case 3:
sub_98197C(session, 6 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
sub_98197C(session, 6 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 6 + base_image_id, 4, 0, 1, 32, 23, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 6 + base_image_id, 28, 0, 1, 32, 23, height, 28, 0, height + 2);
break;
}
}
@ -530,128 +530,128 @@ static void sub_6A4101(
// purposely left empty
break;
case 1:
sub_98197C(session, 3 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
sub_98197C(session, 3 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 3 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 3 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
break;
case 2:
sub_98197C(session, 4 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(session, 4 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 4 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 4 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
break;
case 4:
sub_98197C(session, 5 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
sub_98197C(session, 5 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 5 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 5 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
break;
case 5:
sub_98197C(session, 1 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2);
sub_98197C(session, 1 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 1 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 1 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2);
break;
case 8:
sub_98197C(session, 2 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(session, 2 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 2 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 2 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
break;
case 10:
sub_98197C(session, 0 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2);
sub_98197C(session, 0 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 0 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 0 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2);
break;
case 3:
sub_98197C(session, 3 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
sub_98197C(
PaintAddImageAsParent(session, 3 + base_image_id, 0, 4, 28, 1, 7, height, 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
if (!(drawnCorners & FOOTPATH_CORNER_0))
{
sub_98197C(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
}
break;
case 6:
sub_98197C(session, 4 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(session, 5 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 4 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 5 + base_image_id, 0, 4, 28, 1, 7, height, 0, 4, height + 2);
if (!(drawnCorners & FOOTPATH_CORNER_1))
{
sub_98197C(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
}
break;
case 9:
sub_98197C(session, 2 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
sub_98197C(session, 3 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 2 + base_image_id, 28, 0, 1, 28, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 3 + base_image_id, 0, 28, 28, 1, 7, height, 0, 28, height + 2);
if (!(drawnCorners & FOOTPATH_CORNER_3))
{
sub_98197C(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
}
break;
case 12:
sub_98197C(session, 2 + base_image_id, 4, 0, 1, 28, 7, height, 4, 0, height + 2);
sub_98197C(
PaintAddImageAsParent(session, 2 + base_image_id, 4, 0, 1, 28, 7, height, 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
if (!(drawnCorners & FOOTPATH_CORNER_2))
{
sub_98197C(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
}
break;
case 7:
sub_98197C(session, 1 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2);
PaintAddImageAsParent(session, 1 + base_image_id, 0, 4, 32, 1, 7, height, 0, 4, height + 2);
if (!(drawnCorners & FOOTPATH_CORNER_0))
{
sub_98197C(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
}
if (!(drawnCorners & FOOTPATH_CORNER_1))
{
sub_98197C(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
}
break;
case 13:
sub_98197C(session, 1 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 1 + base_image_id, 0, 28, 32, 1, 7, height, 0, 28, height + 2);
if (!(drawnCorners & FOOTPATH_CORNER_2))
{
sub_98197C(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
}
if (!(drawnCorners & FOOTPATH_CORNER_3))
{
sub_98197C(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
}
break;
case 14:
sub_98197C(session, 0 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2);
PaintAddImageAsParent(session, 0 + base_image_id, 4, 0, 1, 32, 7, height, 4, 0, height + 2);
if (!(drawnCorners & FOOTPATH_CORNER_1))
{
sub_98197C(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
}
if (!(drawnCorners & FOOTPATH_CORNER_2))
{
sub_98197C(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
}
break;
case 11:
sub_98197C(session, 0 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 0 + base_image_id, 28, 0, 1, 32, 7, height, 28, 0, height + 2);
if (!(drawnCorners & FOOTPATH_CORNER_0))
{
sub_98197C(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
}
if (!(drawnCorners & FOOTPATH_CORNER_3))
{
sub_98197C(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
}
break;
case 15:
if (!(drawnCorners & FOOTPATH_CORNER_0))
{
sub_98197C(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
PaintAddImageAsParent(session, 11 + base_image_id, 0, 0, 4, 4, 7, height, 0, 28, height + 2);
}
if (!(drawnCorners & FOOTPATH_CORNER_1))
{
sub_98197C(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
PaintAddImageAsParent(session, 12 + base_image_id, 0, 0, 4, 4, 7, height, 28, 28, height + 2);
}
if (!(drawnCorners & FOOTPATH_CORNER_2))
{
sub_98197C(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
PaintAddImageAsParent(session, 13 + base_image_id, 0, 0, 4, 4, 7, height, 28, 0, height + 2);
}
if (!(drawnCorners & FOOTPATH_CORNER_3))
{
sub_98197C(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, 10 + base_image_id, 0, 0, 4, 4, 7, height, 0, 0, height + 2);
}
break;
}
@ -1042,7 +1042,7 @@ void path_paint_box_support(
if (!hasSupports || !session->DidPassSurface)
{
sub_98197C(
PaintAddImageAsParent(
session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, boundBoxOffset.y,
height + boundingBoxZOffset);
}
@ -1060,7 +1060,7 @@ void path_paint_box_support(
image_id = byte_98D8A4[edges] + railingEntry->bridge_image + 49;
}
sub_98197C(
PaintAddImageAsParent(
session, image_id | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, boundBoxOffset.y,
height + boundingBoxZOffset);
@ -1071,7 +1071,7 @@ void path_paint_box_support(
}
else
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x,
boundBoxOffset.y, height + boundingBoxZOffset);
}
@ -1192,7 +1192,7 @@ void path_paint_pole_support(
if (!hasSupports || !session->DidPassSurface)
{
sub_98197C(
PaintAddImageAsParent(
session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x, boundBoxOffset.y,
height + boundingBoxZOffset);
}
@ -1211,14 +1211,14 @@ void path_paint_pole_support(
bridgeImage |= imageFlags;
}
sub_98197C(
PaintAddImageAsParent(
session, bridgeImage | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x,
boundBoxOffset.y, height + boundingBoxZOffset);
// TODO: Revert this when path import works correctly.
if (pathElement->IsQueue() || pathElement->ShouldDrawPathOverSupports())
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x,
boundBoxOffset.y, height + boundingBoxZOffset);
}

View File

@ -154,7 +154,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
}
if (!(scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED)))
{
sub_98197C(
PaintAddImageAsParent(
session, baseImageid, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}
@ -167,7 +167,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
// TODO: Name palette entries
int32_t image_id = (baseImageid & 0x7FFFF) + (GlassPaletteIds[sceneryElement->GetPrimaryColour()] << 19)
+ 0x40000004;
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}
@ -187,7 +187,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
{
image_id = (image_id & 0x7FFFF) | dword_F64EB0;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}
@ -199,7 +199,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
{
image_id = (image_id & 0x7FFFF) | dword_F64EB0;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
@ -208,7 +208,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
{
image_id = (image_id & 0x7FFFF) | dword_F64EB0;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
@ -217,7 +217,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
{
image_id = (image_id & 0x7FFFF) | dword_F64EB0;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}
@ -246,7 +246,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
{
image_id = (image_id & 0x7FFFF) | dword_F64EB0;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
@ -260,7 +260,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
{
image_id = (image_id & 0x7FFFF) | dword_F64EB0;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}
@ -276,7 +276,7 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
{
image_id = (image_id & 0x7FFFF) | dword_F64EB0;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}
@ -321,13 +321,13 @@ void scenery_paint(paint_session* session, uint8_t direction, int32_t height, co
}
if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED))
{
sub_98197C(
PaintAddImageAsParent(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}
else
{
sub_98199C(
PaintAddImageAsChild(
session, image_id, x_offset, y_offset, boxlength.x, boxlength.y, boxlength.z - 1, height, boxoffset.x,
boxoffset.y, boxoffset.z);
}

View File

@ -714,7 +714,7 @@ static void viewport_surface_draw_tile_side_bottom(
}
uint32_t image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0);
sub_98197C(
PaintAddImageAsParent(
session, image_id, offset.x, offset.y, tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1, zOffset, 0, 0,
boundBoxOffsetZ);
@ -728,7 +728,7 @@ static void viewport_surface_draw_tile_side_bottom(
}
image_id = get_tunnel_image(edgeStyle, tunnelType) + (edge == EDGE_BOTTOMRIGHT ? 2 : 0) + 1;
sub_98197C(
PaintAddImageAsParent(
session, image_id, offset.x, offset.y, tunnelBounds.x, tunnelBounds.y, boundBoxLength - 1,
curHeight * COORDS_Z_PER_TINY_Z, tunnelTopBoundBoxOffset.x, tunnelTopBoundBoxOffset.y, boundBoxOffsetZ);
@ -1034,10 +1034,10 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
if (session->VerticalTunnelHeight * COORDS_Z_PER_TINY_Z == height)
{
// Vertical tunnels
sub_98197C(session, 1575, 0, 0, 1, 30, 39, height, -2, 1, height - 40);
sub_98197C(session, 1576, 0, 0, 30, 1, 0, height, 1, 31, height);
sub_98197C(session, 1577, 0, 0, 1, 30, 0, height, 31, 1, height);
sub_98197C(session, 1578, 0, 0, 30, 1, 39, height, 1, -2, height - 40);
PaintAddImageAsParent(session, 1575, 0, 0, 1, 30, 39, height, -2, 1, height - 40);
PaintAddImageAsParent(session, 1576, 0, 0, 30, 1, 0, height, 1, 31, height);
PaintAddImageAsParent(session, 1577, 0, 0, 1, 30, 0, height, 31, 1, height);
PaintAddImageAsParent(session, 1578, 0, 0, 30, 1, 39, height, 1, -2, height - 40);
}
else
{
@ -1108,9 +1108,9 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
image_id |= SPR_TERRAIN_SELECTION_PATROL_AREA + byte_97B444[local_surfaceShape];
image_id |= patrolColour << 19;
paint_struct* backup = session->LastRootPS;
paint_struct* backup = session->LastPS;
sub_98196C(session, image_id, 0, 0, 32, 32, 1, local_height);
session->LastRootPS = backup;
session->LastPS = backup;
}
}
@ -1144,9 +1144,9 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
{
const CoordsXY& pos = session->MapPosition;
const int32_t height2 = (tile_element_height({ pos.x + 16, pos.y + 16 })) + 3;
paint_struct* backup = session->LastRootPS;
paint_struct* backup = session->LastPS;
sub_98196C(session, SPR_LAND_OWNERSHIP_AVAILABLE, 16, 16, 1, 1, 0, height2);
session->LastRootPS = backup;
session->LastPS = backup;
}
}
@ -1161,9 +1161,9 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
{
const CoordsXY& pos = session->MapPosition;
const int32_t height2 = tile_element_height({ pos.x + 16, pos.y + 16 });
paint_struct* backup = session->LastRootPS;
paint_struct* backup = session->LastPS;
sub_98196C(session, SPR_LAND_CONSTRUCTION_RIGHTS_AVAILABLE, 16, 16, 1, 1, 0, height2 + 3);
session->LastRootPS = backup;
session->LastPS = backup;
}
}
@ -1216,9 +1216,9 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
const int32_t image_id = (SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape]) | 0x21300000;
paint_struct* backup = session->LastRootPS;
paint_struct* backup = session->LastPS;
sub_98196C(session, image_id, 0, 0, 32, 32, 1, local_height);
session->LastRootPS = backup;
session->LastPS = backup;
}
}
}
@ -1384,7 +1384,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
}
}
sub_98197C(
PaintAddImageAsParent(
session, image_id, fenceData.offset.x, fenceData.offset.y, fenceData.box_size.x, fenceData.box_size.y, 9,
local_height, fenceData.box_offset.x, fenceData.box_offset.y, local_height + 1);
}

View File

@ -201,7 +201,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
session->SpritePosition.y = y;
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
sub_98197C(session, imageId, 0, 0, 32, 32, -1, arrowZ, 0, 0, arrowZ + 18);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, -1, arrowZ, 0, 0, arrowZ + 18);
}
int32_t bx = dx + 52;
@ -371,7 +371,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
int32_t xOffset = sy * 10;
int32_t yOffset = -22 + sx * 10;
paint_struct* ps = sub_98197C(
paint_struct* ps = PaintAddImageAsParent(
session, 5504 | imageColourFlats, xOffset, yOffset, 10, 10, 1, segmentHeight, xOffset + 1, yOffset + 16,
segmentHeight);
if (ps != nullptr)

View File

@ -58,7 +58,7 @@ static void fence_paint_door(
{
paint_struct* ps;
ps = sub_98197C(
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);
if (ps != nullptr)
@ -66,7 +66,7 @@ static void fence_paint_door(
ps->tertiary_colour = tertiaryColour;
}
ps = sub_98197C(
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);
if (ps != nullptr)
@ -78,7 +78,7 @@ static void fence_paint_door(
{
paint_struct* ps;
ps = sub_98197C(
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);
if (ps != nullptr)
@ -86,7 +86,7 @@ static void fence_paint_door(
ps->tertiary_colour = tertiaryColour;
}
ps = sub_98199C(
ps = PaintAddImageAsChild(
session, imageId + 1, 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);
if (ps != nullptr)
@ -116,13 +116,13 @@ static void fence_paint_wall(
imageId = (imageId & 0x7FFFF) | dword_141F710;
}
sub_98197C(
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);
if (dword_141F710 == 0)
{
imageId = baseImageId + dword_141F718;
sub_98199C(
PaintAddImageAsChild(
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);
}
@ -139,7 +139,7 @@ static void fence_paint_wall(
imageId = (imageId & 0x7FFFF) | dword_141F710;
}
paint_struct* paint = sub_98197C(
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);
if (paint != nullptr)
@ -451,7 +451,7 @@ void fence_paint(paint_session* session, uint8_t direction, int32_t height, cons
uint16_t stringWidth = gfx_get_string_width(signString);
uint16_t scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0;
sub_98199C(
PaintAddImageAsChild(
session, scrolling_text_setup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollingMode, secondaryColour), 0, 0,
1, 1, 13, height + 8, boundsOffset.x, boundsOffset.y, boundsOffset.z);
}

View File

@ -252,7 +252,7 @@ void track_paint_util_paint_floor(
imageId = floorSprites[3];
}
sub_98197C(session, imageId | colourFlags, 0, 0, 32, 32, 1, height, 0, 0, height);
PaintAddImageAsParent(session, imageId | colourFlags, 0, 0, 32, 32, 1, height, 0, 0, height);
}
void track_paint_util_paint_fences(
@ -264,22 +264,22 @@ void track_paint_util_paint_fences(
if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, rotation))
{
imageId = fenceSprites[3] | colourFlags;
sub_98199C(session, imageId, 0, 0, 32, 1, 7, height, 0, 2, height + 2);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 1, 7, height, 0, 2, height + 2);
}
if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, rotation))
{
imageId = fenceSprites[0] | colourFlags;
sub_98199C(session, imageId, 0, 0, 1, 32, 7, height, 2, 0, height + 2);
PaintAddImageAsChild(session, imageId, 0, 0, 1, 32, 7, height, 2, 0, height + 2);
}
if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, rotation))
{
imageId = fenceSprites[1] | colourFlags;
sub_98197C(session, imageId, 0, 0, 32, 1, 7, height, 0, 30, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 7, height, 0, 30, height + 2);
}
if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, rotation))
{
imageId = fenceSprites[2] | colourFlags;
sub_98197C(session, imageId, 0, 0, 1, 32, 7, height, 30, 0, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 7, height, 30, 0, height + 2);
}
}
@ -817,7 +817,7 @@ bool track_paint_util_draw_station_covers_2(
if (baseImageId & IMAGE_TYPE_TRANSPARENT)
{
imageId = (baseImageId & ~IMAGE_TYPE_TRANSPARENT) + imageOffset;
sub_98197C(
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);
@ -825,14 +825,14 @@ bool track_paint_util_draw_station_covers_2(
// weird jump
imageId = (baseImageId | edi) + ((1 << 23) | (1 << 24) | (1 << 25)) + imageOffset + 12;
sub_98199C(
PaintAddImageAsChild(
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);
return true;
}
imageId = (baseImageId + imageOffset) | session->TrackColours[SCHEME_TRACK];
sub_98197C(
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);
return true;
@ -895,7 +895,7 @@ void track_paint_util_draw_pier(
hasFence = track_paint_util_has_fence(EDGE_NE, position, tileElement, ride, session->CurrentRotation);
imageId = (hasFence ? SPR_STATION_PIER_EDGE_NE_FENCED : SPR_STATION_PIER_EDGE_NE)
| session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, imageId, 0, 0, 6, 32, 1, height, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 6, 32, 1, height, 2, 0, height);
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
imageId = SPR_STATION_PIER_EDGE_SW | session->TrackColours[SCHEME_SUPPORTS];
@ -914,7 +914,7 @@ void track_paint_util_draw_pier(
hasFence = track_paint_util_has_fence(EDGE_NW, position, tileElement, ride, rotation);
imageId = (hasFence ? SPR_STATION_PIER_EDGE_NW_FENCED : SPR_STATION_PIER_EDGE_NW)
| session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, imageId, 0, 0, 32, 6, 1, height, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 6, 1, height, 0, 2, height);
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
imageId = SPR_STATION_PIER_EDGE_SE | session->TrackColours[SCHEME_SUPPORTS];
@ -1016,7 +1016,7 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction][index][0];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][0]);
sub_98197C(
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);
}
@ -1027,7 +1027,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]);
sub_98197C(
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);
}
@ -1114,7 +1114,7 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction][index][0];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][0]);
sub_98197C(
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);
}
@ -1125,7 +1125,7 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction][index][1];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][1]);
sub_98197C(
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);
}
@ -1285,7 +1285,7 @@ void track_paint_util_eighth_to_diag_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction][index];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]);
sub_98197C(
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);
}
@ -1326,7 +1326,7 @@ void track_paint_util_diag_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction]);
sub_98197C(
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);
}
@ -1448,7 +1448,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction][index];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]);
sub_98197C(
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);
}
@ -1465,7 +1465,7 @@ 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;
sub_98197C(
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);
@ -1624,7 +1624,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint(
CoordsXY boundsLength = boundsLengths[direction][index];
CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index]);
sub_98197C(
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);
}
@ -1655,13 +1655,13 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 16, 16, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 16, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
}
break;
@ -1670,13 +1670,13 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 16, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 0, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
}
break;
@ -1685,13 +1685,13 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 0, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 0, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
}
break;
@ -1700,13 +1700,13 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_2_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 0, 16, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 16, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
}
break;
@ -1723,7 +1723,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_3(
return;
}
const sprite_bb* spriteBB = &sprites[direction][sprite];
sub_98197C(
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,
@ -1848,13 +1848,13 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 16, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 0, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
}
break;
@ -1863,13 +1863,13 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 0, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 0, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
}
break;
@ -1878,13 +1878,13 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 0, 16, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 0, 16, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
}
break;
@ -1893,13 +1893,13 @@ void track_paint_util_left_quarter_turn_3_tiles_paint_with_height_offset(
switch (trackSequence)
{
case 0:
sub_98197C(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, thickness, height, 6, 0, height + heightOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 16, 16, thickness, height, 16, 16, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 16, 16, thickness, height, 16, 16, height + heightOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, thickness, height, 0, 6, height + heightOffset);
break;
}
break;
@ -1939,16 +1939,16 @@ void track_paint_util_left_quarter_turn_1_tile_paint(
switch (direction)
{
case 0:
sub_98197C(session, imageId, 0, 0, 26, 24, thickness, height, 6, 2, height + boundBoxZOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 26, 24, thickness, height, 6, 2, height + boundBoxZOffset);
break;
case 1:
sub_98197C(session, imageId, 0, 0, 26, 26, thickness, height, 0, 0, height + boundBoxZOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 26, 26, thickness, height, 0, 0, height + boundBoxZOffset);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 24, 26, thickness, height, 2, 6, height + boundBoxZOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 24, 26, thickness, height, 2, 6, height + boundBoxZOffset);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 24, 24, thickness, height, 6, 6, height + boundBoxZOffset);
PaintAddImageAsParent(session, imageId, 0, 0, 24, 24, thickness, height, 6, 6, height + boundBoxZOffset);
break;
}
}
@ -1994,21 +1994,21 @@ void track_paint_util_spinning_tunnel_paint(paint_session* session, int8_t thick
uint32_t imageId = trackSpritesGhostTrainSpinningTunnel[direction & 1][0][frame] | colourFlags;
if (direction == 0 || direction == 2)
{
sub_98199C(session, imageId, 0, 0, 28, 20, thickness, height, 2, 6, height);
PaintAddImageAsChild(session, imageId, 0, 0, 28, 20, thickness, height, 2, 6, height);
}
else
{
sub_98199C(session, imageId, 0, 0, 20, 28, thickness, height, 6, 2, height);
PaintAddImageAsChild(session, imageId, 0, 0, 20, 28, thickness, height, 6, 2, height);
}
imageId = trackSpritesGhostTrainSpinningTunnel[direction & 1][1][frame] | colourFlags;
if (direction == 0 || direction == 2)
{
sub_98197C(session, imageId, 0, 0, 26, 1, 23, height, 4, 28, height);
PaintAddImageAsParent(session, imageId, 0, 0, 26, 1, 23, height, 4, 28, height);
}
else
{
sub_98197C(session, imageId, 0, 0, 1, 26, 23, height, 28, 4, height);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 26, 23, height, 28, 4, height);
}
}
@ -2163,7 +2163,7 @@ void track_paint(paint_session* session, Direction direction, int32_t height, co
uint32_t imageId = SPRITE_ID_PALETTE_COLOUR_1(COLOUR_LIGHT_BLUE) | (0x1689 + get_height_marker_offset());
auto heightNum = (height + 8) / 16 - gMapBaseZ;
sub_98197C(session, imageId + heightNum, 16, 16, 1, 1, 0, height + ax + 3, 1000, 1000, 2047);
PaintAddImageAsParent(session, imageId + heightNum, 16, 16, 1, 1, 0, height + ax + 3, 1000, 1000, 2047);
}
}

View File

@ -915,7 +915,7 @@ static void vehicle_sprite_paint(
image_id &= 0x7FFFF;
image_id |= CONSTRUCTION_MARKER;
}
paint_struct* ps = sub_98197C(
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);
if (ps != nullptr)
{
@ -943,7 +943,7 @@ static void vehicle_sprite_paint(
image_id |= CONSTRUCTION_MARKER;
}
sub_98199C(
PaintAddImageAsChild(
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);
baseImage_id += vehicleEntry->no_vehicle_images;
@ -2981,7 +2981,7 @@ static void vehicle_visual_splash1_effect(paint_session* session, int32_t z, con
}
int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
+ ((gCurrentTicks / 2) & 7);
sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
PaintAddImageAsChild(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
}
/**
@ -3004,7 +3004,7 @@ static void vehicle_visual_splash2_effect(paint_session* session, int32_t z, con
}
int32_t image_id = 29046 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
+ ((gCurrentTicks / 2) & 7);
sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
PaintAddImageAsChild(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
}
/**
@ -3027,7 +3027,7 @@ static void vehicle_visual_splash3_effect(paint_session* session, int32_t z, con
}
int32_t image_id = 29014 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
+ ((gCurrentTicks / 2) & 7);
sub_98199C(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
PaintAddImageAsChild(session, image_id, 0, 0, 0, 0, 0, z, 0, 0, z);
}
/**
@ -3055,7 +3055,7 @@ static void vehicle_visual_splash4_effect(paint_session* session, int32_t z, con
}
int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
+ ((gCurrentTicks / 2) & 7);
sub_98199C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z);
PaintAddImageAsChild(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z);
}
/**
@ -3087,7 +3087,7 @@ static void vehicle_visual_splash5_effect(paint_session* session, int32_t z, con
}
int32_t image_id = 29078 + ((((vehicle->sprite_direction / 8) + session->CurrentRotation) & 3) * 8)
+ ((gCurrentTicks / 2) & 7);
sub_98199C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z);
PaintAddImageAsChild(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z);
}
void vehicle_visual_splash_effect(
@ -3143,7 +3143,7 @@ void vehicle_paint(paint_session* session, const Vehicle* vehicle, int32_t image
if (vehicle->flags & SPRITE_FLAGS_IS_CRASHED_VEHICLE_SPRITE)
{
uint32_t ebx = 22965 + vehicle->animation_frame;
sub_98197C(session, ebx, 0, 0, 1, 1, 0, z, 0, 0, z + 2);
PaintAddImageAsParent(session, ebx, 0, 0, 1, 1, 0, z, 0, 0, z + 2);
return;
}

View File

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

View File

@ -1652,7 +1652,7 @@ void junior_rc_paint_station(
{
// height -= 2 (height - 2)
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
// height += 2 (height)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER)
@ -1663,7 +1663,7 @@ void junior_rc_paint_station(
{
imageId = junior_rc_track_pieces_station[false][direction] | session->TrackColours[SCHEME_TRACK];
}
sub_98199C(session, imageId, 0, 6, 32, 20, 1, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 6, 32, 20, 1, height, 0, 0, height);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
@ -1674,7 +1674,7 @@ void junior_rc_paint_station(
{
// height -= 2 (height - 2)
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
// height += 2 (height)
if (tileElement->AsTrack()->GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER)
@ -1685,7 +1685,7 @@ void junior_rc_paint_station(
{
imageId = junior_rc_track_pieces_station[false][direction] | session->TrackColours[SCHEME_TRACK];
}
sub_98199C(session, imageId, 6, 0, 20, 32, 1, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 6, 0, 20, 32, 1, height, 0, 0, height);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
@ -1898,13 +1898,13 @@ static void junior_rc_flat_to_left_bank_paint_setup(
image_id = junior_rc_track_pieces_flat_to_left_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
paint_util_push_tunnel_right(session, height, 0);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
paint_util_push_tunnel_left(session, height, 0);
}
@ -1915,11 +1915,11 @@ static void junior_rc_flat_to_left_bank_paint_setup(
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 1, 32, 26, height, 27, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 26, height, 27, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 1, 26, height, 0, 27, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 26, height, 0, 27, height);
}
}
@ -1946,13 +1946,13 @@ static void junior_rc_flat_to_right_bank_paint_setup(
image_id = junior_rc_track_pieces_flat_to_right_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
paint_util_push_tunnel_right(session, height, 0);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
paint_util_push_tunnel_left(session, height, 0);
}
@ -1963,11 +1963,11 @@ static void junior_rc_flat_to_right_bank_paint_setup(
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 1, 32, 26, height, 27, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 26, height, 27, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 1, 26, height, 0, 27, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 26, height, 0, 27, height);
}
}
@ -2076,12 +2076,12 @@ static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup(
if (direction == 1 && trackSequence == 6)
{
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_NW_SW_PART_4_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
}
else if (direction == 3 && trackSequence == 0)
{
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_5_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height);
}
int32_t supportHeight = height;
@ -2174,11 +2174,11 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup(
image_id = junior_rc_track_pieces_left_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
}
if (junior_rc_track_pieces_left_banked_to_25_deg_up[direction][1] != 0)
@ -2187,11 +2187,11 @@ static void junior_rc_left_bank_to_25_deg_up_paint_setup(
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
}
}
@ -2234,11 +2234,11 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup(
image_id = junior_rc_track_pieces_right_banked_to_25_deg_up[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
}
if (junior_rc_track_pieces_right_banked_to_25_deg_up[direction][1] != 0)
@ -2247,11 +2247,11 @@ static void junior_rc_right_bank_to_25_deg_up_paint_setup(
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
}
}
@ -2307,13 +2307,13 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup(
image_id = junior_rc_track_pieces_25_deg_up_to_left_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
paint_util_push_tunnel_right(session, tunnelHeight, tunnelType);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
paint_util_push_tunnel_left(session, tunnelHeight, tunnelType);
}
@ -2324,11 +2324,11 @@ static void junior_rc_25_deg_up_to_left_bank_paint_setup(
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
}
}
@ -2368,13 +2368,13 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup(
image_id = junior_rc_track_pieces_25_deg_up_to_right_bank[direction][0] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 20, 32, 1, height, 6, 0, height);
paint_util_push_tunnel_right(session, tunnelHeight, tunnelType);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 20, 1, height, 0, 6, height);
paint_util_push_tunnel_left(session, tunnelHeight, tunnelType);
}
@ -2385,11 +2385,11 @@ static void junior_rc_25_deg_up_to_right_bank_paint_setup(
if (direction & 1)
{
sub_98197C(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 32, 34, height, 27, 0, height);
}
else
{
sub_98197C(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
PaintAddImageAsParent(session, image_id, 0, 0, 32, 1, 34, height, 0, 27, height);
}
}
@ -2468,7 +2468,7 @@ static void junior_rc_left_bank_paint_setup(
uint32_t image_id;
image_id = junior_rc_track_pieces_left_bank[direction] | session->TrackColours[SCHEME_TRACK];
sub_98197C(
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);
@ -3028,12 +3028,12 @@ static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup(
if (direction == 1 && trackSequence == 3)
{
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_NW_SW_PART_2_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
}
else if (direction == 3 && trackSequence == 0)
{
uint32_t imageId = SPR_JUNIOR_RC_BANKED_QUARTER_TURN_3_TILES_SE_NE_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height);
}
uint8_t supportType[2][4] = { { 1, 0, 0, 2 }, { 2, 0, 0, 1 } };
@ -3091,7 +3091,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up(
break;
}
if (imageId != 0)
sub_98197C(
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);
@ -3170,7 +3170,7 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down(
break;
}
if (imageId != 0)
sub_98197C(
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);
@ -4563,7 +4563,7 @@ static void junior_rc_diag_flat_to_left_bank_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
}
if (trackSequence == 3)
{
@ -4590,7 +4590,7 @@ static void junior_rc_diag_flat_to_right_bank_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
}
if (trackSequence == 3)
{
@ -4617,7 +4617,7 @@ static void junior_rc_diag_left_bank_to_flat_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
}
if (trackSequence == 3)
{
@ -4644,7 +4644,7 @@ static void junior_rc_diag_right_bank_to_flat_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_FLAT_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 27);
}
if (trackSequence == 3)
{
@ -4671,7 +4671,7 @@ static void junior_rc_diag_left_bank_to_25_deg_up_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4698,7 +4698,7 @@ static void junior_rc_diag_right_bank_to_25_deg_up_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4725,7 +4725,7 @@ static void junior_rc_diag_25_deg_up_to_left_bank_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4752,7 +4752,7 @@ static void junior_rc_diag_25_deg_up_to_right_bank_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4779,7 +4779,7 @@ static void junior_rc_diag_left_bank_to_25_deg_down_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_RIGHT_BANK_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4806,7 +4806,7 @@ static void junior_rc_diag_right_bank_to_25_deg_down_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_25_DEG_UP_TO_LEFT_BANK_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4833,7 +4833,7 @@ static void junior_rc_diag_25_deg_down_to_left_bank_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_RIGHT_BANK_TO_25_DEG_UP_E_W_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4860,7 +4860,7 @@ static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup(
{
uint32_t imageId = SPR_JUNIOR_RC_DIAG_LEFT_BANK_TO_25_DEG_UP_W_E_PART_0_2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 0, height, -16, -16, height + 35);
}
if (trackSequence == 3)
{
@ -4965,7 +4965,7 @@ void junior_rc_paint_track_60_deg_up(
image_id |= junior_rc_track_pieces_60_deg_up[EnumValue(chainType)][direction];
sub_98197C(
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,
@ -5041,7 +5041,7 @@ 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];
sub_98197C(
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,
@ -5056,7 +5056,7 @@ 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];
sub_98197C(
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,
@ -5120,7 +5120,7 @@ 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];
sub_98197C(
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,
@ -5135,7 +5135,7 @@ 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];
sub_98197C(
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,
@ -5258,7 +5258,7 @@ void junior_rc_paint_track_diag_60_deg_up_to_25_deg_up(
{
if (direction == 1 && trackSequence == 3)
{
sub_98197C(
PaintAddImageAsParent(
session,
junior_rc_track_pieces_diag_60_deg_up_to_25_deg_up[EnumValue(chainType)][direction]
| session->TrackColours[SCHEME_TRACK],
@ -5290,7 +5290,7 @@ void junior_rc_paint_track_diag_25_deg_down_to_60_deg_down(
{
if (direction == 3 && trackSequence == 0)
{
sub_98197C(
PaintAddImageAsParent(
session,
junior_rc_track_pieces_diag_25_deg_down_to_60_deg_down[EnumValue(chainType)][direction]
| session->TrackColours[SCHEME_TRACK],
@ -5437,7 +5437,7 @@ 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];
sub_98197C(
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,
@ -5451,7 +5451,7 @@ 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];
sub_98197C(
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,
@ -5506,7 +5506,7 @@ 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];
sub_98197C(
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,
@ -5520,7 +5520,7 @@ 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];
sub_98197C(
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,

View File

@ -200,13 +200,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];
sub_98197C(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
}
@ -225,11 +225,11 @@ static void paint_reverse_freefall_rc_station(
{
// height -= 2 (height - 2)
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
// height += 2 (height)
imageId = reverse_freefall_rc_track_pieces_station[direction] | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
wooden_a_supports_paint_setup(
session, (direction & 1) ? 1 : 0, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
@ -239,11 +239,11 @@ static void paint_reverse_freefall_rc_station(
{
// height -= 2 (height - 2)
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
// height += 2 (height)
imageId = reverse_freefall_rc_track_pieces_station[direction] | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height);
wooden_a_supports_paint_setup(
session, (direction & 1) ? 1 : 0, 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
@ -322,7 +322,7 @@ static void paint_reverse_freefall_rc_slope(
{
floorImageId = SPR_FLOOR_PLANKS | session->TrackColours[SCHEME_SUPPORTS];
}
sub_98197C(session, floorImageId, 0, 0, 26, 26, 126, height, 3, 3, height);
PaintAddImageAsParent(session, floorImageId, 0, 0, 26, 26, 126, height, 3, 3, height);
sub_98199C_rotated(
session, direction, supportsImageId, 0, 0, isDirection03 ? 26 : 18, 26, 126, height, isDirection03 ? 3 : 11,
3, height);
@ -364,7 +364,7 @@ static void paint_reverse_freefall_rc_vertical(
case 0:
supportsImageId = reverse_freefall_rc_track_pieces_vertical_supports[direction]
| session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, supportsImageId, 0, 0, 26, 26, 79, height, 3, 3, height);
PaintAddImageAsParent(session, supportsImageId, 0, 0, 26, 26, 79, height, 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

@ -180,7 +180,7 @@ void vehicle_visual_virginia_reel(
{
image_id = (image_id & 0x7FFFF) | CONSTRUCTION_MARKER;
}
sub_98197C(
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);
if (session->DPI.zoom_level < 2 && vehicle->num_peeps > 0 && !vehicle->IsGhost())
@ -196,7 +196,7 @@ void vehicle_visual_virginia_reel(
if (riding_peep_sprites[i] != 0xFF)
{
image_id = (baseImage_id + ((i + 1) * 72)) | SPRITE_ID_PALETTE_COLOUR_1(riding_peep_sprites[i]);
sub_98199C(
PaintAddImageAsChild(
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);
}
@ -220,12 +220,12 @@ static void paint_virginia_reel_track_flat(
uint32_t imageId = sprites[direction] | session->TrackColours[SCHEME_TRACK];
if (direction & 1)
{
sub_98197C(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
}
else
{
sub_98197C(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
}
@ -251,11 +251,11 @@ static void paint_virginia_reel_track_25_deg_up(
if (direction & 1)
{
ps = sub_98197C(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
ps = PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
}
else
{
ps = sub_98197C(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
}
if (direction == 1 || direction == 2)
@ -303,27 +303,27 @@ static void paint_virginia_reel_track_flat_to_25_deg_up(
switch (direction)
{
case 0:
sub_98197C(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 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 = sub_98197C(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
ps = PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 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 = sub_98197C(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 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:
sub_98197C(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 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);
@ -350,11 +350,11 @@ static void paint_virginia_reel_track_25_deg_up_to_flat(
if (direction & 1)
{
ps = sub_98197C(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
ps = PaintAddImageAsParent(session, imageId, 0, 0, 27, 32, 2, height, 2, 0, height);
}
else
{
ps = sub_98197C(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
ps = PaintAddImageAsParent(session, imageId, 0, 0, 32, 27, 2, height, 0, 2, height);
}
if (direction == 1 || direction == 2)
@ -420,20 +420,20 @@ static void paint_virginia_reel_station(
if (direction == 0 || direction == 2)
{
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
imageId = SPR_VIRGINIA_REEL_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 32, 20, 2, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 2, height, 0, 0, height);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
}
else if (direction == 1 || direction == 3)
{
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
imageId = SPR_VIRGINIA_REEL_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 20, 32, 2, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 2, height, 0, 0, height);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
}

View File

@ -733,16 +733,16 @@ static void wild_mouse_track_left_quarter_turn_1(
switch (direction)
{
case 0:
sub_98197C(session, imageId, 0, 0, 26, 24, 2, height, 6, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 26, 24, 2, height, 6, 2, height);
break;
case 1:
sub_98196C(session, imageId, 0, 0, 26, 26, 2, height);
break;
case 2:
sub_98197C(session, imageId, 0, 0, 24, 26, 2, height, 2, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 24, 26, 2, height, 2, 6, height);
break;
case 3:
sub_98197C(session, imageId, 0, 0, 24, 24, 2, height, 6, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 24, 24, 2, height, 6, 6, height);
break;
}
metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 4, -1, height, session->TrackColours[SCHEME_SUPPORTS]);

View File

@ -424,10 +424,10 @@ static void wooden_rc_track_paint_bb(paint_session* session, const sprite_bb_2*
uint32_t imageId = bb->sprite_id_a | wooden_rc_get_track_colour(session);
uint32_t railsImageId = bb->sprite_id_b | wooden_rc_get_rails_colour(session);
sub_98197C(
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);
sub_98199C(
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,
height + bb->bb_offset.z);

View File

@ -571,13 +571,13 @@ static void wooden_wild_mouse_track_left_quarter_turn_1(
switch (direction)
{
case 0:
sub_98197C(session, imageId, 6, 0, 26, 24, 1, height, 6, 2, height);
PaintAddImageAsParent(session, imageId, 6, 0, 26, 24, 1, height, 6, 2, height);
break;
case 1:
sub_98196C(session, imageId, 0, 0, 26, 26, 1, height);
break;
case 2:
sub_98197C(session, imageId, 0, 6, 24, 26, 1, height, 2, 6, height);
PaintAddImageAsParent(session, imageId, 0, 6, 24, 26, 1, height, 2, 6, height);
break;
case 3:
sub_98196C(session, imageId, 6, 6, 24, 24, 1, height);

View File

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

View File

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

View File

@ -57,7 +57,7 @@ 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];
sub_98197C(
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);
}

View File

@ -47,7 +47,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];
sub_98197C(session, imageId, 0, 0, 30, 30, 1, height, 1, 1, height);
PaintAddImageAsParent(session, imageId, 0, 0, 30, 30, 1, height, 1, 1, height);
auto ride = get_ride(rideIndex);
if (ride != nullptr)

View File

@ -91,12 +91,12 @@ static void paint_ferris_wheel_structure(
ferris_wheel_bound_box boundBox = ferris_wheel_data[direction];
imageId = (22150 + (direction & 1) * 2) | session->TrackColours[SCHEME_TRACK];
sub_98197C(
PaintAddImageAsParent(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
imageId = (baseImageId + direction * 8 + imageOffset) | imageColourFlags;
sub_98199C(
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
@ -113,14 +113,14 @@ static void paint_ferris_wheel_structure(
int32_t frameNum = (vehicle->vehicle_sprite_type + i * 4) % 128;
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[i], vehicle->peep_tshirt_colours[i + 1]);
imageId = (baseImageId + 32 + direction * 128 + frameNum) | imageColourFlags;
sub_98199C(
PaintAddImageAsChild(
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];
sub_98199C(
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
@ -160,23 +160,23 @@ static void paint_ferris_wheel(
if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, session->MapPosition, tileElement, ride, rotation))
{
imageId = SPR_FENCE_ROPE_NW | colourFlags;
sub_98199C(session, imageId, 0, 0, 32, 1, 7, height, 0, 2, height + 2);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 1, 7, height, 0, 2, height + 2);
}
if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, session->MapPosition, tileElement, ride, rotation))
{
imageId = SPR_FENCE_ROPE_NE | colourFlags;
sub_98199C(session, imageId, 0, 0, 1, 32, 7, height, 2, 0, height + 2);
PaintAddImageAsChild(session, imageId, 0, 0, 1, 32, 7, height, 2, 0, height + 2);
}
if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, session->MapPosition, tileElement, ride, rotation))
{
// Bound box is slightly different from track_paint_util_paint_fences
imageId = SPR_FENCE_ROPE_SE | colourFlags;
sub_98197C(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 3);
}
if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, session->MapPosition, tileElement, ride, rotation))
{
imageId = SPR_FENCE_ROPE_SW | colourFlags;
sub_98197C(session, imageId, 0, 0, 1, 32, 7, height, 30, 0, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 7, height, 30, 0, height + 2);
}
}

View File

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

View File

@ -58,7 +58,7 @@ static void paint_haunted_house_structure(
uint32_t imageId = (baseImageId + direction) | session->TrackColours[SCHEME_MISC];
haunted_house_bound_box boundBox = haunted_house_data[part];
sub_98197C(
PaintAddImageAsParent(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
@ -81,7 +81,7 @@ static void paint_haunted_house_structure(
break;
}
imageId = imageId | session->TrackColours[SCHEME_MISC];
sub_98199C(
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
}

View File

@ -81,87 +81,87 @@ static void maze_paint_setup(
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_CENTRE;
if (maze_entry & MAZE_ENTRY_FLAG_3)
sub_98197C(session, image_id, 2, 2, 10, 10, 9, height, 3, 3, height + 2);
PaintAddImageAsParent(session, image_id, 2, 2, 10, 10, 9, height, 3, 3, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_7)
sub_98197C(session, image_id, 2, 18, 10, 10, 9, height, 3, 19, height + 2);
PaintAddImageAsParent(session, image_id, 2, 18, 10, 10, 9, height, 3, 19, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_11)
sub_98197C(session, image_id, 18, 18, 10, 10, 9, height, 19, 19, height + 2);
PaintAddImageAsParent(session, image_id, 18, 18, 10, 10, 9, height, 19, 19, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_15)
sub_98197C(session, image_id, 18, 2, 10, 10, 9, height, 19, 3, height + 2);
PaintAddImageAsParent(session, image_id, 18, 2, 10, 10, 9, height, 19, 3, height + 2);
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_TOP_LEFT;
if (maze_entry & MAZE_ENTRY_FLAG_0)
sub_98197C(session, image_id, 2, 0, 10, 1, 9, height, 3, 1, height + 2);
PaintAddImageAsParent(session, image_id, 2, 0, 10, 1, 9, height, 3, 1, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_13)
sub_98197C(session, image_id, 18, 0, 10, 1, 9, height, 19, 1, height + 2);
PaintAddImageAsParent(session, image_id, 18, 0, 10, 1, 9, height, 19, 1, height + 2);
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_BOTTOM_RIGHT;
if (maze_entry & MAZE_ENTRY_FLAG_5)
sub_98197C(session, image_id, 2, 30, 10, 1, 9, height, 3, 30, height + 2);
PaintAddImageAsParent(session, image_id, 2, 30, 10, 1, 9, height, 3, 30, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_8)
sub_98197C(session, image_id, 18, 30, 10, 1, 9, height, 19, 30, height + 2);
PaintAddImageAsParent(session, image_id, 18, 30, 10, 1, 9, height, 19, 30, height + 2);
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_TOP_RIGHT;
if (maze_entry & MAZE_ENTRY_FLAG_1)
sub_98197C(session, image_id, 0, 2, 1, 10, 9, height, 1, 3, height + 2);
PaintAddImageAsParent(session, image_id, 0, 2, 1, 10, 9, height, 1, 3, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_4)
sub_98197C(session, image_id, 0, 18, 1, 10, 9, height, 1, 19, height + 2);
PaintAddImageAsParent(session, image_id, 0, 18, 1, 10, 9, height, 1, 19, height + 2);
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_BOTTOM_LEFT;
if (maze_entry & MAZE_ENTRY_FLAG_12)
sub_98197C(session, image_id, 30, 2, 1, 10, 9, height, 30, 3, height + 2);
PaintAddImageAsParent(session, image_id, 30, 2, 1, 10, 9, height, 30, 3, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_9)
sub_98197C(session, image_id, 30, 18, 1, 10, 9, height, 30, 19, height + 2);
PaintAddImageAsParent(session, image_id, 30, 18, 1, 10, 9, height, 30, 19, height + 2);
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_INNER_NE_SW;
if (maze_entry & MAZE_ENTRY_FLAG_2)
sub_98197C(session, image_id, 2, 14, 10, 4, 9, height, 3, 14, height + 2);
PaintAddImageAsParent(session, image_id, 2, 14, 10, 4, 9, height, 3, 14, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_10)
sub_98197C(session, image_id, 18, 14, 10, 4, 9, height, 19, 14, height + 2);
PaintAddImageAsParent(session, image_id, 18, 14, 10, 4, 9, height, 19, 14, height + 2);
image_id = base_image_id + SPR_MAZE_OFFSET_WALL_INNER_NW_SE;
if (maze_entry & MAZE_ENTRY_FLAG_14)
sub_98197C(session, image_id, 14, 2, 4, 10, 9, height, 14, 3, height + 2);
PaintAddImageAsParent(session, image_id, 14, 2, 4, 10, 9, height, 14, 3, height + 2);
if (maze_entry & MAZE_ENTRY_FLAG_6)
sub_98197C(session, image_id, 14, 18, 4, 10, 9, height, 14, 19, height + 2);
PaintAddImageAsParent(session, image_id, 14, 18, 4, 10, 9, height, 14, 19, height + 2);
image_id = base_image_id + SPR_MAZE_OFFSET_COLUMN_CORNER;
if (maze_entry & (MAZE_ENTRY_FLAG_0 | MAZE_ENTRY_FLAG_1))
sub_98197C(session, image_id, 0, 0, 1, 1, 9, height, 1, 1, height + 2);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 9, height, 1, 1, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_4 | MAZE_ENTRY_FLAG_5))
sub_98197C(session, image_id, 0, 30, 1, 1, 9, height, 1, 30, height + 2);
PaintAddImageAsParent(session, image_id, 0, 30, 1, 1, 9, height, 1, 30, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_8 | MAZE_ENTRY_FLAG_9))
sub_98197C(session, image_id, 30, 30, 1, 1, 9, height, 30, 30, height + 2);
PaintAddImageAsParent(session, image_id, 30, 30, 1, 1, 9, height, 30, 30, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_12 | MAZE_ENTRY_FLAG_13))
sub_98197C(session, image_id, 30, 0, 1, 1, 9, height, 30, 1, height + 2);
PaintAddImageAsParent(session, image_id, 30, 0, 1, 1, 9, height, 30, 1, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_0 | MAZE_ENTRY_FLAG_13 | MAZE_ENTRY_FLAG_14))
sub_98197C(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_LEFT, 14, 0, 2, 1, 9, height, 15, 1, height + 2);
PaintAddImageAsParent(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_LEFT, 14, 0, 2, 1, 9, height, 15, 1, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_5 | MAZE_ENTRY_FLAG_6 | MAZE_ENTRY_FLAG_8))
sub_98197C(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_RIGHT, 14, 30, 2, 1, 9, height, 15, 30, height + 2);
PaintAddImageAsParent(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_RIGHT, 14, 30, 2, 1, 9, height, 15, 30, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_1 | MAZE_ENTRY_FLAG_2 | MAZE_ENTRY_FLAG_4))
sub_98197C(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_RIGHT, 0, 14, 1, 2, 9, height, 1, 15, height + 2);
PaintAddImageAsParent(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_TOP_RIGHT, 0, 14, 1, 2, 9, height, 1, 15, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_9 | MAZE_ENTRY_FLAG_10 | MAZE_ENTRY_FLAG_12))
sub_98197C(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_LEFT, 30, 14, 1, 2, 9, height, 30, 15, height + 2);
PaintAddImageAsParent(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_BOTTOM_LEFT, 30, 14, 1, 2, 9, height, 30, 15, height + 2);
if (maze_entry & (MAZE_ENTRY_FLAG_2 | MAZE_ENTRY_FLAG_6 | MAZE_ENTRY_FLAG_10 | MAZE_ENTRY_FLAG_14))
{
sub_98197C(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_CENTRE, 14, 14, 2, 2, 8, height, 15, 15, height + 2);
PaintAddImageAsParent(session, base_image_id + SPR_MAZE_OFFSET_COLUMN_CENTRE, 14, 14, 2, 2, 8, height, 15, 15, height + 2);
paint_util_set_segment_support_height(session, SEGMENT_C4, height + 12, 0x20);
}

View File

@ -67,7 +67,7 @@ static void paint_merry_go_round_structure(
}
uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags;
sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
PaintAddImageAsParent(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
rct_drawpixelinfo* dpi = &session->DPI;
if (dpi->zoom_level == 0 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr)
@ -90,7 +90,7 @@ static void paint_merry_go_round_structure(
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(
vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]);
imageId = (baseImageId + 32 + imageOffset) | imageColourFlags;
sub_98199C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
PaintAddImageAsChild(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
}
}

View File

@ -449,12 +449,12 @@ static paint_struct* mini_golf_paint_util_7c(
{
if (direction & 1)
{
return sub_98197C(
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);
}
return sub_98197C(
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);
}
@ -491,13 +491,13 @@ static void paint_mini_golf_track_flat(
if (direction & 1)
{
imageId = SPR_MINI_GOLF_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height);
paint_util_push_tunnel_right(session, height, TUNNEL_PATH_AND_MINI_GOLF);
}
else
{
imageId = SPR_MINI_GOLF_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height);
paint_util_push_tunnel_left(session, height, TUNNEL_PATH_AND_MINI_GOLF);
}
@ -510,18 +510,18 @@ static void paint_mini_golf_track_flat(
if (direction & 1)
{
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 1, 32, 7, height, 10, 0, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 7, height, 10, 0, height + 2);
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 1, 32, 7, height, 22, 0, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 7, height, 22, 0, height + 2);
}
else
{
imageId = SPR_MINI_GOLF_FLAT_FENCE_BACK_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 1, 7, height, 0, 10, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 7, height, 0, 10, height + 2);
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 1, 7, height, 0, 22, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 7, height, 0, 22, height + 2);
}
}
@ -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];
sub_98197C(session, imageId, -10, 0, 1, 32, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, imageId, -10, 0, 1, 32, 7, height, 0, 0, height + 2);
}
bool hasSWFence = track_paint_util_has_fence(
@ -699,7 +699,7 @@ static void paint_mini_golf_station(
if (hasFence)
{
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 10, 0, 1, 32, 7, height, 31, 0, height + 2);
PaintAddImageAsParent(session, imageId, 10, 0, 1, 32, 7, height, 31, 0, height + 2);
}
track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height);
@ -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];
sub_98197C(session, imageId, 0, -10, 32, 1, 7, height, 0, 0, height + 2);
PaintAddImageAsParent(session, imageId, 0, -10, 32, 1, 7, height, 0, 0, height + 2);
}
bool hasSEFence = track_paint_util_has_fence(
@ -722,7 +722,7 @@ static void paint_mini_golf_station(
if (hasFence)
{
imageId = SPR_MINI_GOLF_FLAT_FENCE_FRONT_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 10, 32, 1, 7, height, 0, 31, height + 2);
PaintAddImageAsParent(session, imageId, 0, 10, 32, 1, 7, height, 0, 31, height + 2);
}
track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height);
@ -762,7 +762,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
break;
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_SW_NW | session->TrackColours[SCHEME_MISC];
sub_98199C(session, imageId, 0, 0, 26, 24, 1, height, 6, 2, height);
PaintAddImageAsChild(session, imageId, 0, 0, 26, 24, 1, height, 6, 2, height);
break;
@ -771,7 +771,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
break;
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_NW_NE | session->TrackColours[SCHEME_MISC];
sub_98199C(session, imageId, 0, 0, 26, 26, 1, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 26, 26, 1, height, 0, 0, height);
break;
case 2:
@ -780,7 +780,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
break;
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_NE_SE | session->TrackColours[SCHEME_MISC];
sub_98199C(session, imageId, 0, 0, 24, 26, 1, height, 2, 6, height);
PaintAddImageAsChild(session, imageId, 0, 0, 24, 26, 1, height, 2, 6, height);
break;
case 3:
@ -790,7 +790,7 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
break;
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_BACK_SE_SW | session->TrackColours[SCHEME_MISC];
sub_98199C(session, imageId, 0, 0, 24, 24, 1, height, 6, 6, height);
PaintAddImageAsChild(session, imageId, 0, 0, 24, 24, 1, height, 6, 6, height);
break;
}
@ -805,11 +805,11 @@ static void paint_mini_golf_track_left_quarter_turn_1_tile(
{
case 0:
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_SW_NW | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 5, 5, 5, height, 24, 0, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 5, 5, 5, height, 24, 0, height + 2);
break;
case 2:
imageId = SPR_MINI_GOLF_QUARTER_TURN_1_TILE_FENCE_INSIDE_NE_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 5, 5, 5, height, 0, 24, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 5, 5, 5, height, 0, 24, height + 2);
break;
}
}
@ -858,20 +858,20 @@ static void paint_mini_golf_hole_ab(
}
imageId = sprites[direction][trackSequence][1] | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
if (drewSupports)
{
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
imageId = sprites[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsChild(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
else
{
imageId = sprites[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
}
@ -931,14 +931,14 @@ static void paint_mini_golf_hole_c(
{
case 0x01:
case 0x20:
sub_98197C(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4);
break;
case 0x10:
case 0x31:
sub_98197C(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4);
break;
default:
sub_98197C(
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
break;
}
@ -946,15 +946,15 @@ static void paint_mini_golf_hole_c(
if (drewSupports)
{
imageId = ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsChild(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
else
{
imageId = mini_golf_track_sprites_hole_c[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
}
@ -1005,20 +1005,20 @@ static void paint_mini_golf_hole_d(
{
case 0x01:
case 0x32:
sub_98197C(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4);
break;
case 0x02:
sub_98197C(session, imageId, 0, 0, 23, 2, 3, height, 3, 30, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 23, 2, 3, height, 3, 30, height + 4);
break;
case 0x10:
sub_98197C(session, imageId, 0, 0, 2, 24, 3, height, 30, 3, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 24, 3, height, 30, 3, height + 4);
break;
case 0x20:
case 0x31:
sub_98197C(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4);
break;
default:
sub_98197C(
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
break;
}
@ -1036,15 +1036,15 @@ static void paint_mini_golf_hole_d(
if (drewSupports)
{
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsChild(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
else
{
imageId = mini_golf_track_sprites_hole_d[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
}
@ -1094,21 +1094,21 @@ static void paint_mini_golf_hole_e(
switch ((direction << 4) | trackSequence)
{
case 0x01:
sub_98197C(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 26, 3, height, 30, 3, height + 4);
break;
case 0x02:
case 0x20:
case 0x31:
sub_98197C(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 26, 2, 3, height, 3, 30, height + 4);
break;
case 0x10:
sub_98197C(session, imageId, 0, 0, 2, 24, 3, height, 30, 3, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 24, 3, height, 30, 3, height + 4);
break;
case 0x32:
sub_98197C(session, imageId, 0, 0, 2, 23, 3, height, 30, 3, height + 4);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 23, 3, height, 30, 3, height + 4);
break;
default:
sub_98197C(
PaintAddImageAsParent(
session, imageId, 0, 0, boundBox.x, boundBox.y, 0, height, boundBoxOffset.x, boundBoxOffset.y, height + 24);
break;
}
@ -1126,15 +1126,15 @@ static void paint_mini_golf_hole_e(
if (drewSupports)
{
imageId = ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS) | session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsChild(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
else
{
imageId = mini_golf_track_sprites_hole_e[direction][trackSequence][0] | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, boundBox.x, boundBox.y, 1, height, boundBoxOffset.x, boundBoxOffset.y, height);
}
}
@ -1226,7 +1226,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;
sub_98197C(session, image_id | peep_palette, 0, 0, 1, 1, 11, z, 0, 0, z + 5);
PaintAddImageAsParent(session, image_id | peep_palette, 0, 0, 1, 1, 11, z, 0, 0, z + 5);
}
/**
@ -1260,5 +1260,5 @@ void vehicle_visual_mini_golf_ball(
return;
uint32_t image_id = rideEntry->vehicles[0].base_image_id;
sub_98197C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z + 3);
PaintAddImageAsParent(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z + 3);
}

View File

@ -26,10 +26,10 @@ static void paint_mini_helicopters_track_station(
if (direction == 0 || direction == 2)
{
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
@ -38,10 +38,10 @@ static void paint_mini_helicopters_track_station(
else if (direction == 1 || direction == 3)
{
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
@ -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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, height, 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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, height, 6, 0, height);
paint_util_push_tunnel_right(session, height - 8, TUNNEL_0);
break;
}

View File

@ -152,12 +152,12 @@ static paint_struct* paint_monorail_cycles_util_7c(
{
if (flip)
{
return sub_98197C(
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);
}
return sub_98197C(
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);
}
@ -199,10 +199,10 @@ static void paint_monorail_cycles_station(
if (direction == 0 || direction == 2)
{
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 1, height - 2, 0, 2, height);
imageId = SPR_MONORAIL_CYCLES_FLAT_SW_NE | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 20, 1, height, 0, 0, height);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
@ -211,10 +211,10 @@ static void paint_monorail_cycles_station(
else if (direction == 1 || direction == 3)
{
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 1, height - 2, 2, 0, height);
imageId = SPR_MONORAIL_CYCLES_FLAT_NW_SE | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 20, 32, 1, height, 0, 0, height);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session->TrackColours[SCHEME_SUPPORTS]);
metal_a_supports_paint_setup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]);

View File

@ -64,7 +64,7 @@ void vehicle_visual_observation_tower(
{
image_id = (image_id & 0x7FFFF) | CONSTRUCTION_MARKER;
}
paint_struct* ps = sub_98197C(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
paint_struct* ps = PaintAddImageAsParent(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -72,7 +72,7 @@ void vehicle_visual_observation_tower(
image_id++;
ps = sub_98197C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
ps = PaintAddImageAsParent(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -94,7 +94,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];
sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
auto ride = get_ride(rideIndex);
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];
sub_98197C(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height + 32, 8, 8, height + 32);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 32, 8, 8, height + 32);
imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height + 64, 8, 8, height + 64);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 64, 8, 8, height + 64);
paint_util_set_vertical_tunnel(session, height + 96);
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -170,13 +170,13 @@ static void paint_observation_tower_section(
}
uint32_t imageId = SPR_OBSERVATION_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
const TileElement* nextTileElement = tileElement + 1;
if (tileElement->IsLastForTile() || tileElement->GetClearanceZ() != nextTileElement->GetBaseZ())
{
imageId = SPR_OBSERVATION_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsChild(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -65,7 +65,7 @@ static void paint_space_rings_structure(paint_session* session, Ride* ride, uint
}
uint32_t imageId = (baseImageId + frameNum) | imageColourFlags;
sub_98197C(session, imageId, 0, 0, 20, 20, 23, height, -10, -10, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 20, 23, height, -10, -10, height);
if (vehicle != nullptr && vehicle->num_peeps > 0)
{
@ -74,7 +74,7 @@ static void paint_space_rings_structure(paint_session* session, Ride* ride, uint
{
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(rider->TshirtColour, rider->TrousersColour);
imageId = ((baseImageId & 0x7FFFF) + 352 + frameNum) | imageColourFlags;
sub_98199C(session, imageId, 0, 0, 20, 20, 23, height, -10, -10, height);
PaintAddImageAsChild(session, imageId, 0, 0, 20, 20, 23, height, -10, -10, height);
}
}
}
@ -109,12 +109,12 @@ static void paint_space_rings(
if (track_paint_util_has_fence(EDGE_SW, position, tileElement, ride, session->CurrentRotation))
{
imageId = SPR_SPACE_RINGS_FENCE_SW | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 1, 28, 7, height, 29, 0, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 28, 7, height, 29, 0, height + 2);
}
if (track_paint_util_has_fence(EDGE_SE, position, tileElement, ride, session->CurrentRotation))
{
imageId = SPR_SPACE_RINGS_FENCE_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 1, 7, height, 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];
sub_98197C(session, image_id, 16, 16, 16, 16, 108, height, 16, 0, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 16, 16, 108, height, 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];
sub_98197C(session, image_id, 16, 16, 16, 16, 108, height, 0, 16, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 16, 16, 108, height, 0, 16, height + 3);
}
static void spiral_slide_paint_tile_front(
@ -94,33 +94,33 @@ static void spiral_slide_paint_tile_front(
if (direction == 1)
{
image_id = SPIRAL_SLIDE_INSIDE_R1 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, image_id, 16, 16, 2, 16, 108, height, -12, 0, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 2, 16, 108, height, -12, 0, height + 3);
}
else if (direction == 2)
{
image_id = SPIRAL_SLIDE_INSIDE_R2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, image_id, 16, 16, 16, 2, 108, height, 0, -12, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 16, 2, 108, height, 0, -12, height + 3);
}
if (direction == 0)
{
image_id = SPIRAL_SLIDE_CENTRE_R0 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, image_id, 16, 16, 16, 8, 108, height, 0, 8, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 16, 8, 108, height, 0, 8, height + 3);
}
else if (direction == 1)
{
image_id = SPIRAL_SLIDE_CENTRE_R1 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, image_id, 16, 16, 2, 16, 108, height, 14, 0, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 2, 16, 108, height, 14, 0, height + 3);
}
else if (direction == 2)
{
image_id = SPIRAL_SLIDE_CENTRE_R2 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, image_id, 16, 16, 16, 2, 108, height, 0, 14, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 16, 2, 108, height, 0, 14, height + 3);
}
else if (direction == 3)
{
image_id = SPIRAL_SLIDE_CENTRE_R3 | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, image_id, 16, 16, 8, 16, 108, height, 8, 0, height + 3);
PaintAddImageAsParent(session, image_id, 16, 16, 8, 16, 108, height, 8, 0, height + 3);
}
rct_drawpixelinfo* dpi = &session->DPI;
@ -174,7 +174,7 @@ static void spiral_slide_paint_tile_front(
image_id = (offset + slide_progress) | (ride->slide_peep_t_shirt_colour << 19) | (1 << 29);
sub_98199C(
PaintAddImageAsChild(
session, image_id, 16, 16, boundingBox.x, boundingBox.y, boundingBox.z, height, boundingBoxOffset.x,
boundingBoxOffset.y, boundingBoxOffset.z);
}
@ -203,7 +203,7 @@ static void paint_spiral_slide(
// Base
uint32_t imageId = ((direction & 1) ? SPIRAL_SLIDE_BASE_B : SPIRAL_SLIDE_BASE_A) | session->TrackColours[SCHEME_SUPPORTS];
sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
auto ride = get_ride(rideIndex);
if (ride != nullptr)

View File

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

View File

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

View File

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

View File

@ -52,7 +52,7 @@ static void paint_enterprise_structure(
}
uint32_t imageId = (baseImageId + imageOffset) | imageColourFlags;
sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height);
rct_drawpixelinfo* dpi = &session->DPI;
@ -68,7 +68,7 @@ static void paint_enterprise_structure(
uint32_t peepFrameOffset = ((imageOffset % 4) * 4 + (i * 4) % 15) & 0x0F;
uint32_t ax = (imageOffset & 0xFFFFFFFC) << 2;
imageId = (baseImageId + 196 + peepFrameOffset + ax) | SPRITE_ID_PALETTE_COLOUR_1(vehicle->peep_tshirt_colours[i]);
sub_98199C(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height);
}
}

View File

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

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;
sub_98197C(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
PaintAddImageAsParent(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
// Draw front:
image_id = (baseImage_id + 1) | imageFlags;
sub_98197C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsParent(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
// Draw peeps:
if (session->DPI.zoom_level < 2 && vehicle->num_peeps > 0 && !vehicle->IsGhost())
@ -61,24 +61,24 @@ void vehicle_visual_launched_freefall(
auto directionOffset = imageDirection / 8;
image_id = (baseImage_id + (((directionOffset + 0) & 3) * 3))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]);
sub_98199C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsChild(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
if (vehicle->num_peeps > 2)
{
image_id = (baseImage_id + (((directionOffset + 1) & 3) * 3))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]);
sub_98199C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsChild(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
}
if (vehicle->num_peeps > 4)
{
image_id = (baseImage_id + (((directionOffset + 2) & 3) * 3))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]);
sub_98199C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsChild(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
}
if (vehicle->num_peeps > 6)
{
image_id = (baseImage_id + (((directionOffset + 3) & 3) * 3))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]);
sub_98199C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsChild(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
}
}
@ -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];
sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
auto ride = get_ride(rideIndex);
if (ride != nullptr)
@ -110,15 +110,15 @@ static void paint_launched_freefall_base(
if (trackSequence == 0)
{
imageId = SPR_LAUNCHED_FREEFALL_TOWER_BASE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
height += 32;
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
height += 32;
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
paint_util_set_vertical_tunnel(session, height + 32);
@ -172,13 +172,13 @@ static void paint_launched_freefall_tower_section(
}
uint32_t imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
const TileElement* nextTileElement = tileElement + 1;
if (tileElement->IsLastForTile() || tileElement->GetClearanceZ() != nextTileElement->GetBaseZ())
{
imageId = SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsChild(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -83,13 +83,13 @@ static void paint_magic_carpet_frame(
imageId |= session->TrackColours[SCHEME_TRACK];
if (plane == PLANE_BACK)
{
sub_98197C(
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);
}
else
{
sub_98199C(
PaintAddImageAsChild(
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);
}
@ -113,7 +113,7 @@ static void paint_magic_carpet_pendulum(
imageId += plane == PLANE_BACK ? SPR_MAGIC_CARPET_PENDULUM_NW : SPR_MAGIC_CARPET_PENDULUM_SE;
}
imageId |= session->TrackColours[SCHEME_TRACK];
sub_98199C(
PaintAddImageAsChild(
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);
}
@ -150,7 +150,7 @@ static void paint_magic_carpet_vehicle(
}
offset.z += MagicCarpetOscillationZ[swingImageId];
sub_98199C(
PaintAddImageAsChild(
session, vehicleImageId | imageColourFlags, 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);
@ -167,7 +167,7 @@ static void paint_magic_carpet_vehicle(
uint32_t imageId = baseImageId + (peepIndex * 2);
imageId |= (vehicle->peep_tshirt_colours[peepIndex + 0] << 19);
imageId |= (vehicle->peep_tshirt_colours[peepIndex + 1] << 24);
sub_98199C(
PaintAddImageAsChild(
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);
}

View File

@ -82,46 +82,46 @@ static void paint_motionsimulator_vehicle(
case 0:
// Simulator
imageId = simulatorImageId;
sub_98197C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
sub_98199C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
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];
sub_98197C(session, imageId, offsetX, offsetY, 20, 2, 44, offsetZ, offsetX, offsetY + 32, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 2, 44, offsetZ, offsetX, offsetY + 32, offsetZ);
break;
case 1:
// Simulator
imageId = simulatorImageId;
sub_98197C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
sub_98199C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY, offsetZ);
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];
sub_98197C(session, imageId, offsetX, offsetY, 2, 20, 44, offsetZ, offsetX + 34, offsetY, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 2, 20, 44, offsetZ, offsetX + 34, offsetY, offsetZ);
break;
case 2:
// Stairs (rail)
imageId = (SPR_MOTION_SIMULATOR_STAIRS_RAIL_R0 + direction) | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, offsetX, offsetY, 20, 2, 44, offsetZ, offsetX, offsetY - 10, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 2, 44, offsetZ, offsetX, offsetY - 10, offsetZ);
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY + 5, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY + 5, offsetZ);
// Simulator
imageId = simulatorImageId;
sub_98199C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY + 5, offsetZ);
PaintAddImageAsChild(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX, offsetY + 5, offsetZ);
break;
case 3:
// Stairs (rail)
imageId = (SPR_MOTION_SIMULATOR_STAIRS_RAIL_R0 + direction) | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, offsetX, offsetY, 2, 20, 44, offsetZ, offsetX - 10, offsetY, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 2, 20, 44, offsetZ, offsetX - 10, offsetY, offsetZ);
// Stairs
imageId = (SPR_MOTION_SIMULATOR_STAIRS_R0 + direction) | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX + 5, offsetY, offsetZ);
PaintAddImageAsParent(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX + 5, offsetY, offsetZ);
// Simulator
imageId = simulatorImageId;
sub_98199C(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX + 5, offsetY, offsetZ);
PaintAddImageAsChild(session, imageId, offsetX, offsetY, 20, 20, 44, offsetZ, offsetX + 5, offsetY, offsetZ);
break;
}

View File

@ -51,11 +51,11 @@ void vehicle_visual_roto_drop(
// Draw back:
image_id = baseImage_id | imageFlags;
sub_98197C(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
PaintAddImageAsParent(session, image_id, 0, 0, 2, 2, 41, z, -11, -11, z + 1);
// Draw front:
image_id = (baseImage_id + 4) | imageFlags;
sub_98197C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsParent(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
if (vehicle->num_peeps > 0 && !vehicle->IsGhost())
{
@ -84,7 +84,7 @@ void vehicle_visual_roto_drop(
baseImage_id += vehicle->restraints_position / 64;
}
image_id = baseImage_id | SPRITE_ID_PALETTE_COLOUR_1(riding_peep_sprites[i]);
sub_98199C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
PaintAddImageAsChild(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1);
}
}
}
@ -106,7 +106,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];
sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
auto ride = get_ride(rideIndex);
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];
sub_98197C(session, imageId, 0, 0, 2, 2, 27, height, 8, 8, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 27, height, 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];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height + 32, 8, 8, height + 32);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 32, 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];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height + 64, 8, 8, height + 64);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height + 64, 8, 8, height + 64);
paint_util_set_vertical_tunnel(session, height + 96);
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -186,13 +186,13 @@ static void paint_roto_drop_tower_section(
}
uint32_t imageId = SPR_ROTO_DROP_TOWER_SEGMENT | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
const TileElement* nextTileElement = tileElement + 1;
if (tileElement->IsLastForTile() || tileElement->GetClearanceZ() != nextTileElement->GetBaseZ())
{
imageId = SPR_ROTO_DROP_TOWER_SEGMENT_TOP | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
PaintAddImageAsChild(session, imageId, 0, 0, 2, 2, 30, height, 8, 8, height);
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -99,19 +99,19 @@ static void paint_swinging_inverter_ship_structure(
if (direction & 2)
{
sub_98197C(
PaintAddImageAsParent(
session, vehicleImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
sub_98199C(
PaintAddImageAsChild(
session, frameImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
}
else
{
sub_98197C(
PaintAddImageAsParent(
session, frameImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
sub_98199C(
PaintAddImageAsChild(
session, vehicleImageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x,
boundBox.offset_y, height);
}
@ -156,11 +156,11 @@ static void paint_swinging_inverter_ship(
break;
case 2:
imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height);
break;
case 3:
imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_TRACK];
sub_98199C(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height);
PaintAddImageAsChild(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height);
break;
}
}

View File

@ -106,12 +106,12 @@ static void paint_swinging_ship_structure(
swinging_ship_bound_box bounds = swinging_ship_data[direction];
imageId = swinging_ship_frame_sprites[(direction & 1)][0] | session->TrackColours[SCHEME_TRACK];
sub_98197C(
PaintAddImageAsParent(
session, imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y,
height);
imageId = baseImageId | imageColourFlags;
sub_98199C(
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y,
height);
@ -132,7 +132,7 @@ static void paint_swinging_ship_structure(
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(
vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]);
imageId = (baseImageId + frameNum) | imageColourFlags;
sub_98199C(
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x,
bounds.offset_y, height);
@ -147,7 +147,7 @@ static void paint_swinging_ship_structure(
imageColourFlags = SPRITE_ID_PALETTE_COLOUR_2(
vehicle->peep_tshirt_colours[peep], vehicle->peep_tshirt_colours[peep + 1]);
imageId = (baseImageId + frameNum) | imageColourFlags;
sub_98199C(
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x,
bounds.offset_y, height);
@ -157,7 +157,7 @@ static void paint_swinging_ship_structure(
}
imageId = swinging_ship_frame_sprites[(direction & 1)][1] | session->TrackColours[SCHEME_TRACK];
sub_98199C(
PaintAddImageAsChild(
session, imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y,
height);
@ -217,7 +217,7 @@ static void paint_swinging_ship(
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_TRACK];
}
sub_98199C(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height + 9);
PaintAddImageAsChild(session, imageId, 0, 0, 8, 32, 1, height + 9, 0, -2, height + 9);
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_NW_SE : SPR_STATION_PLATFORM_NW_SE)
| session->TrackColours[SCHEME_TRACK];
@ -262,7 +262,7 @@ static void paint_swinging_ship(
imageId = (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_TRACK];
}
sub_98199C(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height + 9);
PaintAddImageAsChild(session, imageId, 0, 0, 32, 8, 1, height + 9, -2, 0, height + 9);
imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_SW_NE : SPR_STATION_PLATFORM_SW_NE)
| session->TrackColours[SCHEME_TRACK];

View File

@ -89,7 +89,7 @@ static void top_spin_paint_vehicle(
image_id += rideEntry->vehicles[0].base_image_id;
// Left back bottom support
image_id += 572;
sub_98197C(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
PaintAddImageAsParent(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
image_id = session->TrackColours[SCHEME_MISC];
if (image_id == IMAGE_TYPE_REMAP)
@ -110,7 +110,7 @@ static void top_spin_paint_vehicle(
// Left hand arm
image_id += 380;
sub_98199C(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
PaintAddImageAsChild(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
uint32_t seatImageId;
@ -163,7 +163,7 @@ static void top_spin_paint_vehicle(
break;
}
sub_98199C(
PaintAddImageAsChild(
session, image_id, static_cast<int8_t>(seatCoords.x), static_cast<int8_t>(seatCoords.y), lengthX, lengthY, 90,
seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
@ -173,7 +173,7 @@ static void top_spin_paint_vehicle(
image_id = (seatImageId + (1 * 76))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]);
sub_98199C(
PaintAddImageAsChild(
session, image_id, static_cast<int8_t>(seatCoords.x), static_cast<int8_t>(seatCoords.y), lengthX, lengthY, 90,
seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
@ -182,7 +182,7 @@ static void top_spin_paint_vehicle(
image_id = (seatImageId + (2 * 76))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]);
sub_98199C(
PaintAddImageAsChild(
session, image_id, static_cast<int8_t>(seatCoords.x), static_cast<int8_t>(seatCoords.y), lengthX, lengthY, 90,
seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
}
@ -192,7 +192,7 @@ static void top_spin_paint_vehicle(
image_id = (seatImageId + (3 * 76))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]);
sub_98199C(
PaintAddImageAsChild(
session, image_id, static_cast<int8_t>(seatCoords.x), static_cast<int8_t>(seatCoords.y), lengthX, lengthY, 90,
seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
}
@ -202,7 +202,7 @@ static void top_spin_paint_vehicle(
image_id = (seatImageId + (4 * 76))
| SPRITE_ID_PALETTE_COLOUR_2(vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]);
sub_98199C(
PaintAddImageAsChild(
session, image_id, static_cast<int8_t>(seatCoords.x), static_cast<int8_t>(seatCoords.y), lengthX, lengthY, 90,
seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
}
@ -220,7 +220,7 @@ static void top_spin_paint_vehicle(
// Right hand arm
image_id += 476;
sub_98199C(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
PaintAddImageAsChild(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
image_id = session->TrackColours[SCHEME_MISC];
if (image_id == IMAGE_TYPE_REMAP)
@ -233,7 +233,7 @@ static void top_spin_paint_vehicle(
// Right back bottom support
image_id += 573;
sub_98199C(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
PaintAddImageAsChild(session, image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ);
session->CurrentlyDrawnItem = curTileElement;
session->InteractionType = VIEWPORT_INTERACTION_ITEM_RIDE;

View File

@ -56,7 +56,7 @@ static void paint_twist_structure(
uint32_t structureFrameNum = frameNum % 24;
uint32_t imageId = (baseImageId + structureFrameNum) | imageColourFlags;
sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
PaintAddImageAsParent(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
rct_drawpixelinfo* dpi = &session->DPI;
@ -68,7 +68,7 @@ static void paint_twist_structure(
uint32_t peepFrameNum = (frameNum + i * 12) % 216;
imageId = (baseImageId + 24 + peepFrameNum) | imageColourFlags;
sub_98199C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
PaintAddImageAsChild(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height);
}
}
@ -101,12 +101,12 @@ static void paint_twist(
if (track_paint_util_has_fence(EDGE_SW, session->MapPosition, tileElement, ride, session->CurrentRotation))
{
imageId = SPR_FENCE_ROPE_SW | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 1, 28, 7, height, 29, 0, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 28, 7, height, 29, 0, height + 3);
}
if (track_paint_util_has_fence(EDGE_SE, session->MapPosition, tileElement, ride, session->CurrentRotation))
{
imageId = SPR_FENCE_ROPE_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 1, 7, height, 0, 29, height + 3);
}
break;
default:

View File

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

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;
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 2, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 2, 2, height);
imageId = lift_cage_sprites[1 + index][1] | colourFlags;
sub_98197C(session, imageId, 0, 0, 2, 2, 30, height, 28, 28, height);
PaintAddImageAsParent(session, imageId, 0, 0, 2, 2, 30, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height, 0, 0, height);
auto ride = get_ride(rideIndex);
if (ride != nullptr)

View File

@ -949,7 +949,7 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles(
CoordsXY boundsLength = miniature_railway_right_quarter_turn_5_tiles_bound_lengths[direction][index];
CoordsXYZ boundsOffset = CoordsXYZ(offset, 0);
sub_98199C(session, imageId, { offset, height }, { boundsLength, 2 }, boundsOffset + CoordsXYZ{ 0, 0, height });
PaintAddImageAsChild(session, imageId, { offset, height }, { boundsLength, 2 }, boundsOffset + CoordsXYZ{ 0, 0, height });
}
}
if (direction == 0 && trackSequence == 0)
@ -1283,7 +1283,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];
sub_98197C(session, imageId, 0, 0, 8, 8, 2, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 8, 8, 2, height, 0, 0, height);
}
}
else
@ -1303,7 +1303,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles(
CoordsXY boundsLength = defaultRightQuarterTurn3TilesBoundLengths[direction][index];
CoordsXYZ boundsOffset(offset, 0);
sub_98199C(session, imageId, { offset, height }, { boundsLength, 3 }, boundsOffset + CoordsXYZ{ 0, 0, height });
PaintAddImageAsChild(session, imageId, { offset, height }, { boundsLength, 3 }, boundsOffset + CoordsXYZ{ 0, 0, height });
}
track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT);
@ -1438,7 +1438,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];
}
sub_98197C(
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
}
}
@ -1448,7 +1448,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];
sub_98197C(
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence];
@ -1457,7 +1457,7 @@ static void paint_miniature_railway_track_left_eighth_to_diag(
imageId = miniature_railway_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK];
offset = miniature_railway_track_pieces_left_eight_to_diag_offset[direction][index];
bounds = miniature_railway_track_pieces_left_eight_to_diag_bounds[direction][index];
sub_98199C(session, imageId, { 0, 0, height }, bounds, { offset, height });
PaintAddImageAsChild(session, imageId, { 0, 0, height }, bounds, { offset, height });
}
}
@ -1578,7 +1578,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];
}
sub_98197C(
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
}
}
@ -1588,7 +1588,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];
sub_98197C(
PaintAddImageAsParent(
session, imageId, 0, 0, bounds.x, bounds.y, static_cast<int8_t>(bounds.z), height, offset.x, offset.y, height);
int8_t index = paint_miniature_railway_eighth_to_diag_index[trackSequence];
@ -1598,7 +1598,7 @@ static void paint_miniature_railway_track_right_eighth_to_diag(
| session->TrackColours[SCHEME_TRACK];
offset = miniature_railway_track_pieces_right_eight_to_diag_offset[direction][index];
bounds = miniature_railway_track_pieces_right_eight_to_diag_bounds[direction][index];
sub_98199C(session, imageId, { 0, 0, height }, bounds, { offset, height });
PaintAddImageAsChild(session, imageId, { 0, 0, height }, bounds, { offset, height });
}
}
@ -1706,19 +1706,19 @@ static void miniature_railway_track_diag_flat(
if (isSupported)
{
sub_98197C(
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height);
if (drawRail)
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height });
}
}
else if (drawRail)
{
sub_98197C(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -1800,20 +1800,20 @@ static void miniature_railway_track_diag_25_deg_up(
static constexpr const int8_t offsetB[] = { +8, 0, +8, +8 };
if (hasSupports)
{
sub_98197C(
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]);
if (drawRail)
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + offsetB[direction] });
}
}
else if (drawRail)
{
sub_98197C(
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + offsetB[direction]);
}
@ -1853,19 +1853,19 @@ static void miniature_railway_track_diag_flat_to_25_deg_up(
if (hasSupports)
{
sub_98197C(
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height);
if (drawRail)
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height });
}
}
else if (drawRail)
{
sub_98197C(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);
@ -1926,20 +1926,20 @@ static void miniature_railway_track_diag_25_deg_up_to_flat(
if (hasSupports)
{
sub_98197C(
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]);
if (drawRail)
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + railOffsets[direction] });
}
}
else if (drawRail)
{
sub_98197C(
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + railOffsets[direction]);
}
@ -2001,20 +2001,20 @@ static void miniature_railway_track_diag_25_deg_down(
if (hasSupports)
{
sub_98197C(
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]);
if (drawRail)
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + railOffsets[direction] });
}
}
else if (drawRail)
{
sub_98197C(
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + railOffsets[direction]);
}
@ -2075,20 +2075,20 @@ static void miniature_railway_track_diag_flat_to_25_deg_down(
if (hasSupports)
{
sub_98197C(
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]);
if (drawRail)
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height + railOffsets[direction] });
}
}
else if (drawRail)
{
sub_98197C(
PaintAddImageAsParent(
session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16,
height + railOffsets[direction]);
}
@ -2126,19 +2126,19 @@ static void miniature_railway_track_diag_25_deg_down_to_flat(
if (hasSupports)
{
sub_98197C(
PaintAddImageAsParent(
session, floorImage | session->TrackColours[SCHEME_SUPPORTS], 0, 0, floorBoundSize.x, floorBoundSize.y,
(drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height);
if (drawRail)
{
sub_98199C(
PaintAddImageAsChild(
session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 },
{ -16, -16, height });
}
}
else if (drawRail)
{
sub_98197C(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height);
}
paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -462,22 +462,22 @@ static void paint_monorail_station(
if (direction == 0 || direction == 2)
{
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 28, 2, height - 2, 0, 2, height);
}
else if (direction == 1 || direction == 3)
{
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98197C(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 28, 32, 2, height - 2, 2, 0, height);
}
imageId = monorail_track_pieces_flat[direction] | session->TrackColours[SCHEME_TRACK];
if (direction == 0 || direction == 2)
{
sub_98199C(session, imageId, 0, 6, 32, 20, 2, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 0, 6, 32, 20, 2, height, 0, 0, height);
}
else
{
sub_98199C(session, imageId, 6, 0, 20, 32, 2, height, 0, 0, height);
PaintAddImageAsChild(session, imageId, 6, 0, 20, 32, 2, height, 0, 0, height);
}
if (direction == 0 || direction == 2)
@ -1001,7 +1001,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];
sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height);
}
switch (trackSequence)
@ -1069,7 +1069,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];
sub_98197C(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height);
PaintAddImageAsParent(session, imageId, 0, 0, bounds.x, bounds.y, 2, height, offset.x, offset.y, height);
}
switch (trackSequence)
@ -1168,7 +1168,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];
sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
}
if (trackSequence == 3)
@ -1191,7 +1191,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];
sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
}
if (trackSequence == 3)
@ -1214,7 +1214,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];
sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
}
if (trackSequence == 3)
@ -1237,7 +1237,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];
sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
}
if (trackSequence == 3)
@ -1260,7 +1260,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];
sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
}
if (trackSequence == 3)
@ -1284,7 +1284,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];
sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
}
if (trackSequence == 3)
@ -1308,7 +1308,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];
sub_98197C(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
PaintAddImageAsParent(session, imageId, -16, -16, 32, 32, 2, height, -16, -16, height);
}
if (trackSequence == 3)

View File

@ -39,18 +39,18 @@ static void paint_boat_hire_track_flat(
if (direction & 1)
{
imageId = SPR_BOAT_HIRE_FLAT_BACK_NW_SE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 1, 32, 3, height, 4, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 4, 0, height);
imageId = SPR_BOAT_HIRE_FLAT_FRONT_NW_SE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 1, 32, 3, height, 28, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 3, height, 28, 0, height);
}
else
{
imageId = SPR_BOAT_HIRE_FLAT_BACK_SW_NE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 1, 3, height, 0, 4, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 4, height);
imageId = SPR_BOAT_HIRE_FLAT_FRONT_SW_NE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 1, 3, height, 0, 28, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 3, height, 0, 28, height);
}
paint_util_set_segment_support_height(
@ -96,31 +96,31 @@ static void paint_boat_hire_track_left_quarter_turn_1_tile(
{
case 0:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_SW_NW | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_SW_NW | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
break;
case 1:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_NW_NE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_NW_NE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
break;
case 2:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_NE_SE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_NE_SE | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
break;
case 3:
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_FRONT_SE_SW | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
PaintAddImageAsParent(session, imageId, 0, 0, 3, 3, 3, height, 28, 28, height + 2);
imageId = SPR_BOAT_HIRE_FLAT_QUARTER_TURN_1_TILE_BACK_SE_SW | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 0, height, 0, 0, height);
break;
}

View File

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

View File

@ -746,21 +746,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];
sub_98197C(session, imageId, 0, 0, 20, 32, 2, height, 6, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 2, height, 6, 0, height);
imageId = (direction == 1 ? SPR_SPLASH_BOATS_FLAT_SIDE_NW_SE : SPR_SPLASH_BOATS_FLAT_SIDE_SE_NW)
| session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 1, 32, 26, height, 27, 0, height);
PaintAddImageAsParent(session, imageId, 0, 0, 1, 32, 26, height, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 2, height, 0, 6, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 2, height, 0, 6, height);
imageId = (direction == 0 ? SPR_SPLASH_BOATS_FLAT_SIDE_SW_NE : SPR_SPLASH_BOATS_FLAT_SIDE_NE_SW)
| session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 1, 26, height, 0, 27, height);
}
wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);
@ -787,7 +787,7 @@ 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];
sub_98197C(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height + 3);
imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC];
sub_98196C(session, imageId, 0, 0, 32, 32, 1, height);
@ -796,7 +796,7 @@ static void paint_splash_boats_station(
{
uint32_t imageId = (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW)
| session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height + 3);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height + 3);
imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC];
sub_98196C(session, imageId, 0, 0, 32, 32, 1, height);

View File

@ -60,7 +60,7 @@ void vehicle_visual_submarine(
vehicle_boundbox bb = VehicleBoundboxes[vehicleEntry->draw_order][imageDirection / 2];
image_id = baseImage_id | imageFlags;
paint_struct* ps = sub_98197C(
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);
if (ps != nullptr)
{
@ -68,7 +68,7 @@ void vehicle_visual_submarine(
}
image_id = (baseImage_id + 1) | imageFlags;
ps = sub_98197C(session, image_id, 0, 0, bb.length_x, bb.length_y, 2, z, bb.offset_x, bb.offset_y, bb.offset_z + z - 10);
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);
if (ps != nullptr)
{
ps->tertiary_colour = vehicle->colours_extended;
@ -93,7 +93,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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, heightLower, 6, 0, heightLower);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, heightLower, 6, 0, heightLower);
paint_util_push_tunnel_right(session, height, TUNNEL_SQUARE_FLAT);
track_paint_util_draw_pier(
@ -102,7 +102,7 @@ static void submarine_ride_paint_track_station(
else
{
imageId = SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW | session->TrackColours[SCHEME_TRACK];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, heightLower, 0, 6, heightLower);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, heightLower, 0, 6, heightLower);
paint_util_push_tunnel_left(session, height, TUNNEL_SQUARE_FLAT);
track_paint_util_draw_pier(
@ -123,13 +123,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];
sub_98197C(session, imageId, 0, 0, 20, 32, 3, heightLower, 6, 0, heightLower);
PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 3, heightLower, 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];
sub_98197C(session, imageId, 0, 0, 32, 20, 3, heightLower, 0, 6, heightLower);
PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 3, heightLower, 0, 6, heightLower);
paint_util_push_tunnel_left(session, heightLower, TUNNEL_0);
}