Name `gfx_fill_rect_inset` flags

This commit is contained in:
Marijn van der Werf 2016-11-10 18:54:33 +01:00 committed by Ted John
parent 3da10b7d7d
commit 80ea7f7de5
21 changed files with 86 additions and 80 deletions

View File

@ -87,6 +87,15 @@ enum {
// REMAP_2_PLUS = REMAP 3
};
enum {
INSET_RECT_FLAG_FILL_GREY = (1 << 2), // 0x04
INSET_RECT_FLAG_BORDER_NONE = (1 << 3), // 0x08
INSET_RECT_FLAG_FILL_NONE = (1 << 4), // 0x10
INSET_RECT_FLAG_BORDER_INSET = (1 << 5), // 0x20
INSET_RECT_FLAG_FILL_DONT_LIGHTEN = (1 << 6), // 0x40
INSET_RECT_FLAG_FILL_MID_LIGHT = (1 << 7), // 0x80
};
typedef struct rct_g1_header {
uint32 num_entries;
uint32 total_size;
@ -122,6 +131,10 @@ typedef struct rct_palette {
#define PALETTE_TO_G1_OFFSET_COUNT 144
#define INSET_RECT_F_30 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_NONE)
#define INSET_RECT_F_60 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN)
#define INSET_RECT_F_E0 (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_DONT_LIGHTEN | INSET_RECT_FLAG_FILL_MID_LIGHT)
#define MAX_SCROLLING_TEXT_MODES 38
extern sint16 gCurrentFontSpriteBase;
@ -179,7 +192,7 @@ void gfx_draw_line_software(rct_drawpixelinfo *dpi, int x1, int y1, int x2, int
// rect
void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bottom, int colour);
void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short right, short bottom, int colour, short _si);
void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short right, short bottom, int colour, uint8 flags);
// sprite
bool gfx_load_g1();

View File

