mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Create PaintAddImageAsParentRotated() function that takes a BoundBoxXYZ
This commit is contained in:
@@ -310,12 +310,24 @@ PaintStruct* PaintAddImageAsChild(
|
|||||||
PaintStruct* PaintAddImageAsChildRotated(
|
PaintStruct* PaintAddImageAsChildRotated(
|
||||||
PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset,
|
PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset,
|
||||||
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset);
|
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset);
|
||||||
PaintStruct* PaintAddImageAsParentRotated(
|
|
||||||
PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset,
|
|
||||||
const CoordsXYZ& boundBoxSize);
|
|
||||||
PaintStruct* PaintAddImageAsParentRotated(
|
PaintStruct* PaintAddImageAsParentRotated(
|
||||||
PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset,
|
PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset,
|
||||||
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset);
|
const BoundBoxXYZ& boundBox);
|
||||||
|
|
||||||
|
inline PaintStruct* PaintAddImageAsParentRotated(
|
||||||
|
PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset,
|
||||||
|
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset)
|
||||||
|
{
|
||||||
|
return PaintAddImageAsParentRotated(session, direction, imageId, offset, { boundBoxOffset, boundBoxSize });
|
||||||
|
}
|
||||||
|
|
||||||
|
inline PaintStruct* PaintAddImageAsParentRotated(
|
||||||
|
PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset,
|
||||||
|
const CoordsXYZ& boundBoxSize)
|
||||||
|
{
|
||||||
|
return PaintAddImageAsParentRotated(session, direction, imageId, offset, { offset, boundBoxSize });
|
||||||
|
}
|
||||||
|
|
||||||
void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type);
|
void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type);
|
||||||
|
|
||||||
|
|||||||
@@ -12,30 +12,16 @@
|
|||||||
#include "Paint.h"
|
#include "Paint.h"
|
||||||
|
|
||||||
PaintStruct* PaintAddImageAsParentRotated(
|
PaintStruct* PaintAddImageAsParentRotated(
|
||||||
PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset,
|
PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox)
|
||||||
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset)
|
|
||||||
{
|
{
|
||||||
if (direction & 1)
|
if (direction & 1)
|
||||||
{
|
{
|
||||||
return PaintAddImageAsParent(
|
return PaintAddImageAsParent(
|
||||||
session, imageId, { offset.y, offset.x, offset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z },
|
session, imageId, { offset.y, offset.x, offset.z }, { boundBox.length.y, boundBox.length.x, boundBox.length.z },
|
||||||
{ boundBoxOffset.y, boundBoxOffset.x, boundBoxOffset.z });
|
{ boundBox.offset.y, boundBox.offset.x, boundBox.offset.z });
|
||||||
}
|
}
|
||||||
|
|
||||||
return PaintAddImageAsParent(session, imageId, offset, boundBoxSize, boundBoxOffset);
|
return PaintAddImageAsParent(session, imageId, offset, boundBox.length, boundBox.offset);
|
||||||
}
|
|
||||||
|
|
||||||
PaintStruct* PaintAddImageAsParentRotated(
|
|
||||||
PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset,
|
|
||||||
const CoordsXYZ& boundBoxSize)
|
|
||||||
{
|
|
||||||
if (direction & 1)
|
|
||||||
{
|
|
||||||
return PaintAddImageAsParent(
|
|
||||||
session, image_id, { offset.y, offset.x, offset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z });
|
|
||||||
}
|
|
||||||
|
|
||||||
return PaintAddImageAsParent(session, image_id, offset, boundBoxSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PaintStruct* PaintAddImageAsChildRotated(
|
PaintStruct* PaintAddImageAsChildRotated(
|
||||||
|
|||||||
Reference in New Issue
Block a user