mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Make ViewportPaint static, refactor TrackDesign to use ViewportRender
This commit is contained in:
@@ -75,7 +75,9 @@ InteractionInfo::InteractionInfo(const PaintStruct* ps)
|
||||
, SpriteType(ps->InteractionItem)
|
||||
{
|
||||
}
|
||||
|
||||
static void ViewportPaintWeatherGloom(DrawPixelInfo& dpi);
|
||||
static void ViewportPaint(const Viewport* viewport, DrawPixelInfo& dpi, const ScreenRect& screenRect);
|
||||
|
||||
/**
|
||||
* This is not a viewport function. It is used to setup many variables for
|
||||
@@ -891,7 +893,7 @@ static void ViewportPaintColumn(PaintSession& session)
|
||||
* edi: dpi
|
||||
* ebp: bottom
|
||||
*/
|
||||
void ViewportPaint(const Viewport* viewport, DrawPixelInfo& dpi, const ScreenRect& screenRect)
|
||||
static void ViewportPaint(const Viewport* viewport, DrawPixelInfo& dpi, const ScreenRect& screenRect)
|
||||
{
|
||||
PROFILED_FUNCTION();
|
||||
|
||||
|
||||
@@ -137,7 +137,6 @@ void ViewportUpdateSmartFollowGuest(WindowBase* window, const Guest* peep);
|
||||
void ViewportUpdateSmartFollowStaff(WindowBase* window, const Staff* peep);
|
||||
void ViewportUpdateSmartFollowVehicle(WindowBase* window);
|
||||
void ViewportRender(DrawPixelInfo& dpi, const Viewport* viewport, const ScreenRect& screenRect);
|
||||
void ViewportPaint(const Viewport* viewport, DrawPixelInfo& dpi, const ScreenRect& screenRect);
|
||||
|
||||
CoordsXYZ ViewportAdjustForMapHeight(const ScreenCoordsXY& startCoords);
|
||||
|
||||
|
||||
@@ -2084,7 +2084,7 @@ void TrackDesignDrawPreview(TrackDesign* td6, uint8_t* pixels)
|
||||
gCurrentRotation = i;
|
||||
|
||||
view.viewPos = Translate3DTo2DWithZ(i, centre) - offset;
|
||||
ViewportPaint(&view, dpi, { view.viewPos, view.viewPos + ScreenCoordsXY{ size_x, size_y } });
|
||||
ViewportRender(dpi, &view, { {}, ScreenCoordsXY{ size_x, size_y } });
|
||||
|
||||
dpi.bits += TRACK_PREVIEW_IMAGE_SIZE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user