@ -31,17 +31,10 @@
* colour (ebp)
* flags (si)
*/
void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short right, short bottom, int colour, short flags)
void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short right, short bottom, int colour, uint8 flags)
{
uint8 shadow, fill, hilight;
// Flags
int no_border, no_fill, pressed;
no_border = 8;
no_fill = 0x10;
pressed = 0x20;
if (colour & 0x180) {
if (colour & 0x100) {
colour = NOT_TRANSLUCENT(colour);
@ -51,16 +44,16 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri
colour = colour | 0x2000000; //Transparent
if (flags & no_border) {
if (flags & INSET_RECT_FLAG_BORDER_NONE) {
gfx_fill_rect(dpi, left, top, right, bottom, colour);
} else if (flags & pressed) {
} else if (flags & INSET_RECT_FLAG_BORDER_INSET) {
// Draw outline of box
gfx_fill_rect(dpi, left, top, left, bottom, colour + 1);
gfx_fill_rect(dpi, left, top, right, top, colour + 1);
gfx_fill_rect(dpi, right, top, right, bottom, colour + 2);
gfx_fill_rect(dpi, left, bottom, right, bottom, colour + 2);
if (!(flags & no_fill)) {
if (!(flags & INSET_RECT_FLAG_FILL_NONE)) {
gfx_fill_rect(dpi, left+1, top+1, right-1, bottom-1, colour);
}
} else {
@ -70,12 +63,12 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri
gfx_fill_rect(dpi, right, top, right, bottom, colour + 1);
gfx_fill_rect(dpi, left, bottom, right, bottom, colour + 1);
if (!(flags & no_fill)) {
if (!(flags & INSET_RECT_FLAG_FILL_NONE)) {
gfx_fill_rect(dpi, left+1, top+1, right-1, bottom-1, colour);
}
}
} else {
if (flags & 0x80) {
if (flags & INSET_RECT_FLAG_FILL_MID_LIGHT) {
shadow = ColourMapA[colour].dark;
fill = ColourMapA[colour].mid_light;
hilight = ColourMapA[colour].lighter;
@ -85,18 +78,18 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri
hilight = ColourMapA[colour].lighter;
}
if (flags & no_border) {
if (flags & INSET_RECT_FLAG_BORDER_NONE) {
gfx_fill_rect(dpi, left, top, right, bottom, fill);
} else if (flags & pressed) {
} else if (flags & INSET_RECT_FLAG_BORDER_INSET) {
// Draw outline of box
gfx_fill_rect(dpi, left, top, left, bottom, shadow);
gfx_fill_rect(dpi, left + 1, top, right, top, shadow);
gfx_fill_rect(dpi, right, top + 1, right, bottom - 1, hilight);
gfx_fill_rect(dpi, left + 1, bottom, right, bottom, hilight);
if (!(flags & no_fill)) {
if (!(flags & 0x40)) {
if (flags & 0x04) {
if (!(flags & INSET_RECT_FLAG_FILL_NONE)) {
if (!(flags & INSET_RECT_FLAG_FILL_DONT_LIGHTEN)) {
if (flags & INSET_RECT_FLAG_FILL_GREY) {
fill = ColourMapA[COLOUR_BLACK].light;
} else {
fill = ColourMapA[colour].lighter;
@ -111,8 +104,8 @@ void gfx_fill_rect_inset(rct_drawpixelinfo* dpi, short left, short top, short ri
gfx_fill_rect(dpi, right, top, right, bottom - 1, shadow);
gfx_fill_rect(dpi, left, bottom, right, bottom, shadow);
if (!(flags & no_fill)) {
if (flags & 0x04) {
if (!(flags & INSET_RECT_FLAG_FILL_NONE)) {
if (flags & INSET_RECT_FLAG_FILL_GREY) {
fill = ColourMapA[COLOUR_BLACK].light;
}
gfx_fill_rect(dpi, left+1, top+1, right-1, bottom-1, fill);

View File

@ -119,9 +119,9 @@ void chat_draw(rct_drawpixelinfo * dpi)
gfx_set_dirty_blocks(_chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5); //Background area + Textbox
gfx_fill_rect(dpi, _chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5, 0x2000000 | 51); //Opaque gray background
gfx_fill_rect_inset(dpi, _chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5, chatBackgroundColor, 0x10);
gfx_fill_rect_inset(dpi, _chatLeft + 1, _chatTop - 4, _chatRight - 1, _chatBottom - inputLineHeight - 6, chatBackgroundColor, 0x20);
gfx_fill_rect_inset(dpi, _chatLeft + 1, _chatBottom - inputLineHeight - 5, _chatRight - 1, _chatBottom + 4, chatBackgroundColor, 0x20); //Textbox
gfx_fill_rect_inset(dpi, _chatLeft, _chatTop - 5, _chatRight, _chatBottom + 5, chatBackgroundColor, INSET_RECT_FLAG_FILL_NONE);
gfx_fill_rect_inset(dpi, _chatLeft + 1, _chatTop - 4, _chatRight - 1, _chatBottom - inputLineHeight - 6, chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET);
gfx_fill_rect_inset(dpi, _chatLeft + 1, _chatBottom - inputLineHeight - 5, _chatRight - 1, _chatBottom + 4, chatBackgroundColor, INSET_RECT_FLAG_BORDER_INSET); //Textbox
}
int x = _chatLeft + 5;

View File

@ -665,7 +665,7 @@ void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, int left, i
#ifdef DEBUG_SHOW_DIRTY_BOX
if (viewport != g_viewport_list){
gfx_fill_rect_inset(dpi, l, t, r-1, b-1, 0x2, 0x30);
gfx_fill_rect_inset(dpi, l, t, r-1, b-1, 0x2, INSET_RECT_F_30);
return;
}
#endif

View File

@ -194,7 +194,7 @@ static void widget_frame_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetI
int b = w->y + widget->bottom;
//
int press = (w->flags & WF_10 ? 0x80 : 0);
uint8 press = (w->flags & WF_10 ? INSET_RECT_FLAG_FILL_MID_LIGHT : 0);
// Get the colour
uint8 colour = w->colours[widget->colour];
@ -263,14 +263,14 @@ static void widget_button_draw(rct_drawpixelinfo *dpi, rct_window *w, int widget
int b = w->y + widget->bottom;
// Check if the button is pressed down
int press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? 0x20 : 0;
uint8 press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0;
// Get the colour
uint8 colour = w->colours[widget->colour];
if (widget->image == -2) {
// Draw border with no fill
gfx_fill_rect_inset(dpi, l, t, r, b, colour, press | 0x10);
gfx_fill_rect_inset(dpi, l, t, r, b, colour, press | INSET_RECT_FLAG_FILL_NONE);
return;
}
@ -346,12 +346,12 @@ static void widget_flat_button_draw(rct_drawpixelinfo *dpi, rct_window *w, int w
if (widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex)) {
if (widget->image == -2) {
// Draw border with no fill
gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0x20 | 0x10);
gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_NONE);
return;
}
// Draw the border with fill
gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0x20);
gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_FLAG_BORDER_INSET);
}
// Draw image
@ -377,7 +377,7 @@ static void widget_text_button(rct_drawpixelinfo *dpi, rct_window *w, int widget
uint8 colour = w->colours[widget->colour];
// Border
int press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? 0x20 : 0;
uint8 press = widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex) ? INSET_RECT_FLAG_BORDER_INSET : 0;
gfx_fill_rect_inset(dpi, l, t, r, b, colour, press);
// Text
@ -482,7 +482,7 @@ static void widget_text_inset(rct_drawpixelinfo *dpi, rct_window *w, int widgetI
// Get the colour
uint8 colour = w->colours[widget->colour];
gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0x60);
gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_F_60);
widget_text(dpi, w, widgetIndex);
}
@ -506,7 +506,7 @@ static void widget_text_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIn
int press = 0;
if (widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex))
press |= 0x20;
press |= INSET_RECT_FLAG_BORDER_INSET;
gfx_fill_rect_inset(dpi, l, t, r, b, colour, press);
@ -589,9 +589,9 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge
// Get the colour
uint8 colour = w->colours[widget->colour];
int press = 0x60;
uint8 press = INSET_RECT_F_60;
if (w->flags & WF_10)
press |= 0x80;
press |= INSET_RECT_FLAG_FILL_MID_LIGHT;
gfx_fill_rect_inset(dpi, l, t, r, b, colour, press);
@ -633,11 +633,11 @@ static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
int b = w->y + widget->bottom;
// Check if the button is pressed down
int press = 0;
uint8 press = 0;
if (w->flags & WF_10)
press |= 0x80;
press |= INSET_RECT_FLAG_FILL_MID_LIGHT;
if (widget_is_pressed(w, widgetIndex) || widget_is_active_tool(w, widgetIndex))
press |= 0x20;
press |= INSET_RECT_FLAG_BORDER_INSET;
// Get the colour
uint8 colour = w->colours[widget->colour];
@ -677,7 +677,7 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
if (widget->type != WWT_24) {
// checkbox
gfx_fill_rect_inset(dpi, l, yMid - 5, l + 9, yMid + 4, colour, 0x60);
gfx_fill_rect_inset(dpi, l, yMid - 5, l + 9, yMid + 4, colour, INSET_RECT_F_60);
// fill it when checkbox is pressed
if (widget_is_pressed(w, widgetIndex)) {
@ -718,7 +718,7 @@ static void widget_scroll_draw(rct_drawpixelinfo *dpi, rct_window *w, int widget
uint8 colour = w->colours[widget->colour];
// Draw the border
gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0x60);
gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_F_60);
// Inflate by -1
l++;
@ -780,17 +780,17 @@ static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i
gfx_fill_rect(dpi, l + 10, t + 8, r - 10, t + 8, ColourMapA[colour].lighter);
// Left button
gfx_fill_rect_inset(dpi, l, t, l + 9, b, colour, (scroll->flags & HSCROLLBAR_LEFT_PRESSED ? 0x20 : 0));
gfx_fill_rect_inset(dpi, l, t, l + 9, b, colour, (scroll->flags & HSCROLLBAR_LEFT_PRESSED ? INSET_RECT_FLAG_BORDER_INSET : 0));
gfx_draw_string(dpi, (char*)BlackLeftArrowString, 0, l + 1, t);
// Thumb
gfx_fill_rect_inset(dpi,
max(l + 10, l + scroll->h_thumb_left - 1), t,
min(r - 10, l + scroll->h_thumb_right - 1), b,
colour, (scroll->flags & HSCROLLBAR_THUMB_PRESSED ? 0x20 : 0));
colour, (scroll->flags & HSCROLLBAR_THUMB_PRESSED ? INSET_RECT_FLAG_BORDER_INSET : 0));
// Right button
gfx_fill_rect_inset(dpi, r - 9, t, r, b, colour, (scroll->flags & HSCROLLBAR_RIGHT_PRESSED ? 0x20 : 0));
gfx_fill_rect_inset(dpi, r - 9, t, r, b, colour, (scroll->flags & HSCROLLBAR_RIGHT_PRESSED ? INSET_RECT_FLAG_BORDER_INSET : 0));
gfx_draw_string(dpi, (char*)BlackRightArrowString, 0, r - 6, t);
}
@ -806,17 +806,17 @@ static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i
gfx_fill_rect(dpi, l + 8, t + 10, l + 8, b - 10, ColourMapA[colour].lighter);
// Up button
gfx_fill_rect_inset(dpi, l, t, r, t + 9, colour, (scroll->flags & VSCROLLBAR_UP_PRESSED ? 0x20 : 0));
gfx_fill_rect_inset(dpi, l, t, r, t + 9, colour, (scroll->flags & VSCROLLBAR_UP_PRESSED ? INSET_RECT_FLAG_BORDER_INSET : 0));
gfx_draw_string(dpi, (char*)BlackUpArrowString, 0, l + 1, t - 1);
// Thumb
gfx_fill_rect_inset(dpi,
l, max(t + 10, t + scroll->v_thumb_top - 1),
r, min(b - 10, t + scroll->v_thumb_bottom - 1),
colour, (scroll->flags & VSCROLLBAR_THUMB_PRESSED ? 0x20 : 0));
colour, (scroll->flags & VSCROLLBAR_THUMB_PRESSED ? INSET_RECT_FLAG_BORDER_INSET : 0));
// Down button
gfx_fill_rect_inset(dpi, l, b - 9, r, b, colour, (scroll->flags & VSCROLLBAR_DOWN_PRESSED ? 0x20 : 0));
gfx_fill_rect_inset(dpi, l, b - 9, r, b, colour, (scroll->flags & VSCROLLBAR_DOWN_PRESSED ? INSET_RECT_FLAG_BORDER_INSET : 0));
gfx_draw_string(dpi, (char*)BlackDownArrowString, 0, l + 1, b - 9);
}
@ -1072,7 +1072,7 @@ static void widget_text_box_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
widgetIndex == gCurrentTextBox.widget_index;
//gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0x20 | (!active ? 0x40 : 0x00));
gfx_fill_rect_inset(dpi, l, t, r, b, colour, 0x60);
gfx_fill_rect_inset(dpi, l, t, r, b, colour, INSET_RECT_F_60);
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
gCurrentFontFlags = 0;

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, 0x10);
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);
}
}

View File

@ -463,7 +463,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].top + 1 + w->y,
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].right - 1 + w->x,
window_editor_bottom_toolbar_widgets[WIDX_PREVIOUS_IMAGE].bottom - 1 + w->y,
w->colours[1], 0x30);
w->colours[1], INSET_RECT_F_30);
}
if ((drawPreviousButton || drawNextButton) && gS6Info.editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER) {
@ -472,7 +472,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + 1 + w->y,
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right - 1 + w->x,
window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].bottom - 1 + w->y,
w->colours[1], 0x30);
w->colours[1], INSET_RECT_F_30);
}
short stateX =

