mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 16:24:35 +01:00
integrate common format args
This commit is contained in:
@@ -31,8 +31,8 @@ static void graph_draw_months_uint8(rct_drawpixelinfo *dpi, uint8 *history, int
|
||||
for (i = count - 1; i >= 0; i--) {
|
||||
if (history[i] != 0 && history[i] != 255 && yearOver32 % 4 == 0) {
|
||||
// Draw month text
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = ((yearOver32 / 4) + 8) % 8 + STR_MONTH_SHORT_MAR;
|
||||
gfx_draw_string_centred(dpi, 2222, x, y - 10, 0, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS);
|
||||
set_format_arg(0, uint32, ((yearOver32 / 4) + 8) % 8 + STR_MONTH_SHORT_MAR);
|
||||
gfx_draw_string_centred(dpi, 2222, x, y - 10, 0, gCommonFormatArgs);
|
||||
|
||||
// Draw month mark
|
||||
gfx_fill_rect(dpi, x, y, x, y + 3, 10);
|
||||
|
||||
@@ -87,7 +87,7 @@ static int screenshot_get_next_path(char *path, int format)
|
||||
|
||||
int i;
|
||||
for (i = 1; i < 1000; i++) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = i;
|
||||
set_format_arg(0, uint16, i);
|
||||
|
||||
// Glue together path and filename
|
||||
sprintf(path, "%sSCR%d%s", screenshotPath, i, _screenshot_format_extension[format]);
|
||||
@@ -249,7 +249,7 @@ void screenshot_giant()
|
||||
// Show user that screenshot saved successfully
|
||||
rct_string_id stringId = 3165;
|
||||
strcpy((char*)language_get_string(stringId), path_get_filename(path));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId;
|
||||
set_format_arg(0, uint16, stringId);
|
||||
window_error_open(STR_SCREENSHOT_SAVED_AS, -1);
|
||||
}
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ static void widget_text_unknown(rct_drawpixelinfo *dpi, rct_window *w, int widge
|
||||
gfx_draw_string_left_clipped(
|
||||
dpi,
|
||||
stringId,
|
||||
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
|
||||
gCommonFormatArgs,
|
||||
colour,
|
||||
l + 1,
|
||||
t,
|
||||
@@ -416,7 +416,7 @@ static void widget_text_unknown(rct_drawpixelinfo *dpi, rct_window *w, int widge
|
||||
gfx_draw_string_centred_clipped(
|
||||
dpi,
|
||||
stringId,
|
||||
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
|
||||
gCommonFormatArgs,
|
||||
colour,
|
||||
(w->x + w->x + widget->left + widget->right + 1) / 2 - 1,
|
||||
t,
|
||||
@@ -448,7 +448,7 @@ static void widget_text(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex)
|
||||
|
||||
if (widget_is_disabled(w, widgetIndex))
|
||||
colour |= 0x40;
|
||||
gfx_draw_string_left_clipped(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l + 1, t, r - l);
|
||||
gfx_draw_string_left_clipped(dpi, widget->image, gCommonFormatArgs, colour, l + 1, t, r - l);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -523,7 +523,7 @@ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
|
||||
uint8 colour = w->colours[widget->colour] & 0x7F;
|
||||
if (widget_is_disabled(w, widgetIndex))
|
||||
colour |= 0x40;
|
||||
gfx_draw_string_left(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l, t);
|
||||
gfx_draw_string_left(dpi, widget->image, gCommonFormatArgs, colour, l, t);
|
||||
textRight = l + gfx_get_string_width((char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER) + 1;
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge
|
||||
width -= 10;
|
||||
}
|
||||
l += width / 2;
|
||||
gfx_draw_string_centred_clipped(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 34, l, t, width);
|
||||
gfx_draw_string_centred_clipped(dpi, widget->image, gCommonFormatArgs, 34, l, t, width);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -662,7 +662,7 @@ static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
|
||||
if (widget_is_disabled(w, widgetIndex))
|
||||
colour |= 0x40;
|
||||
|
||||
gfx_draw_string_centred_clipped(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l, t, widget->right - widget->left - 2);
|
||||
gfx_draw_string_centred_clipped(dpi, widget->image, gCommonFormatArgs, colour, l, t, widget->right - widget->left - 2);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -702,7 +702,7 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
|
||||
colour |= 0x40;
|
||||
}
|
||||
|
||||
gfx_draw_string_left_centred(dpi, (rct_string_id)widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l + 14, yMid);
|
||||
gfx_draw_string_left_centred(dpi, (rct_string_id)widget->image, gCommonFormatArgs, colour, l + 14, yMid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user