1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Fix more money64 issues

This commit is contained in:
Ted John
2021-04-10 19:03:55 +01:00
committed by Gymnasiast
parent 70d9c1438e
commit 407fafbced
3 changed files with 10 additions and 9 deletions

View File

@@ -229,8 +229,9 @@ static void window_clear_scenery_paint(rct_window* w, rct_drawpixelinfo* dpi)
// Draw cost amount
if (gClearSceneryCost != MONEY32_UNDEFINED && gClearSceneryCost != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY))
{
money64 value = gClearSceneryCost;
screenCoords.x = window_clear_scenery_widgets[WIDX_PREVIEW].midX() + w->windowPos.x;
screenCoords.y = window_clear_scenery_widgets[WIDX_PREVIEW].bottom + w->windowPos.y + 5 + 27;
DrawTextBasic(dpi, screenCoords, STR_COST_AMOUNT, &gClearSceneryCost, { TextAlignment::CENTRE });
DrawTextBasic(dpi, screenCoords, STR_COST_AMOUNT, &value, { TextAlignment::CENTRE });
}
}

View File

@@ -1316,7 +1316,6 @@ static void window_editor_scenario_options_park_invalidate(rct_window* w)
*/
static void window_editor_scenario_options_park_paint(rct_window* w, rct_drawpixelinfo* dpi)
{
int32_t arg;
ScreenCoordsXY screenCoords{};
rct_string_id stringId;
@@ -1331,8 +1330,8 @@ static void window_editor_scenario_options_park_paint(rct_window* w, rct_drawpix
// Cost to buy land value
screenCoords = w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_LAND_COST].left + 1, w->widgets[WIDX_LAND_COST].top };
arg = gLandPrice;
DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, &arg);
money64 value = gLandPrice;
DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, &value);
}
if (w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].type != WindowWidgetType::Empty)
@@ -1345,8 +1344,8 @@ static void window_editor_scenario_options_park_paint(rct_window* w, rct_drawpix
screenCoords = w->windowPos
+ ScreenCoordsXY{ w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].left + 1,
w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].top };
arg = gConstructionRightsPrice;
DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, &arg);
money64 value = gConstructionRightsPrice;
DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, &value);
}
if (w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES].type != WindowWidgetType::Empty)
@@ -1375,8 +1374,8 @@ static void window_editor_scenario_options_park_paint(rct_window* w, rct_drawpix
// Entry price value
screenCoords = w->windowPos + ScreenCoordsXY{ w->widgets[WIDX_ENTRY_PRICE].left + 1, w->widgets[WIDX_ENTRY_PRICE].top };
arg = gParkEntranceFee;
DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, &arg);
money64 value = gParkEntranceFee;
DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, &value);
}
// Climate label

View File

@@ -2329,7 +2329,8 @@ static void window_ride_construction_paint(rct_window* w, rct_drawpixelinfo* dpi
screenCoords.y += 11;
if (_currentTrackPrice != MONEY32_UNDEFINED && !(gParkFlags & PARK_FLAGS_NO_MONEY))
{
DrawTextBasic(dpi, screenCoords, STR_COST_LABEL, static_cast<void*>(&_currentTrackPrice), { TextAlignment::CENTRE });
money64 value = _currentTrackPrice;
DrawTextBasic(dpi, screenCoords, STR_COST_LABEL, &value, { TextAlignment::CENTRE });
}
}