View File

@ -1410,7 +1410,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
if (y + 12 >= dpi->y && y <= dpi->y + dpi->height) {
// Draw checkbox
if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && !(*listItem->flags & 0x20))
gfx_fill_rect_inset(dpi, 2, y, 11, y + 10, w->colours[1], 0xE0);
gfx_fill_rect_inset(dpi, 2, y, 11, y + 10, w->colours[1], INSET_RECT_F_E0);
// Highlight background
colour = 142;

View File

@ -1205,7 +1205,7 @@ static void window_editor_objective_options_rides_scrollpaint(rct_window *w, rct
continue;
// Checkbox
gfx_fill_rect_inset(dpi, 2, y, 11, y + 10, w->colours[1], 224);
gfx_fill_rect_inset(dpi, 2, y, 11, y + 10, w->colours[1], INSET_RECT_F_E0);
// Highlighted
if (i == w->selected_list_item) {

View File

@ -742,7 +742,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi)
// Horizontal rule below expenditure / income table
gfx_fill_rect_inset(dpi, w->x + 8, w->y + 223, w->x + 8 + 513, w->y + 223 + 1, w->colours[1], 0x20);
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);
@ -843,7 +843,7 @@ static void window_finances_financial_graph_paint(rct_window *w, rct_drawpixelin
);
// Graph
gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], 0x30);
gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], INSET_RECT_F_30);
// Calculate the Y axis scale (log2 of highest [+/-]balance)
int yAxisScale = 0;
@ -949,7 +949,7 @@ static void window_finances_park_value_graph_paint(rct_window *w, rct_drawpixeli
);
// Graph
gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], 0x30);
gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], INSET_RECT_F_30);
// Calculate the Y axis scale (log2 of highest [+/-]balance)
int yAxisScale = 0;
@ -1055,7 +1055,7 @@ static void window_finances_profit_graph_paint(rct_window *w, rct_drawpixelinfo
);
// Graph
gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], 0x30);
gfx_fill_rect_inset(dpi, graphLeft, graphTop, graphRight, graphBottom, w->colours[1], INSET_RECT_F_30);
// Calculate the Y axis scale (log2 of highest [+/-]balance)
int yAxisScale = 0;

