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