mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use ScreenCoordsXY on Graph::Draw
This commit is contained in:
parent
d34dc3c924
commit
eab297f9ff
|
@ -287,12 +287,12 @@ namespace Graph
|
|||
}
|
||||
|
||||
void Draw(
|
||||
rct_drawpixelinfo* dpi, const money32* history, const int32_t count, const int32_t baseX, const int32_t baseY,
|
||||
rct_drawpixelinfo* dpi, const money32* history, const int32_t count, const ScreenCoordsXY& screenCoords,
|
||||
const int32_t modifier, const int32_t offset)
|
||||
{
|
||||
DrawMonths(dpi, history, count, baseX, baseY);
|
||||
DrawLineA(dpi, history, count, baseX, baseY, modifier, offset);
|
||||
DrawLineB(dpi, history, count, baseX, baseY, modifier, offset);
|
||||
DrawHoveredValue(dpi, history, count, baseX, baseY, modifier, offset);
|
||||
DrawMonths(dpi, history, count, screenCoords.x, screenCoords.y);
|
||||
DrawLineA(dpi, history, count, screenCoords.x, screenCoords.y, modifier, offset);
|
||||
DrawLineB(dpi, history, count, screenCoords.x, screenCoords.y, modifier, offset);
|
||||
DrawHoveredValue(dpi, history, count, screenCoords.x, screenCoords.y, modifier, offset);
|
||||
}
|
||||
} // namespace Graph
|
||||
|
|
|
@ -12,12 +12,13 @@
|
|||
|
||||
#include <openrct2/common.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/world/Location.hpp>
|
||||
|
||||
namespace Graph
|
||||
{
|
||||
void Draw(rct_drawpixelinfo* dpi, uint8_t* history, int32_t count, int32_t baseX, int32_t baseY);
|
||||
void Draw(
|
||||
rct_drawpixelinfo* dpi, const money32* history, const int32_t count, const int32_t baseX, const int32_t baseY,
|
||||
rct_drawpixelinfo* dpi, const money32* history, const int32_t count, const ScreenCoordsXY& coords,
|
||||
const int32_t modifier, const int32_t offset);
|
||||
} // namespace Graph
|
||||
|
||||
|
|
|
@ -760,7 +760,7 @@ static void window_finances_financial_graph_paint(rct_window* w, rct_drawpixelin
|
|||
|
||||
// X axis labels and values
|
||||
coords = graphTopLeft + ScreenCoordsXY{ 98, 17 };
|
||||
Graph::Draw(dpi, gCashHistory, 64, coords.x, coords.y, yAxisScale, 128);
|
||||
Graph::Draw(dpi, gCashHistory, 64, coords, yAxisScale, 128);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
@ -863,7 +863,7 @@ static void window_finances_park_value_graph_paint(rct_window* w, rct_drawpixeli
|
|||
|
||||
// X axis labels and values
|
||||
coords = graphTopLeft + ScreenCoordsXY{ 98, 17 };
|
||||
Graph::Draw(dpi, gParkValueHistory, 64, coords.x, coords.y, yAxisScale, 0);
|
||||
Graph::Draw(dpi, gParkValueHistory, 64, coords, yAxisScale, 0);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
@ -967,7 +967,7 @@ static void window_finances_profit_graph_paint(rct_window* w, rct_drawpixelinfo*
|
|||
|
||||
// X axis labels and values
|
||||
screenPos = graphTopLeft + ScreenCoordsXY{ 98, 17 };
|
||||
Graph::Draw(dpi, gWeeklyProfitHistory, 64, screenPos.x, screenPos.y, yAxisScale, 128);
|
||||
Graph::Draw(dpi, gWeeklyProfitHistory, 64, screenPos, yAxisScale, 128);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
|
Loading…
Reference in New Issue