View File

@ -371,7 +371,7 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r
w->x + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].right - 1,
w->y + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].bottom - 1,
w->colours[1],
48
INSET_RECT_F_30
);
x = (window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].left + window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].right) / 2 + w->x;
@ -426,7 +426,7 @@ static void window_game_bottom_toolbar_draw_park_rating(rct_drawpixelinfo *dpi,
short bar_width;
bar_width = (factor * (90 + WIDTH_MOD)) / 256;
gfx_fill_rect_inset(dpi, x, y + 1, x + (93 + WIDTH_MOD), y + 9, w->colours[1], 48);
gfx_fill_rect_inset(dpi, x, y + 1, x + (93 + WIDTH_MOD), y + 9, w->colours[1], INSET_RECT_F_30);
if (!(colour & 0x80000000) || game_is_paused() || (gCurrentTicks & 8)) {
if (bar_width > 2)
gfx_fill_rect_inset(dpi, x + 2, y + 2, x + bar_width - 1, y + 8, colour & 0x7FFFFFFF, 0);
@ -450,7 +450,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi,
w->x + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right - 1,
w->y + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].bottom - 1,
w->colours[1],
48
INSET_RECT_F_30
);
x = (window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].left + window_game_bottom_toolbar_widgets[WIDX_RIGHT_OUTSET].right) / 2 + w->x;
@ -521,7 +521,7 @@ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo *dpi, rc
w->x + middleOutsetWidget->right - 1,
w->y + middleOutsetWidget->bottom - 1,
w->colours[2],
48
INSET_RECT_F_30
);
// Text

