diff --git a/resources/g2/59.png b/resources/g2/59.png new file mode 100644 index 0000000000..df84145706 Binary files /dev/null and b/resources/g2/59.png differ diff --git a/src/sprites.h b/src/sprites.h index 95194a2a70..3d75810080 100644 --- a/src/sprites.h +++ b/src/sprites.h @@ -392,6 +392,7 @@ enum { SPR_G2_SANDBOX = SPR_G2_BEGIN + 33, SPR_G2_TAB_NEWS = SPR_G2_BEGIN + 58, + SPR_G2_LOCKED = SPR_G2_BEGIN + 59, }; #endif diff --git a/src/windows/server_list.c b/src/windows/server_list.c index 1aef7d1af6..75b50e7634 100644 --- a/src/windows/server_list.c +++ b/src/windows/server_list.c @@ -410,13 +410,38 @@ static void window_server_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi } //gfx_draw_string(dpi, serverDetails->description, w->colours[1], 3, y + 14); + + int right = width - 3 - 14; + + // Draw compatibility icon + right -= 10; + int compatibilitySpriteId; + if (str_is_null_or_empty(serverDetails->version)) { + // Server not online... + compatibilitySpriteId = SPR_G2_RCT1_CLOSE_BUTTON_0; + } else { + // Server online... check version + bool correctVersion = strcmp(serverDetails->version, OPENRCT2_VERSION) == 0; + compatibilitySpriteId = correctVersion ? SPR_G2_RCT1_OPEN_BUTTON_2 : SPR_G2_RCT1_CLOSE_BUTTON_2; + } + gfx_draw_sprite(dpi, compatibilitySpriteId, right, y + 1, 0); + right -= 4; + + // Draw lock icon + right -= 8; + if (serverDetails->requiresPassword) { + gfx_draw_sprite(dpi, SPR_G2_LOCKED, right, y + 4, 0); + } + right -= 6; + // Draw number of players char players[32]; players[0] = 0; if (serverDetails->maxplayers > 0) { sprintf(players, "%d/%d", serverDetails->players, serverDetails->maxplayers); } - gfx_draw_string(dpi, players, w->colours[1], width - 3 - 14 - gfx_get_string_width(players), y + 3); + int numPlayersStringWidth = gfx_get_string_width(players); + gfx_draw_string(dpi, players, w->colours[1], right - numPlayersStringWidth, y + 3); y += ITEM_HEIGHT; }