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