View File

@ -1331,7 +1331,7 @@ static void window_guest_stats_bars_paint(int value, int x, int y, rct_window *w
value *= 0x76;
value >>= 8;
gfx_fill_rect_inset(dpi, x + 0x3A, y + 1, x + 0x3A + 0x79, y + 9, w->colours[1], 0x30);
gfx_fill_rect_inset(dpi, x + 0x3A, y + 1, x + 0x3A + 0x79, y + 9, w->colours[1], INSET_RECT_F_30);
int blink_flag = colour & (1u << 0x1F); //0x80000000
colour &= ~(1u << 0x1F);
@ -1475,7 +1475,7 @@ void window_guest_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
y += 19;
gfx_fill_rect_inset(dpi, x, y - 6, x + 179, y - 5, w->colours[1], 32);
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);
@ -1810,7 +1810,7 @@ void window_guest_finance_paint(rct_window *w, rct_drawpixelinfo *dpi)
gfx_draw_string_left(dpi, STR_GUEST_STAT_CASH_SPENT, gCommonFormatArgs, 0, x, y);
y += 20;
gfx_fill_rect_inset(dpi, x, y - 6, x + 179, y - 5, w->colours[1], 32);
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);

View File

@ -843,7 +843,7 @@ static void window_multiplayer_groups_paint(rct_window *w, rct_drawpixelinfo *dp
y += 20;
gfx_fill_rect_inset(dpi, x, y - 6, x + 310, y - 5, w->colours[1], 32);
gfx_fill_rect_inset(dpi, x, y - 6, x + 310, y - 5, w->colours[1], INSET_RECT_FLAG_BORDER_INSET);
widget = &window_multiplayer_groups_widgets[WIDX_SELECTED_GROUP];
group = network_get_group_index(_selectedGroup);

View File

@ -201,7 +201,7 @@ static void window_music_credits_scrollpaint(rct_window *w, rct_drawpixelinfo *d
// Draw the separator
y += 5;
gfx_fill_rect_inset(dpi, 4, y, 484, y+1, w->colours[1], 0x20);
gfx_fill_rect_inset(dpi, 4, y, 484, y+1, w->colours[1], INSET_RECT_FLAG_BORDER_INSET);
y += 11;
for (int i = 0; i < countof(music_credits_rct2); i++) {

View File

@ -790,9 +790,9 @@ static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, i
// Draw flat button rectangle
int flags = 0;
if (w->new_ride.selected_ride_id == *((sint16*)listItem))
flags |= 0x20;
flags |= INSET_RECT_FLAG_BORDER_INSET;
if (w->new_ride.highlighted_ride_id == *((sint16*)listItem) || flags != 0)
gfx_fill_rect_inset(dpi, x, y, x + 115, y + 115, w->colours[1], 0x80 | flags);
gfx_fill_rect_inset(dpi, x, y, x + 115, y + 115, w->colours[1], INSET_RECT_FLAG_FILL_MID_LIGHT | flags);
// Draw ride image with feathered border
rideEntry = get_ride_entry(listItem->entry_index);

View File

@ -287,7 +287,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s
}
// Background
gfx_fill_rect_inset(dpi, -1, y, 383, y + 41, w->colours[1], 0x24);
gfx_fill_rect_inset(dpi, -1, y, 383, y + 41, w->colours[1], (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_GREY));
// Date text
set_format_arg(0, rct_string_id, DateDayNames[newsItem->day - 1]);
@ -312,7 +312,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s
const uint8 idx = 11 + w->news.var_480;
news_item_is_valid_idx(idx);
if (i == idx && w->news.var_482 == 1)
press = 0x20;
press = INSET_RECT_FLAG_BORDER_INSET;
}
gfx_fill_rect_inset(dpi, x, yy, x + 23, yy + 23, w->colours[2], press);

View File

@ -1275,7 +1275,7 @@ static void window_park_rating_paint(rct_window *w, rct_drawpixelinfo *dpi)
gfx_draw_string_left(dpi, STR_PARK_RATING_LABEL, &gParkRating, 0, 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], 0x30);
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);
// Graph
x += widget->left + 22;
@ -1392,7 +1392,7 @@ static void window_park_guests_paint(rct_window *w, rct_drawpixelinfo *dpi)
gfx_draw_string_left(dpi, STR_GUESTS_IN_PARK_LABEL, &gNumGuestsInPark, 0, 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], 0x30);
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);
// Graph
x += widget->left + 22;

