Use more constants for drawing arguments

This commit is contained in:
Marijn van der Werf 2016-11-13 23:29:03 +01:00 committed by Ted John
parent 54d0624ded
commit 4039172fb7
23 changed files with 152 additions and 152 deletions

View File

@ -1718,7 +1718,7 @@ void window_draw_widgets(rct_window *w, rct_drawpixelinfo *dpi)
//todo: something missing here too? Between 006EC32B and 006EC369
if (w->flags & WF_WHITE_BORDER_MASK) {
gfx_fill_rect_inset(dpi, w->x, w->y, w->x + w->width - 1, w->y + w->height - 1, 2, INSET_RECT_FLAG_FILL_NONE);
gfx_fill_rect_inset(dpi, w->x, w->y, w->x + w->width - 1, w->y + w->height - 1, COLOUR_WHITE, INSET_RECT_FLAG_FILL_NONE);
}
}

View File

@ -189,10 +189,10 @@ void window_dropdown_show_text_custom_width(int x, int y, int extray, uint8 colo
window_dropdown_widgets[WIDX_BACKGROUND].bottom + 1,
&window_dropdown_events,
WC_DROPDOWN,
0x02
WF_STICK_TO_FRONT
);
w->widgets = window_dropdown_widgets;
if (colour & 0x80)
if (colour & COLOUR_FLAG_TRANSLUCENT)
w->flags |= WF_TRANSPARENT;
w->colours[0] = colour;
@ -260,7 +260,7 @@ void window_dropdown_show_image(int x, int y, int extray, uint8 colour, uint8 fl
WF_STICK_TO_FRONT
);
w->widgets = window_dropdown_widgets;
if (colour & 0x80)
if (colour & COLOUR_FLAG_TRANSLUCENT)
w->flags |= WF_TRANSPARENT;
w->colours[0] = colour;

View File

