Skip to content

Commit

Permalink
Remove kBarBlink check from MaintenanceDrawBar
Browse files Browse the repository at this point in the history
Value is never set
  • Loading branch information
Gymnasiast committed May 18, 2024
1 parent ed9c872 commit be9509e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/openrct2-ui/windows/Ride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3656,22 +3656,15 @@ static_assert(std::size(RatingNames) == 6);
}
}

void MaintenanceDrawBar(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t value, int32_t colour) const
void MaintenanceDrawBar(DrawPixelInfo& dpi, const ScreenCoordsXY& coords, int32_t value, colour_t colour) const
{
GfxFillRectInset(dpi, { coords, coords + ScreenCoordsXY{ 149, 8 } }, colours[1], INSET_RECT_F_30);
if (colour & kBarBlink)
{
colour &= ~kBarBlink;
if (GameIsNotPaused() && (gCurrentRealTimeTicks & 8))
return;
}

value = ((186 * ((value * 2) & 0xFF)) >> 8) & 0xFF;
if (value > 2)
{
GfxFillRectInset(
dpi, { coords + ScreenCoordsXY{ 2, 1 }, coords + ScreenCoordsXY{ value + 1, 7 } },
{ static_cast<colour_t>(colour) }, 0);
dpi, { coords + ScreenCoordsXY{ 2, 1 }, coords + ScreenCoordsXY{ value + 1, 7 } }, { colour }, 0);
}
}

Expand Down

0 comments on commit be9509e

Please sign in to comment.