View File

@ -3650,7 +3650,7 @@ static void window_ride_operating_paint(rct_window *w, rct_drawpixelinfo *dpi)
w->x + window_ride_operating_widgets[WIDX_PAGE_BACKGROUND].right - 5,
w->y + 104,
w->colours[1],
0x20
INSET_RECT_FLAG_BORDER_INSET
);
// Number of block sections
@ -3695,7 +3695,7 @@ static void window_ride_locate_mechanic(rct_window *w)
*/
static void window_ride_maintenance_draw_bar(rct_window *w, rct_drawpixelinfo *dpi, int x, int y, int value, int unk)
{
gfx_fill_rect_inset(dpi, x, y, x + 149, y + 8, w->colours[1], 0x30);
gfx_fill_rect_inset(dpi, x, y, x + 149, y + 8, w->colours[1], INSET_RECT_F_30);
if (unk & (1u << 31)) {
unk &= ~(1u << 31);
if (game_is_not_paused() && (gCurrentTicks & 8))
@ -5276,7 +5276,7 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi
x = w->x + 4;
y = w->y + window_ride_measurements_widgets[WIDX_SELECT_NEARBY_SCENERY].bottom + 17;
gfx_fill_rect_inset(dpi, x, y, w->x + 312, y + 1, w->colours[1], 0x20);
gfx_fill_rect_inset(dpi, x, y, w->x + 312, y + 1, w->colours[1], INSET_RECT_FLAG_BORDER_INSET);
} else {
ride = get_ride(w->number);
@ -5312,7 +5312,7 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi
y += 20;
// Horizontal rule
gfx_fill_rect_inset(dpi, x, y - 6, x + 303, y - 5, w->colours[1], 0x20);
gfx_fill_rect_inset(dpi, x, y - 6, x + 303, y - 5, w->colours[1], INSET_RECT_FLAG_BORDER_INSET);
if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_NO_RAW_STATS)) {
if (ride->type == RIDE_TYPE_MINI_GOLF) {

View File

@ -1103,16 +1103,16 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrol
{
if (w->scenery.selected_scenery_id == currentSceneryGlobalId) {
gfx_fill_rect_inset(dpi, left, top, left + SCENERY_BUTTON_WIDTH - 1,
top + SCENERY_BUTTON_HEIGHT - 1, w->colours[1], 0x80);
top + SCENERY_BUTTON_HEIGHT - 1, w->colours[1], INSET_RECT_FLAG_FILL_MID_LIGHT);
}
} else {
if (tabSelectedSceneryId == currentSceneryGlobalId) {
gfx_fill_rect_inset(dpi, left, top, left + SCENERY_BUTTON_WIDTH - 1,
top + SCENERY_BUTTON_HEIGHT - 1, w->colours[1], 0xA0);
top + SCENERY_BUTTON_HEIGHT - 1, w->colours[1], (INSET_RECT_FLAG_BORDER_INSET | INSET_RECT_FLAG_FILL_MID_LIGHT));
}
else if (w->scenery.selected_scenery_id == currentSceneryGlobalId) {
gfx_fill_rect_inset(dpi, left, top, left + SCENERY_BUTTON_WIDTH - 1,
top + SCENERY_BUTTON_HEIGHT - 1, w->colours[1], 0x80);
top + SCENERY_BUTTON_HEIGHT - 1, w->colours[1], INSET_RECT_FLAG_FILL_MID_LIGHT);
}
}