@ -761,12 +761,12 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo
// Pre-researched items label
x = w->x + w->widgets[WIDX_PRE_RESEARCHED_SCROLL].left;
y = w->y + w->widgets[WIDX_PRE_RESEARCHED_SCROLL].top - 11;
gfx_draw_string_left(dpi, STR_INVENTION_PREINVENTED_ITEMS, NULL, 0, x, y - 1);
gfx_draw_string_left(dpi, STR_INVENTION_PREINVENTED_ITEMS, NULL, COLOUR_BLACK, x, y - 1);
// Research order label
x = w->x + w->widgets[WIDX_RESEARCH_ORDER_SCROLL].left;
y = w->y + w->widgets[WIDX_RESEARCH_ORDER_SCROLL].top - 11;
gfx_draw_string_left(dpi, STR_INVENTION_TO_BE_INVENTED_ITEMS, NULL, 0, x, y - 1);
gfx_draw_string_left(dpi, STR_INVENTION_TO_BE_INVENTED_ITEMS, NULL, COLOUR_BLACK, x, y - 1);
// Preview background
widget = &w->widgets[WIDX_PREVIEW];
@ -825,7 +825,7 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo
// Item category
x = w->x + w->widgets[WIDX_RESEARCH_ORDER_SCROLL].right + 4;
stringId = EditorInventionsResearchCategories[researchItem->category];
gfx_draw_string_left(dpi, STR_INVENTION_RESEARCH_GROUP, &stringId, 0, x, y);
gfx_draw_string_left(dpi, STR_INVENTION_RESEARCH_GROUP, &stringId, COLOUR_BLACK, x, y);
}
/**
@ -945,7 +945,7 @@ static void window_editor_inventions_list_drag_open(rct_research_item *researchI
WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_SNAPPING
);
w->widgets = window_editor_inventions_list_drag_widgets;
w->colours[1] = 2;
w->colours[1] = COLOUR_WHITE;
input_window_position_begin(w, 0, gTooltipCursorX, gTooltipCursorY);
}
@ -999,7 +999,7 @@ static void window_editor_inventions_list_drag_paint(rct_window *w, rct_drawpixe
x = w->x;
y = w->y + 2;
stringId = research_item_get_name(_editorInventionsListDraggedItem->entryIndex & 0xFFFFFF);
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, 32, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, COLOUR_BLACK | COLOUR_FLAG_OUTLINE, x, y);
}
#pragma endregion

View File

@ -1301,7 +1301,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf
set_format_arg(0, uint16, numSelected);
set_format_arg(2, uint16, totalSelectable);
gfx_draw_string_left(dpi, STR_OBJECT_SELECTION_SELECTION_SIZE, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_OBJECT_SELECTION_SELECTION_SIZE, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
// Draw sort button text
@ -1413,17 +1413,17 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
gfx_fill_rect_inset(dpi, 2, y, 11, y + 10, w->colours[1], INSET_RECT_F_E0);
// Highlight background
colour = 142;
colour = COLOUR_BRIGHT_GREEN | COLOUR_FLAG_TRANSLUCENT;
if (listItem->entry == w->object_entry && !(*listItem->flags & OBJECT_SELECTION_FLAG_6)) {
gfx_filter_rect(dpi, 0, y, w->width, y + 11, PALETTE_DARKEN_1);
colour = 14;
colour = COLOUR_BRIGHT_GREEN;
}
// Draw checkmark
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && (*listItem->flags & OBJECT_SELECTION_FLAG_SELECTED)) {
x = 2;
gCurrentFontSpriteBase = colour == 14 ? -2 : -1;
colour2 = w->colours[1] & 0x7F;
gCurrentFontSpriteBase = colour == COLOUR_BRIGHT_GREEN ? -2 : -1;
colour2 = NOT_TRANSLUCENT(w->colours[1]);
if (*listItem->flags & (OBJECT_SELECTION_FLAG_IN_USE | OBJECT_SELECTION_FLAG_ALWAYS_REQUIRED))
colour2 |= COLOUR_FLAG_INSET;
@ -1439,7 +1439,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
gCurrentFontSpriteBase = -1;
}
else {
colour = 0;
colour = COLOUR_BLACK;
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
}

View File

@ -903,13 +903,13 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
// Objective label
x = w->x + 8;
y = w->y + w->widgets[WIDX_OBJECTIVE].top;
gfx_draw_string_left(dpi, STR_OBJECTIVE_WINDOW, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_OBJECTIVE_WINDOW, NULL, COLOUR_BLACK, x, y);
// Objective value
x = w->x + w->widgets[WIDX_OBJECTIVE].left + 1;
y = w->y + w->widgets[WIDX_OBJECTIVE].top;
stringId = ObjectiveDropdownOptionNames[gScenarioObjectiveType];
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, COLOUR_BLACK, x, y);
if (w->widgets[WIDX_OBJECTIVE_ARG_1].type != WWT_EMPTY) {
// Objective argument 1 label
@ -937,7 +937,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
stringId = STR_WINDOW_OBJECTIVE_EXCITEMENT_RATING;
break;
}
gfx_draw_string_left(dpi, stringId, NULL, 0, x, y);
gfx_draw_string_left(dpi, stringId, NULL, COLOUR_BLACK, x, y);
// Objective argument 1 value
x = w->x + w->widgets[WIDX_OBJECTIVE_ARG_1].left + 1;
@ -964,32 +964,32 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
arg = gScenarioObjectiveCurrency;
break;
}
gfx_draw_string_left(dpi, stringId, &arg, 0, x, y);
gfx_draw_string_left(dpi, stringId, &arg, COLOUR_BLACK, x, y);
}
if (w->widgets[WIDX_OBJECTIVE_ARG_2].type != WWT_EMPTY) {
// Objective argument 2 label
x = w->x + 28;
y = w->y + w->widgets[WIDX_OBJECTIVE_ARG_2].top;
gfx_draw_string_left(dpi, STR_WINDOW_OBJECTIVE_DATE, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_OBJECTIVE_DATE, NULL, COLOUR_BLACK, x, y);
// Objective argument 2 value
x = w->x + w->widgets[WIDX_OBJECTIVE_ARG_2].left + 1;
y = w->y + w->widgets[WIDX_OBJECTIVE_ARG_2].top;
arg = (gScenarioObjectiveYear * MONTH_COUNT) - 1;
gfx_draw_string_left(dpi, STR_WINDOW_OBJECTIVE_VALUE_DATE, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_OBJECTIVE_VALUE_DATE, &arg, COLOUR_BLACK, x, y);
}
// Climate label
x = w->x + 8;
y = w->y + w->widgets[WIDX_CLIMATE].top;
gfx_draw_string_left(dpi, STR_CLIMATE_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_CLIMATE_LABEL, NULL, COLOUR_BLACK, x, y);
// Climate value
x = w->x + w->widgets[WIDX_CLIMATE].left + 1;
y = w->y + w->widgets[WIDX_CLIMATE].top;
stringId = ClimateNames[gClimate];
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, COLOUR_BLACK, x, y);
// Park name
x = w->x + 8;
@ -1022,7 +1022,7 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
// Scenario details label
x = w->x + 8;
y = w->y + w->widgets[WIDX_DETAILS].top;
gfx_draw_string_left(dpi, STR_WINDOW_PARK_DETAILS, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_PARK_DETAILS, NULL, COLOUR_BLACK, x, y);
// Scenario details value
x = w->x + 16;
@ -1041,13 +1041,13 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
// Scenario category label
x = w->x + 8;
y = w->y + w->widgets[WIDX_CATEGORY].top;
gfx_draw_string_left(dpi, STR_WINDOW_SCENARIO_GROUP, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_SCENARIO_GROUP, NULL, COLOUR_BLACK, x, y);
// Scenario category value
x = w->x + w->widgets[WIDX_CATEGORY].left + 1;
y = w->y + w->widgets[WIDX_CATEGORY].top;
stringId = ScenarioCategoryStringIds[gS6Info.category];
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, COLOUR_BLACK, x, y);
}
/**
@ -1182,7 +1182,7 @@ static void window_editor_objective_options_rides_paint(rct_window *w, rct_drawp
window_draw_widgets(w, dpi);
window_editor_objective_options_draw_tab_images(w, dpi);
gfx_draw_string_left(dpi, STR_WINDOW_PRESERVATION_ORDER, NULL, 0, w->x + 6, w->y + w->widgets[WIDX_PAGE_BACKGROUND].top + 3);
gfx_draw_string_left(dpi, STR_WINDOW_PRESERVATION_ORDER, NULL, COLOUR_BLACK, w->x + 6, w->y + w->widgets[WIDX_PAGE_BACKGROUND].top + 3);
}
/**
@ -1223,7 +1223,7 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct
}
// Ride name
gfx_draw_string_left(dpi, stringId, &ride->name, 0, 15, y);
gfx_draw_string_left(dpi, stringId, &ride->name, COLOUR_BLACK, 15, y);
}
}

View File

@ -639,43 +639,43 @@ static void window_editor_scenario_options_financial_paint(rct_window *w, rct_dr
if (w->widgets[WIDX_INITIAL_CASH].type != WWT_EMPTY) {
x = w->x + 8;
y = w->y + w->widgets[WIDX_INITIAL_CASH].top;
gfx_draw_string_left(dpi, STR_INIT_CASH_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_INIT_CASH_LABEL, NULL, COLOUR_BLACK, x, y);
x = w->x + w->widgets[WIDX_INITIAL_CASH].left + 1;
y = w->y + w->widgets[WIDX_INITIAL_CASH].top;
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &gInitialCash, 0, x, y);
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &gInitialCash, COLOUR_BLACK, x, y);
}
if (w->widgets[WIDX_INITIAL_LOAN].type != WWT_EMPTY) {
x = w->x + 8;
y = w->y + w->widgets[WIDX_INITIAL_LOAN].top;
gfx_draw_string_left(dpi, STR_INIT_LOAN_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_INIT_LOAN_LABEL, NULL, COLOUR_BLACK, x, y);
x = w->x + w->widgets[WIDX_INITIAL_LOAN].left + 1;
y = w->y + w->widgets[WIDX_INITIAL_LOAN].top;
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &gBankLoan, 0, x, y);
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &gBankLoan, COLOUR_BLACK, x, y);
}
if (w->widgets[WIDX_MAXIMUM_LOAN].type != WWT_EMPTY) {
x = w->x + 8;
y = w->y + w->widgets[WIDX_MAXIMUM_LOAN].top;
gfx_draw_string_left(dpi, STR_MAX_LOAN_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_MAX_LOAN_LABEL, NULL, COLOUR_BLACK, x, y);
x = w->x + w->widgets[WIDX_MAXIMUM_LOAN].left + 1;
y = w->y + w->widgets[WIDX_MAXIMUM_LOAN].top;
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &gMaxBankLoan, 0, x, y);
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &gMaxBankLoan, COLOUR_BLACK, x, y);
}
if (w->widgets[WIDX_INTEREST_RATE].type != WWT_EMPTY) {
x = w->x + 8;
y = w->y + w->widgets[WIDX_INTEREST_RATE].top;
gfx_draw_string_left(dpi, STR_INTEREST_RATE_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_INTEREST_RATE_LABEL, NULL, COLOUR_BLACK, x, y);
x = w->x + w->widgets[WIDX_INTEREST_RATE].left + 1;
y = w->y + w->widgets[WIDX_INTEREST_RATE].top;
sint16 interestRate = clamp(INT16_MIN, (sint16)gBankLoanInterestRate, INT16_MAX);
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &interestRate, 0, x, y);
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &interestRate, COLOUR_BLACK, x, y);
}
}
@ -865,47 +865,47 @@ static void window_editor_scenario_options_guests_paint(rct_window *w, rct_drawp
// Cash per guest label
x = w->x + 8;
y = w->y + w->widgets[WIDX_CASH_PER_GUEST].top;
gfx_draw_string_left(dpi, STR_CASH_PER_GUEST_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_CASH_PER_GUEST_LABEL, NULL, COLOUR_BLACK, x, y);
// Cash per guest value
x = w->x + w->widgets[WIDX_CASH_PER_GUEST].left + 1;
y = w->y + w->widgets[WIDX_CASH_PER_GUEST].top;
arg = gGuestInitialCash;
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, COLOUR_BLACK, x, y);
}
// Guest initial happiness label
x = w->x + 8;
y = w->y + w->widgets[WIDX_GUEST_INITIAL_HAPPINESS].top;
gfx_draw_string_left(dpi, STR_GUEST_INIT_HAPPINESS, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_INIT_HAPPINESS, NULL, COLOUR_BLACK, x, y);
// Guest initial happiness value
x = w->x + w->widgets[WIDX_GUEST_INITIAL_HAPPINESS].left + 1;
y = w->y + w->widgets[WIDX_GUEST_INITIAL_HAPPINESS].top;
arg = (gGuestInitialHappiness * 100) / 255;
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &arg, COLOUR_BLACK, x, y);
// Guest initial hunger label
x = w->x + 8;
y = w->y + w->widgets[WIDX_GUEST_INITIAL_HUNGER].top;
gfx_draw_string_left(dpi, STR_GUEST_INIT_HUNGER, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_INIT_HUNGER, NULL, COLOUR_BLACK, x, y);
// Guest initial hunger value
x = w->x + w->widgets[WIDX_GUEST_INITIAL_HUNGER].left + 1;
y = w->y + w->widgets[WIDX_GUEST_INITIAL_HUNGER].top;
arg = ((255 - gGuestInitialHunger) * 100) / 255;
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &arg, COLOUR_BLACK, x, y);
// Guest initial thirst label
x = w->x + 8;
y = w->y + w->widgets[WIDX_GUEST_INITIAL_THIRST].top;
gfx_draw_string_left(dpi, STR_GUEST_INIT_THIRST, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_INIT_THIRST, NULL, COLOUR_BLACK, x, y);
// Guest initial thirst value
x = w->x + w->widgets[WIDX_GUEST_INITIAL_THIRST].left + 1;
y = w->y + w->widgets[WIDX_GUEST_INITIAL_THIRST].top;
arg = ((255 - gGuestInitialThirst) * 100) / 255;
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_PERCENT_FORMAT_LABEL, &arg, COLOUR_BLACK, x, y);
}
#pragma endregion
@ -1175,50 +1175,50 @@ static void window_editor_scenario_options_park_paint(rct_window *w, rct_drawpix
// Cost to buy land label
x = w->x + 8;
y = w->y + w->widgets[WIDX_LAND_COST].top;
gfx_draw_string_left(dpi, STR_LAND_COST_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_LAND_COST_LABEL, NULL, COLOUR_BLACK, x, y);
// Cost to buy land value
x = w->x + w->widgets[WIDX_LAND_COST].left + 1;
y = w->y + w->widgets[WIDX_LAND_COST].top;
arg = gLandPrice;
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, COLOUR_BLACK, x, y);
}
if (w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].type != WWT_EMPTY) {
// Cost to buy construction rights label
x = w->x + 8;
y = w->y + w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].top;
gfx_draw_string_left(dpi, STR_RIGHTS_COST_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_RIGHTS_COST_LABEL, NULL, COLOUR_BLACK, x, y);
// Cost to buy construction rights value
x = w->x + w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].left + 1;
y = w->y + w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].top;
arg = gConstructionRightsPrice;
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, COLOUR_BLACK, x, y);
}
if (w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES].type != WWT_EMPTY) {
// Pay for park or rides label
x = w->x + w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES].left + 1;
y = w->y + w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES].top;
gfx_draw_string_left(dpi, STR_FREE_PARK_ENTER, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_FREE_PARK_ENTER, NULL, COLOUR_BLACK, x, y);
// Pay for park or rides value
stringId = gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY ? STR_FREE_PARK_ENTER : STR_PAY_PARK_ENTER;
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, 0, x, y);
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, &stringId, COLOUR_BLACK, x, y);
}
if (w->widgets[WIDX_ENTRY_PRICE].type != WWT_EMPTY) {
// Entry price label
x = w->x + w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES].right + 8;
y = w->y + w->widgets[WIDX_ENTRY_PRICE].top;
gfx_draw_string_left(dpi, STR_ENTRY_PRICE_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_ENTRY_PRICE_LABEL, NULL, COLOUR_BLACK, x, y);
// Entry price value
x = w->x + w->widgets[WIDX_ENTRY_PRICE].left + 1;
y = w->y + w->widgets[WIDX_ENTRY_PRICE].top;
arg = gParkEntranceFee;
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, 0, x, y);
gfx_draw_string_left(dpi, STR_CURRENCY_FORMAT_LABEL, &arg, COLOUR_BLACK, x, y);
}
}

View File

@ -679,7 +679,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (i % 2 == 0)
gfx_fill_rect(dpi, x, y, x + 513 - 2, y + 9, ColourMapA[w->colours[1]].lighter | 0x1000000);
gfx_draw_string_left(dpi, window_finances_summary_row_labels[i], NULL, 0, x, y - 1);
gfx_draw_string_left(dpi, window_finances_summary_row_labels[i], NULL, COLOUR_BLACK, x, y - 1);
y += 10;
}
@ -745,24 +745,24 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi)
gfx_fill_rect_inset(dpi, w->x + 8, w->y + 223, w->x + 8 + 513, w->y + 223 + 1, w->colours[1], INSET_RECT_FLAG_BORDER_INSET);
// Loan and interest rate
gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_LOAN, NULL, 0, w->x + 4, w->y + 229);
gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_LOAN, NULL, COLOUR_BLACK, w->x + 4, w->y + 229);
set_format_arg(0, uint16, gBankLoanInterestRate);
gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, gCommonFormatArgs, 0, w->x + 156, w->y + 229);
gfx_draw_string_left(dpi, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, gCommonFormatArgs, COLOUR_BLACK, w->x + 156, w->y + 229);
// Current cash
money32 currentCash = DECRYPT_MONEY(gCashEncrypted);
rct_string_id stringId = currentCash >= 0 ? STR_CASH_LABEL : STR_CASH_NEGATIVE_LABEL;
gfx_draw_string_left(dpi, stringId, &currentCash, 0, w->x + 4, w->y + 244);
gfx_draw_string_left(dpi, stringId, &currentCash, COLOUR_BLACK, w->x + 4, w->y + 244);
// Objective related financial information
if (gScenarioObjectiveType == OBJECTIVE_MONTHLY_FOOD_INCOME) {
money32 lastMonthProfit = finance_get_last_month_shop_profit();
set_format_arg(0, money32, lastMonthProfit);
gfx_draw_string_left(dpi, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, gCommonFormatArgs, 0, w->x + 280, w->y + 229);
gfx_draw_string_left(dpi, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, gCommonFormatArgs, COLOUR_BLACK, w->x + 280, w->y + 229);
} else {
// Park value and company value
gfx_draw_string_left(dpi, STR_PARK_VALUE_LABEL, &gParkValue, 0, w->x + 280, w->y + 229);
gfx_draw_string_left(dpi, STR_COMPANY_VALUE_LABEL, &gCompanyValue, 0, w->x + 280, w->y + 244);
gfx_draw_string_left(dpi, STR_PARK_VALUE_LABEL, &gParkValue, COLOUR_BLACK, w->x + 280, w->y + 229);
gfx_draw_string_left(dpi, STR_COMPANY_VALUE_LABEL, &gCompanyValue, COLOUR_BLACK, w->x + 280, w->y + 244);
}
}
@ -837,7 +837,7 @@ static void window_finances_financial_graph_paint(rct_window *w, rct_drawpixelin
cashLessLoan >= 0 ?
STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_POSITIVE : STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_NEGATIVE,
&cashLessLoan,
0,
COLOUR_BLACK,
graphLeft,
graphTop - 11
);
@ -943,7 +943,7 @@ static void window_finances_park_value_graph_paint(rct_window *w, rct_drawpixeli
dpi,
STR_FINANCES_PARK_VALUE,
&parkValue,
0,
COLOUR_BLACK,
graphLeft,
graphTop - 11
);
@ -1049,7 +1049,7 @@ static void window_finances_profit_graph_paint(rct_window *w, rct_drawpixelinfo
dpi,
weeklyPofit >= 0 ? STR_FINANCES_WEEKLY_PROFIT_POSITIVE : STR_FINANCES_WEEKLY_PROFIT_LOSS,
&weeklyPofit,
0,
COLOUR_BLACK,
graphLeft,
graphTop - 11
);
@ -1209,13 +1209,13 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp
// Duration
weeksRemaining = (gMarketingCampaignDaysLeft[i] % 128);
gfx_draw_string_left(dpi, weeksRemaining == 1 ? STR_1_WEEK_REMAINING : STR_X_WEEKS_REMAINING, &weeksRemaining, 0, x + 304, y);
gfx_draw_string_left(dpi, weeksRemaining == 1 ? STR_1_WEEK_REMAINING : STR_X_WEEKS_REMAINING, &weeksRemaining, COLOUR_BLACK, x + 304, y);
y += 10;
}
if (noCampaignsActive) {
gfx_draw_string_left(dpi, STR_MARKETING_CAMPAGINS_NONE, NULL, 0, x + 4, y);
gfx_draw_string_left(dpi, STR_MARKETING_CAMPAGINS_NONE, NULL, COLOUR_BLACK, x + 4, y);
y += 10;
}
y += 31;
@ -1230,8 +1230,8 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp
money32 pricePerWeek = AdvertisingCampaignPricePerWeek[i];
// Draw button text
gfx_draw_string_left(dpi, MarketingCampaignNames[i][0], NULL, 0, x + 4, y - 1);
gfx_draw_string_left(dpi, STR_MARKETING_PER_WEEK, &pricePerWeek, 0, x + 310, y - 1);
gfx_draw_string_left(dpi, MarketingCampaignNames[i][0], NULL, COLOUR_BLACK, x + 4, y - 1);
gfx_draw_string_left(dpi, STR_MARKETING_PER_WEEK, &pricePerWeek, COLOUR_BLACK, x + 310, y - 1);
y += 12;
}

View File

@ -485,7 +485,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi,
format = STR_FAHRENHEIT_VALUE;
}
set_format_arg(0, short, temperature);
gfx_draw_string_left(dpi, format, gCommonFormatArgs, 0, x, y + 6);
gfx_draw_string_left(dpi, format, gCommonFormatArgs, COLOUR_BLACK, x, y + 6);
x += 30;
// Current weather

View File

@ -1042,7 +1042,7 @@ void window_guest_overview_paint(rct_window *w, rct_drawpixelinfo *dpi)
x = widget->right - widget->left - w->list_information_type;
peep_thought_set_format_args(&peep->thoughts[i]);
gfx_draw_string_left(&dpi_marquee, STR_WINDOW_COLOUR_2_STRINGID, gCommonFormatArgs, 0, x, 0);
gfx_draw_string_left(&dpi_marquee, STR_WINDOW_COLOUR_2_STRINGID, gCommonFormatArgs, COLOUR_BLACK, x, 0);
}
/**
@ -1370,11 +1370,11 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
int y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 4;
//Happiness
gfx_draw_string_left(dpi, STR_GUEST_STAT_HAPPINESS_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_HAPPINESS_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
int happiness = peep->happiness;
if (happiness < 10)happiness = 10;
int ebp = 14;
int ebp = COLOUR_BRIGHT_GREEN;
if (happiness < 50){
ebp |= 0x80000000;
}
@ -1382,10 +1382,10 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
//Energy
y += 10;
gfx_draw_string_left(dpi, STR_GUEST_STAT_ENERGY_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_ENERGY_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
int energy = ((peep->energy - 32) * 85) / 32;
ebp = 14;
ebp = COLOUR_BRIGHT_GREEN;
if (energy < 50){
ebp |= 0x80000000;
}
@ -1394,7 +1394,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
//Hunger
y += 10;
gfx_draw_string_left(dpi, STR_GUEST_STAT_HUNGER_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_HUNGER_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
int hunger = peep->hunger;
if (hunger > 190) hunger = 190;
@ -1405,7 +1405,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
hunger /= 32;
hunger = 0xFF & ~hunger;
ebp = 28;
ebp = COLOUR_BRIGHT_RED;
if (hunger > 170){
ebp |= 0x80000000;
}
@ -1413,7 +1413,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
//Thirst
y += 10;
gfx_draw_string_left(dpi, STR_GUEST_STAT_THIRST_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_THIRST_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
int thirst = peep->thirst;
if (thirst > 190) thirst = 190;
@ -1424,7 +1424,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
thirst /= 32;
thirst = 0xFF & ~thirst;
ebp = 28;
ebp = COLOUR_BRIGHT_RED;
if (thirst > 170){
ebp |= 0x80000000;
}
@ -1432,7 +1432,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
//Nausea
y += 10;
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
int nausea = peep->nausea - 32;
@ -1440,7 +1440,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
nausea *= 36;
nausea /= 32;
ebp = 28;
ebp = COLOUR_BRIGHT_RED;
if (nausea > 120){
ebp |= 0x80000000;
}
@ -1448,7 +1448,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
//Bathroom
y += 10;
gfx_draw_string_left(dpi, STR_GUEST_STAT_TOILET_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_TOILET_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
int bathroom = peep->bathroom - 32;
if (bathroom > 210) bathroom = 210;
@ -1458,7 +1458,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
bathroom *= 45;
bathroom /= 32;
ebp = 28;
ebp = COLOUR_BRIGHT_RED;
if (bathroom > 160){
ebp |= 0x80000000;
}
@ -1471,14 +1471,14 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
eax -= peep->time_in_park;
eax >>= 11;
set_format_arg(0, uint16, eax & 0xFFFF);
gfx_draw_string_left(dpi, STR_GUEST_STAT_TIME_IN_PARK, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_TIME_IN_PARK, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
y += 19;
gfx_fill_rect_inset(dpi, x, y - 6, x + 179, y - 5, w->colours[1], INSET_RECT_FLAG_BORDER_INSET);
// Preferred Ride
gfx_draw_string_left(dpi, STR_GUEST_STAT_PREFERRED_RIDE, (void *) 0, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_PREFERRED_RIDE, NULL, COLOUR_BLACK, x, y);
y += 10;
// Intensity
@ -1492,7 +1492,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (intensity == 15) string_id = STR_GUEST_STAT_PREFERRED_INTESITY_ABOVE;
}
gfx_draw_string_left(dpi, string_id, gCommonFormatArgs, 0, x + 4, y);
gfx_draw_string_left(dpi, string_id, gCommonFormatArgs, COLOUR_BLACK, x + 4, y);
// Nausea tolerance
static const rct_string_id nauseaTolerances[] = {
@ -1504,7 +1504,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
y += 10;
int nausea_tolerance = peep->nausea_tolerance & 0x3;
set_format_arg(0, rct_string_id, nauseaTolerances[nausea_tolerance]);
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_TOLERANCE, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_NAUSEA_TOLERANCE, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
/**
@ -1676,7 +1676,7 @@ void window_guest_rides_paint(rct_window *w, rct_drawpixelinfo *dpi)
//dx
int y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].top + 2;
gfx_draw_string_left(dpi, STR_GUEST_LABEL_RIDES_BEEN_ON, (void*)0, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_LABEL_RIDES_BEEN_ON, NULL, COLOUR_BLACK, x, y);
y = w->y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].bottom - 12;
@ -1720,7 +1720,7 @@ void window_guest_rides_scroll_paint(rct_window *w, rct_drawpixelinfo *dpi, int
}
rct_ride* ride = get_ride(w->list_item_positions[list_index]);
gfx_draw_string_left(dpi, string_format, (void*)&ride->name, 0, 0, y - 1);
gfx_draw_string_left(dpi, string_format, (void*)&ride->name, COLOUR_BLACK, 0, y - 1);
}
}
@ -1802,29 +1802,29 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi)
// Cash in pocket
set_format_arg(0, money32, peep->cash_in_pocket);
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_IN_POCKET, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_IN_POCKET, gCommonFormatArgs, COLOUR_BLACK, x, y);
// Cash spent
y += 10;
set_format_arg(0, money32, peep->cash_spent);
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_SPENT, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_SPENT, gCommonFormatArgs, COLOUR_BLACK, x, y);
y += 20;
gfx_fill_rect_inset(dpi, x, y - 6, x + 179, y - 5, w->colours[1], INSET_RECT_FLAG_BORDER_INSET);
// Paid to enter
set_format_arg(0, money32, peep->paid_to_enter);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_ENTRANCE_FEE, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_ENTRANCE_FEE, gCommonFormatArgs, COLOUR_BLACK, x, y);
// Paid on rides
y += 10;
set_format_arg(0, money32, peep->paid_on_rides);
set_format_arg(4, uint16, peep->no_of_rides);
if (peep->no_of_rides != 1){
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE_PLURAL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
else{
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_RIDE, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
// Paid on food
@ -1832,10 +1832,10 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi)
set_format_arg(0, money32, peep->paid_on_food);
set_format_arg(4, uint16, peep->no_of_food);
if (peep->no_of_food != 1){
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD_PLURAL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
else{
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_FOOD, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
// Paid on drinks
@ -1843,10 +1843,10 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi)
set_format_arg(0, money32, peep->paid_on_drink);
set_format_arg(4, uint16, peep->no_of_drinks);
if (peep->no_of_drinks != 1){
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK_PLURAL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
else{
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_DRINK, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
// Paid on souvenirs
@ -1854,10 +1854,10 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi)
set_format_arg(0, money32, peep->paid_on_souvenirs);
set_format_arg(4, uint16, peep->no_of_souvenirs);
if (peep->no_of_souvenirs != 1){
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
else{
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_EXPENSES_SOUVENIR, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
}
@ -1943,7 +1943,7 @@ void window_guest_thoughts_paint(rct_window *w, rct_drawpixelinfo *dpi)
//dx
int y = w->y + window_guest_thoughts_widgets[WIDX_PAGE_BACKGROUND].top + 4;
gfx_draw_string_left(dpi, STR_GUEST_RECENT_THOUGHTS_LABEL, (void*)0, 0, x, y);
gfx_draw_string_left(dpi, STR_GUEST_RECENT_THOUGHTS_LABEL, NULL, COLOUR_BLACK, x, y);
y += 10;
for (rct_peep_thought* thought = peep->thoughts; thought < &peep->thoughts[PEEP_MAX_THOUGHTS]; ++thought){
@ -2121,7 +2121,7 @@ void window_guest_inventory_paint(rct_window *w, rct_drawpixelinfo *dpi)
int maxY = w->y + w->height - 22;
int numItems = 0;
gfx_draw_string_left(dpi, STR_CARRYING, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_CARRYING, NULL, COLOUR_BLACK, x, y);
y += 10;
for (int item = 0; item < SHOP_ITEM_COUNT; item++) {
@ -2134,6 +2134,6 @@ void window_guest_inventory_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
if (numItems == 0) {
gfx_draw_string_left(dpi, STR_NOTHING, (void*)0, 0, x, y);
gfx_draw_string_left(dpi, STR_NOTHING, NULL, COLOUR_BLACK, x, y);
}
}

View File

@ -681,7 +681,7 @@ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
x = w->x + 4;
y = w->y + window_guest_list_widgets[WIDX_GUEST_LIST].bottom + 2;
set_format_arg(0, sint16, w->var_492);
gfx_draw_string_left(dpi, (w->var_492 == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, (w->var_492 == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), gCommonFormatArgs, COLOUR_BLACK, x, y);
}
}

View File

@ -255,33 +255,33 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
// Stats
fixed32_2dp rating = td6->excitement * 10;
gfx_draw_string_left(dpi, STR_TRACK_LIST_EXCITEMENT_RATING, &rating, 0, x, y);
gfx_draw_string_left(dpi, STR_TRACK_LIST_EXCITEMENT_RATING, &rating, COLOUR_BLACK, x, y);
y += 10;
rating = td6->intensity * 10;
gfx_draw_string_left(dpi, STR_TRACK_LIST_INTENSITY_RATING, &rating, 0, x, y);
gfx_draw_string_left(dpi, STR_TRACK_LIST_INTENSITY_RATING, &rating, COLOUR_BLACK, x, y);
y += 10;
rating = td6->nausea * 10;
gfx_draw_string_left(dpi, STR_TRACK_LIST_NAUSEA_RATING, &rating, 0, x, y);
gfx_draw_string_left(dpi, STR_TRACK_LIST_NAUSEA_RATING, &rating, COLOUR_BLACK, x, y);
y += 14;
if (td6->type != RIDE_TYPE_MAZE) {
if (td6->type == RIDE_TYPE_MINI_GOLF) {
// Holes
uint16 holes = td6->holes & 0x1F;
gfx_draw_string_left(dpi, STR_HOLES, &holes, 0, x, y);
gfx_draw_string_left(dpi, STR_HOLES, &holes, COLOUR_BLACK, x, y);
y += 10;
}
else {
// Maximum speed
uint16 speed = ((td6->max_speed << 16) * 9) >> 18;
gfx_draw_string_left(dpi, STR_MAX_SPEED, &speed, 0, x, y);
gfx_draw_string_left(dpi, STR_MAX_SPEED, &speed, COLOUR_BLACK, x, y);
y += 10;
// Average speed
speed = ((td6->average_speed << 16) * 9) >> 18;
gfx_draw_string_left(dpi, STR_AVERAGE_SPEED, &speed, 0, x, y);
gfx_draw_string_left(dpi, STR_AVERAGE_SPEED, &speed, COLOUR_BLACK, x, y);
y += 10;
}
@ -295,17 +295,17 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_G_FORCES)) {
// Maximum positive vertical Gs
int gForces = td6->max_positive_vertical_g * 32;
gfx_draw_string_left(dpi, STR_MAX_POSITIVE_VERTICAL_G, &gForces, 0, x, y);
gfx_draw_string_left(dpi, STR_MAX_POSITIVE_VERTICAL_G, &gForces, COLOUR_BLACK, x, y);
y += 10;
// Maximum negative vertical Gs
gForces = td6->max_negative_vertical_g * 32;
gfx_draw_string_left(dpi, STR_MAX_NEGATIVE_VERTICAL_G, &gForces, 0, x, y);
gfx_draw_string_left(dpi, STR_MAX_NEGATIVE_VERTICAL_G, &gForces, COLOUR_BLACK, x, y);
y += 10;
// Maximum lateral Gs
gForces = td6->max_lateral_g * 32;
gfx_draw_string_left(dpi, STR_MAX_LATERAL_G, &gForces, 0, x, y);
gfx_draw_string_left(dpi, STR_MAX_LATERAL_G, &gForces, COLOUR_BLACK, x, y);
y += 10;
// If .TD6
@ -313,7 +313,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (td6->total_air_time != 0) {
// Total air time
int airTime = td6->total_air_time * 25;
gfx_draw_string_left(dpi, STR_TOTAL_AIR_TIME, &airTime, 0, x, y);
gfx_draw_string_left(dpi, STR_TOTAL_AIR_TIME, &airTime, COLOUR_BLACK, x, y);
y += 10;
}
}
@ -322,11 +322,11 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (ride_type_has_flag(td6->type, RIDE_TYPE_FLAG_HAS_DROPS)) {
// Drops
uint16 drops = td6->drops & 0x3F;
gfx_draw_string_left(dpi, STR_DROPS, &drops, 0, x, y);
gfx_draw_string_left(dpi, STR_DROPS, &drops, COLOUR_BLACK, x, y);
y += 10;
// Drop height is multiplied by 0.75
gfx_draw_string_left(dpi, STR_HIGHEST_DROP_HEIGHT, &drops, 0, x, y);
gfx_draw_string_left(dpi, STR_HIGHEST_DROP_HEIGHT, &drops, COLOUR_BLACK, x, y);
y += 10;
}
@ -334,7 +334,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
uint16 inversions = td6->inversions & 0x1F;
if (inversions != 0) {
// Inversions
gfx_draw_string_left(dpi, STR_INVERSIONS, &inversions, 0, x, y);
gfx_draw_string_left(dpi, STR_INVERSIONS, &inversions, COLOUR_BLACK, x, y);
y += 10;
}
}
@ -344,12 +344,12 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
// Space required
set_format_arg(0, uint16, td6->space_required_x);
set_format_arg(2, uint16, td6->space_required_y);
gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, gCommonFormatArgs, COLOUR_BLACK, x, y);
y += 10;
}
if (td6->cost != 0) {
gfx_draw_string_left(dpi, STR_TRACK_LIST_COST_AROUND, &td6->cost, 0, x, y);
gfx_draw_string_left(dpi, STR_TRACK_LIST_COST_AROUND, &td6->cost, COLOUR_BLACK, x, y);
y += 14;
}
}

View File

@ -529,7 +529,7 @@ static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, i
set_format_arg(0, rct_string_id, STR_STRING);
set_format_arg(2, char*, _listItems[i].name);
gfx_draw_string_left(dpi, stringId, gCommonFormatArgs, 0, 0, y - 1);
gfx_draw_string_left(dpi, stringId, gCommonFormatArgs, COLOUR_BLACK, 0, y - 1);
}
}

View File

@ -852,7 +852,7 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi)
for (i = 0; i < 8; i++) {
gfx_fill_rect(dpi, x, y + 2, x + 6, y + 8, RideKeyColours[i]);
gfx_draw_string_left(dpi, mapLabels[i], w, 0, x + 10, y);
gfx_draw_string_left(dpi, mapLabels[i], w, COLOUR_BLACK, x + 10, y);
y += 10;
if (i == 3) {
x += 118;
@ -861,7 +861,7 @@ static void window_map_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
}
} else if (!widget_is_active_tool(w, WIDX_SET_LAND_RIGHTS)) {
gfx_draw_string_left(dpi, STR_MAP_SIZE, 0, 0, w->x + 4, w->y + w->widgets[WIDX_MAP_SIZE_SPINNER].top + 1);
gfx_draw_string_left(dpi, STR_MAP_SIZE, NULL, COLOUR_BLACK, w->x + 4, w->y + w->widgets[WIDX_MAP_SIZE_SPINNER].top + 1);
}
}

View File

@ -674,10 +674,10 @@ static void window_mapgen_base_paint(rct_window *w, rct_drawpixelinfo *dpi)
window_draw_widgets(w, dpi);
window_mapgen_draw_tab_images(dpi, w);
gfx_draw_string_left(dpi, STR_MAP_SIZE, 0, 0, w->x + 4, w->y + w->widgets[WIDX_MAP_SIZE].top + 1);
gfx_draw_string_left(dpi, STR_BASE_HEIGHT_LABEL, 0, 0, w->x + 4, w->y + w->widgets[WIDX_BASE_HEIGHT].top + 1);
gfx_draw_string_left(dpi, STR_WATER_LEVEL_LABEL, 0, 0, w->x + 4, w->y + w->widgets[WIDX_WATER_LEVEL].top + 1);
gfx_draw_string_left(dpi, STR_TERRAIN_LABEL, 0, 0, w->x + 4, w->y + w->widgets[WIDX_FLOOR_TEXTURE].top + 1);
gfx_draw_string_left(dpi, STR_MAP_SIZE, NULL, COLOUR_BLACK, w->x + 4, w->y + w->widgets[WIDX_MAP_SIZE].top + 1);
gfx_draw_string_left(dpi, STR_BASE_HEIGHT_LABEL, NULL, COLOUR_BLACK, w->x + 4, w->y + w->widgets[WIDX_BASE_HEIGHT].top + 1);
gfx_draw_string_left(dpi, STR_WATER_LEVEL_LABEL, NULL, COLOUR_BLACK, w->x + 4, w->y + w->widgets[WIDX_WATER_LEVEL].top + 1);
gfx_draw_string_left(dpi, STR_TERRAIN_LABEL, NULL, COLOUR_BLACK, w->x + 4, w->y + w->widgets[WIDX_FLOOR_TEXTURE].top + 1);
// The practical map size is 2 lower than the technical map size
uint16 mapSizeArgs[2] = { _mapSize - 2, _mapSize -2 };
@ -978,12 +978,12 @@ static void window_mapgen_simplex_paint(rct_window *w, rct_drawpixelinfo *dpi)
window_draw_widgets(w, dpi);
window_mapgen_draw_tab_images(dpi, w);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_LOW_, 0, 0, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_LOW].top + 1);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_HIGH, 0, 0, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_HIGH].top + 1);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_BASE_FREQUENCY, 0, 0, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_OCTAVES, 0, 0, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_OCTAVES].top + 1);
gfx_draw_string_left(dpi, STR_MAP_SIZE, 0, 0, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_MAP_SIZE].top + 1);
gfx_draw_string_left(dpi, STR_WATER_LEVEL_LABEL, 0, 0, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_WATER_LEVEL].top + 1);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_LOW_, NULL, COLOUR_BLACK, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_LOW].top + 1);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_HIGH, NULL, COLOUR_BLACK, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_HIGH].top + 1);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_BASE_FREQUENCY, NULL, COLOUR_BLACK, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1);
gfx_draw_string_left(dpi, STR_MAPGEN_SIMPLEX_NOISE_OCTAVES, NULL, COLOUR_BLACK, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_OCTAVES].top + 1);
gfx_draw_string_left(dpi, STR_MAP_SIZE, NULL, COLOUR_BLACK, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_MAP_SIZE].top + 1);
gfx_draw_string_left(dpi, STR_WATER_LEVEL_LABEL, NULL, COLOUR_BLACK, w->x + 5, w->y + w->widgets[WIDX_SIMPLEX_WATER_LEVEL].top + 1);
gfx_draw_string_left(dpi, STR_COMMA16, &_simplex_low, w->colours[1], w->x + w->widgets[WIDX_SIMPLEX_LOW].left + 1, w->y + w->widgets[WIDX_SIMPLEX_LOW].top + 1);
gfx_draw_string_left(dpi, STR_COMMA16, &_simplex_high, w->colours[1], w->x + w->widgets[WIDX_SIMPLEX_HIGH].left + 1, w->y + w->widgets[WIDX_SIMPLEX_HIGH].top + 1);

View File

@ -460,19 +460,19 @@ static void window_multiplayer_information_paint(rct_window *w, rct_drawpixelinf
const utf8 * providerName = network_get_server_provider_name();
if (!str_is_null_or_empty(providerName)) {
gfx_draw_string_left(dpi, STR_PROVIDER_NAME, (void*)&providerName, 0, x, y);
gfx_draw_string_left(dpi, STR_PROVIDER_NAME, (void*)&providerName, COLOUR_BLACK, x, y);
y += 11;
}
const utf8 * providerEmail = network_get_server_provider_email();
if (!str_is_null_or_empty(providerEmail)) {
gfx_draw_string_left(dpi, STR_PROVIDER_EMAIL, (void*)&providerEmail, 0, x, y);
gfx_draw_string_left(dpi, STR_PROVIDER_EMAIL, (void*)&providerEmail, COLOUR_BLACK, x, y);
y += 11;
}
const utf8 * providerWebsite = network_get_server_provider_website();
if (!str_is_null_or_empty(providerWebsite)) {
gfx_draw_string_left(dpi, STR_PROVIDER_WEBSITE, (void*)&providerWebsite, 0, x, y);
gfx_draw_string_left(dpi, STR_PROVIDER_WEBSITE, (void*)&providerWebsite, COLOUR_BLACK, x, y);
}
}
}
@ -895,7 +895,7 @@ static void window_multiplayer_groups_scrollpaint(rct_window *w, rct_drawpixelin
// Draw action name
set_format_arg(0, uint16, network_get_action_name_string_id(i));
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, gCommonFormatArgs, 0, 10, y - 1);
gfx_draw_string_left(dpi, STR_WINDOW_COLOUR_2_STRINGID, gCommonFormatArgs, COLOUR_BLACK, 10, y - 1);
}
y += 10;
}

View File

@ -393,10 +393,10 @@ static void window_new_campaign_paint(rct_window *w, rct_drawpixelinfo *dpi)
// Price per week
money32 pricePerWeek = AdvertisingCampaignPricePerWeek[w->campaign.campaign_type];
gfx_draw_string_left(dpi, STR_MARKETING_COST_PER_WEEK, &pricePerWeek, 0, x, y);
gfx_draw_string_left(dpi, STR_MARKETING_COST_PER_WEEK, &pricePerWeek, COLOUR_BLACK, x, y);
y += 13;
// Total price
money32 totalPrice = AdvertisingCampaignPricePerWeek[w->campaign.campaign_type] * w->campaign.no_weeks;
gfx_draw_string_left(dpi, STR_MARKETING_TOTAL_COST, &totalPrice, 0, x, y);
gfx_draw_string_left(dpi, STR_MARKETING_TOTAL_COST, &totalPrice, COLOUR_BLACK, x, y);
}

View File

@ -904,7 +904,7 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli
stringId = STR_X_DESIGNS_AVAILABLE;
break;
}
gfx_draw_string_left(dpi, stringId, &_lastTrackDesignCount, 0, x, y + 39);
gfx_draw_string_left(dpi, stringId, &_lastTrackDesignCount, COLOUR_BLACK, x, y + 39);
}
// Price

View File

@ -292,7 +292,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s
// Date text
set_format_arg(0, rct_string_id, DateDayNames[newsItem->day - 1]);
set_format_arg(2, rct_string_id, DateGameMonthNames[(newsItem->month_year % 8)]);
gfx_draw_string_left(dpi, STR_NEWS_DATE_FORMAT, gCommonFormatArgs, 2, 4, y);
gfx_draw_string_left(dpi, STR_NEWS_DATE_FORMAT, gCommonFormatArgs, COLOUR_WHITE, 4, y);
// Item text
utf8 buffer[400];

View File

@ -1706,7 +1706,7 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi)
int colour = w->colours[1];
// disable resolution dropdown on "Fullscreen (desktop)"
if (gConfigGeneral.fullscreen_mode == 2) {
colour |= 0x40;
colour |= COLOUR_FLAG_INSET;
}
gfx_draw_string_left(dpi, STR_DISPLAY_RESOLUTION, w, colour, w->x + 10 + 15, w->y + window_options_display_widgets[WIDX_RESOLUTION].top + 1);
gfx_draw_string_left(dpi, STR_UI_SCALING_DESC, w, w->colours[1], w->x + 10, w->y + window_options_display_widgets[WIDX_SCALE].top + 1);

View File

@ -1272,7 +1272,7 @@ static void window_park_rating_paint(rct_window *w, rct_drawpixelinfo *dpi)
widget = &window_park_rating_widgets[WIDX_PAGE_BACKGROUND];
// Current value
gfx_draw_string_left(dpi, STR_PARK_RATING_LABEL, &gParkRating, 0, x + widget->left + 3, y + widget->top + 2);
gfx_draw_string_left(dpi, STR_PARK_RATING_LABEL, &gParkRating, COLOUR_BLACK, x + widget->left + 3, y + widget->top + 2);
// Graph border
gfx_fill_rect_inset(dpi, x + widget->left + 4, y + widget->top + 15, x + widget->right - 4, y + widget->bottom - 4, w->colours[1], INSET_RECT_F_30);
@ -1389,7 +1389,7 @@ static void window_park_guests_paint(rct_window *w, rct_drawpixelinfo *dpi)
widget = &window_park_guests_widgets[WIDX_PAGE_BACKGROUND];
// Current value
gfx_draw_string_left(dpi, STR_GUESTS_IN_PARK_LABEL, &gNumGuestsInPark, 0, x + widget->left + 3, y + widget->top + 2);
gfx_draw_string_left(dpi, STR_GUESTS_IN_PARK_LABEL, &gNumGuestsInPark, COLOUR_BLACK, x + widget->left + 3, y + widget->top + 2);
// Graph border
gfx_fill_rect_inset(dpi, x + widget->left + 4, y + widget->top + 15, x + widget->right - 4, y + widget->bottom - 4, w->colours[1], INSET_RECT_F_30);
@ -1522,7 +1522,7 @@ static void window_park_price_paint(rct_window *w, rct_drawpixelinfo *dpi)
x = w->x + window_park_price_widgets[WIDX_PAGE_BACKGROUND].left + 4;
y = w->y + window_park_price_widgets[WIDX_PAGE_BACKGROUND].top + 30;
gfx_draw_string_left(dpi, STR_INCOME_FROM_ADMISSIONS, &gTotalIncomeFromAdmissions, 0, x, y);
gfx_draw_string_left(dpi, STR_INCOME_FROM_ADMISSIONS, &gTotalIncomeFromAdmissions, COLOUR_BLACK, x, y);
}
#pragma endregion
@ -1621,27 +1621,27 @@ static void window_park_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
parkSize = squaredmetres_to_squaredfeet(parkSize);
}
set_format_arg(0, uint32, parkSize);
gfx_draw_string_left(dpi, stringIndex, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, stringIndex, gCommonFormatArgs, COLOUR_BLACK, x, y);
y += 10;
// Draw number of rides / attractions
if (w->list_information_type != (uint16)-1) {
set_format_arg(0, uint32, w->list_information_type);
gfx_draw_string_left(dpi, STR_NUMBER_OF_RIDES_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_NUMBER_OF_RIDES_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
y += 10;
// Draw number of staff
if (w->var_48C != -1) {
set_format_arg(0, uint32, w->var_48C);
gfx_draw_string_left(dpi, STR_STAFF_LABEL, gCommonFormatArgs, 0, x, y);
gfx_draw_string_left(dpi, STR_STAFF_LABEL, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
y += 10;
// Draw number of guests in park
gfx_draw_string_left(dpi, STR_GUESTS_IN_PARK_LABEL, &gNumGuestsInPark, 0, x, y);
gfx_draw_string_left(dpi, STR_GUESTS_IN_PARK_LABEL, &gNumGuestsInPark, COLOUR_BLACK, x, y);
y += 10;
gfx_draw_string_left(dpi, STR_TOTAL_ADMISSIONS, &gTotalAdmissions, 0, x, y);
gfx_draw_string_left(dpi, STR_TOTAL_ADMISSIONS, &gTotalAdmissions, COLOUR_BLACK, x, y);
}
#pragma endregion
@ -1785,7 +1785,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi)
y += 5;
// Your objective:
gfx_draw_string_left(dpi, STR_OBJECTIVE_LABEL, NULL, 0, x, y);
gfx_draw_string_left(dpi, STR_OBJECTIVE_LABEL, NULL, COLOUR_BLACK, x, y);
y += 10;
// Objective

View File

@ -530,12 +530,12 @@ void window_player_statistics_paint(rct_window *w, rct_drawpixelinfo *dpi)
int y = w->y + window_player_overview_widgets[WIDX_PAGE_BACKGROUND].top + 4;
set_format_arg(0, uint32, network_get_player_commands_ran(player));
gfx_draw_string_left(dpi, STR_COMMANDS_RAN, gCommonFormatArgs, 0,x, y);
gfx_draw_string_left(dpi, STR_COMMANDS_RAN, gCommonFormatArgs, COLOUR_BLACK, x, y);
y += 10;
set_format_arg(0, uint32, network_get_player_money_spent(player));
gfx_draw_string_left(dpi, STR_MONEY_SPENT, gCommonFormatArgs, 0,x, y);
gfx_draw_string_left(dpi, STR_MONEY_SPENT, gCommonFormatArgs, COLOUR_BLACK, x, y);
}
static void window_player_set_page(rct_window* w, int page)

View File

@ -577,7 +577,7 @@ void window_research_funding_page_paint(rct_window *w, rct_drawpixelinfo *dpi, i
int currentResearchLevel = gResearchFundingLevel;
money32 currentResearchCostPerWeek = research_cost_table[currentResearchLevel];
gfx_draw_string_left(dpi, STR_RESEARCH_COST_PER_MONTH, &currentResearchCostPerWeek, 0, w->x + 10, w->y + 77);
gfx_draw_string_left(dpi, STR_RESEARCH_COST_PER_MONTH, &currentResearchCostPerWeek, COLOUR_BLACK, w->x + 10, w->y + 77);
}
#pragma endregion

View File

@ -4025,12 +4025,12 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi)
reliability = ride->reliability >> 8;
gfx_draw_string_left(dpi, STR_RELIABILITY_LABEL_1757, &reliability, COLOUR_BLACK, x, y);
window_ride_maintenance_draw_bar(w, dpi, x + 103, y, max(10, reliability), 14);
window_ride_maintenance_draw_bar(w, dpi, x + 103, y, max(10, reliability), COLOUR_BRIGHT_GREEN);
y += 11;
downTime = ride->downtime;
gfx_draw_string_left(dpi, STR_DOWN_TIME_LABEL_1889, &downTime, COLOUR_BLACK, x, y);
window_ride_maintenance_draw_bar(w, dpi, x + 103, y, downTime, 28);
window_ride_maintenance_draw_bar(w, dpi, x + 103, y, downTime, COLOUR_BRIGHT_RED);
y += 26;
// Last inspection