mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Convert Classic Wooden RC track to shared track paint functions
This commit is contained in:
parent
273fa9a479
commit
836786a707
2 changed files with 570 additions and 1523 deletions
File diff suppressed because it is too large
Load diff
|
@ -26,7 +26,7 @@ static constexpr TunnelGroup kTunnelGroup = TunnelGroup::Square;
|
|||
struct WoodenTrackSection
|
||||
{
|
||||
ImageIndex track;
|
||||
ImageIndex handrail;
|
||||
ImageIndex handrail = ImageIndexUndefined;
|
||||
ImageIndex frontTrack = ImageIndexUndefined;
|
||||
ImageIndex frontHandrail = ImageIndexUndefined;
|
||||
};
|
||||
|
@ -67,11 +67,20 @@ PaintStruct* WoodenRCTrackPaint(
|
|||
PaintSession& session, uint8_t direction, ImageIndex imageIdTrack, ImageIndex imageIdRails, const CoordsXYZ& offset,
|
||||
const BoundBoxXYZ& boundBox)
|
||||
{
|
||||
ImageId imageId = WoodenRCGetTrackColour<isClassic>(session).WithIndex(imageIdTrack);
|
||||
ImageId railsImageId = WoodenRCGetRailsColour(session).WithIndex(imageIdRails);
|
||||
if (isClassic)
|
||||
{
|
||||
const ImageId imageId = session.TrackColours.WithIndex(imageIdTrack);
|
||||
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, offset, boundBox);
|
||||
return PaintAddImageAsChildRotated(session, direction, railsImageId, offset, boundBox);
|
||||
return PaintAddImageAsParentRotated(session, direction, imageId, offset, boundBox);
|
||||
}
|
||||
else
|
||||
{
|
||||
const ImageId imageId = session.SupportColours.WithIndex(imageIdTrack);
|
||||
const ImageId railsImageId = WoodenRCGetRailsColour(session).WithIndex(imageIdRails);
|
||||
|
||||
PaintAddImageAsParentRotated(session, direction, imageId, offset, boundBox);
|
||||
return PaintAddImageAsChildRotated(session, direction, railsImageId, offset, boundBox);
|
||||
}
|
||||
}
|
||||
|
||||
template<bool isClassic>
|
||||
|
|
Loading…
Reference in a new issue