diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 1eff477072..8dbb33341d 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -4273,7 +4273,14 @@ STR_5961 :{WINDOW_COLOUR_2}Entry index: {BLACK}{COMMA16} STR_5962 :{WINDOW_COLOUR_2}Collission detection: STR_5963 :{WINDOW_COLOUR_2}Raised Corners: STR_5964 :{WINDOW_COLOUR_2}Diagonal -STR_5965 :{WINDOW_COLOUR_2}Entrance type: {STRINGID} +STR_5965 :{WINDOW_COLOUR_2}Entrance type: {BLACK}{STRINGID} +STR_5966 :{WINDOW_COLOUR_2}Park entrance part: {BLACK}{STRINGID} +STR_5967 :Middle +STR_5968 :Left +STR_5969 :Right +STR_5970 :{WINDOW_COLOUR_2}Entrance ID: {BLACK}{COMMA16} +STR_5971 :{WINDOW_COLOUR_2}Exit ID: {BLACK}{COMMA16} +STR_5972 :{WINDOW_COLOUR_2}Ride ID: {BLACK}{COMMA16} ############# # Scenarios # diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index 927ef3e096..9f89986556 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -3614,6 +3614,13 @@ enum { STR_TILE_INSPECTOR_SURFACE_CORNERS = 5963, STR_TILE_INSPECTOR_SURFACE_DIAGONAL = 5964, STR_TILE_INSPECTOR_ENTRANCE_TYPE = 5965, + STR_TILE_INSPECTOR_ENTRANCE_PART = 5966, + STR_TILE_INSPECTOR_ENTRANCE_MIDDLE = 5967, + STR_TILE_INSPECTOR_ENTRANCE_LEFT = 5968, + STR_TILE_INSPECTOR_ENTRANCE_RIGHT = 5969, + STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID = 5970, + STR_TILE_INSPECTOR_ENTRANCE_EXIT_ID = 5971, + STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID = 5972, // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working STR_COUNT = 32768 diff --git a/src/windows/tile_inspector.c b/src/windows/tile_inspector.c index a13c75ada0..ec712f3123 100644 --- a/src/windows/tile_inspector.c +++ b/src/windows/tile_inspector.c @@ -59,6 +59,12 @@ static const rct_string_id entranceTypeStringIds[] = { STR_TILE_INSPECTOR_ENTRANCE_TYPE_PARK_ENTRANC, }; +static const rct_string_id parkEntrancePartStringIds[] = { + STR_TILE_INSPECTOR_ENTRANCE_MIDDLE, + STR_TILE_INSPECTOR_ENTRANCE_LEFT, + STR_TILE_INSPECTOR_ENTRANCE_RIGHT +}; + enum WINDOW_TILE_INSPECTOR_PAGES { PAGE_DEFAULT, PAGE_SURFACE, @@ -313,7 +319,7 @@ static rct_widget windowTileInspectorWidgetsScenery[] = { #define ENT_GBPB PADDING_BOTTOM // Entrance group box properties bottom #define ENT_GBPT (ENT_GBPB + 16 + 1 * 21) // Entrance group box properties top #define ENT_GBDB (ENT_GBPT + GROUPBOX_PADDING) // Entrance group box info bottom -#define ENT_GBDT (ENT_GBDB + 20 + 1 * 11) // Entrance group box info top +#define ENT_GBDT (ENT_GBDB + 20 + 3 * 11) // Entrance group box info top static rct_widget windowTileInspectorWidgetsEntrance[] = { MAIN_TILE_INSPECTOR_WIDGETS, { WWT_SPINNER, 1, GBS(WH - ENT_GBPT, 1, 0), STR_NONE, STR_NONE }, // WIDX_ENTRANCE_SPINNER_HEIGHT @@ -1656,8 +1662,40 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) { } case PAGE_ENTRANCE: { + // Entrance type rct_string_id entranceType = entranceTypeStringIds[mapElement->properties.entrance.type]; gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_TYPE, &entranceType, 12, x, y); + + if (mapElement->properties.entrance.type == ENTRANCE_TYPE_PARK_ENTRANCE) { + // Park entrance ID + int middleX = windowTileInspectorTileX << 5; + int middleY = windowTileInspectorTileY << 5; + // TODO: Make this work with Left/Right park entrance parts + sint16 parkEntranceIndex = park_get_entrance_index(middleX, middleY, mapElement->base_height * 8); + gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, &parkEntranceIndex, 12, x, y + 11); + } + else { + sint16 rideEntranceIndex = (mapElement->properties.entrance.index & 0x30) >> 4; + if (mapElement->properties.entrance.type == ENTRANCE_TYPE_RIDE_ENTRANCE) { + // Ride entrance ID + gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, &rideEntranceIndex, 12, x, y + 11); + } + else { + // Ride exit ID + gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_EXIT_ID, &rideEntranceIndex, 12, x, y + 11); + } + } + + if (mapElement->properties.entrance.type == ENTRANCE_TYPE_PARK_ENTRANCE) { + // Entrance part + rct_string_id entrancePart = parkEntrancePartStringIds[mapElement->properties.entrance.index & 0x0F]; + gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_PART, &entrancePart, 12, x, y + 22); + } + else { + // Ride ID + sint16 rideId = mapElement->properties.entrance.ride_index; + gfx_draw_string_left(dpi, STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID, &rideId, 12, x, y + 22); + } } case PAGE_FENCE: {