View File

@ -270,7 +270,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi)
// +13 for cursor when max length.
gfx_wrap_string(wrapped_string, WW - (24 + 13), &no_lines, &font_height);
gfx_fill_rect_inset(dpi, w->x + 10, y, w->x + WW - 10, y + 10 * (no_lines + 1) + 3, w->colours[1], 0x60);
gfx_fill_rect_inset(dpi, w->x + 10, y, w->x + WW - 10, y + 10 * (no_lines + 1) + 3, w->colours[1], INSET_RECT_F_60);
y += 1;

View File

@ -836,7 +836,7 @@ void window_themes_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scroll
}
gfx_draw_sprite(dpi, image, _button_offset_x + 12 * j, y + _button_offset_y, 0);
gfx_fill_rect_inset(dpi, _button_offset_x + 12 * j, y + _check_offset_y, _button_offset_x + 12 * j + 9, y + _check_offset_y + 10, w->colours[1], 0xE0);
gfx_fill_rect_inset(dpi, _button_offset_x + 12 * j, y + _check_offset_y, _button_offset_x + 12 * j + 9, y + _check_offset_y + 10, w->colours[1], INSET_RECT_F_E0);
if (colour & COLOUR_FLAG_TRANSLUCENT) {
gCurrentFontSpriteBase = -1;
gfx_draw_string(dpi, (char*)CheckBoxMarkString, w->colours[1] & 0x7F, _button_offset_x + 12 * j, y + _check_offset_y);