From 245f289fd8e9de10e6264df670c9c765356593dd Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Wed, 27 Jul 2016 00:31:02 +0200 Subject: [PATCH] Identify raw string ids --- src/interface/screenshot.c | 2 +- src/localisation/string_ids.h | 4 ++-- src/ride/track.c | 8 +++----- src/title.c | 2 +- src/windows/custom_currency.c | 2 +- src/windows/install_track.c | 2 +- src/windows/ride.c | 4 ++-- src/windows/water.c | 2 +- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/interface/screenshot.c b/src/interface/screenshot.c index bb19cca5fd..653054ed7a 100644 --- a/src/interface/screenshot.c +++ b/src/interface/screenshot.c @@ -226,7 +226,7 @@ void screenshot_giant() int index; if ((index = screenshot_get_next_path(path)) == -1) { log_error("Giant screenshot failed, unable to find a suitable destination path."); - window_error_open(STR_SCREENSHOT_FAILED, -1); + window_error_open(STR_SCREENSHOT_FAILED, STR_NONE); return; } diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index 96304fd04f..387bcc7a76 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -389,7 +389,7 @@ enum { STR_QUIT_GAME_PROMPT_TITLE = 951, STR_QUIT_GAME_2_PROMPT_TITLE = 952, STR_LOAD_LANDSCAPE_PROMPT_TITLE = 953, -// STR_0954 : + STR_CONSTRUCTION_ERR_UNKNOWN = 954, STR_RIDE_CONSTRUCTION_SELECT_SEAT_ROTATION_ANGLE_TIP = 955, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_180 = 956, STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_135 = 957, @@ -3122,7 +3122,7 @@ enum { STR_EDIT_TITLE_SEQUENCES_BUTTON = 5436, STR_TITLE_COMMAND_EDITOR_NO_SAVE_SELECTED = 5437, STR_TITLE_EDITOR_ERR_CANT_CHANGE_WHILE_EDITOR_IS_OPEN = 5438, -// STR_5439 :A wait command with at least 4 seconds is required with a restart command + STR_TITLE_EDITOR_ERR_RESTART_REQUIRES_WAIT = 5439, STR_MINIMISE_FULLSCREEN_ON_FOCUS_LOSS = 5440, STR_SELECT_BY_TRACK_TYPE_TIP = 5441, STR_FORCE_PARK_RATING = 5442, diff --git a/src/ride/track.c b/src/ride/track.c index 7971555e43..b9783cd5ea 100644 --- a/src/ride/track.c +++ b/src/ride/track.c @@ -1027,12 +1027,12 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in TrackFlags; if (trackFlags[type] & TRACK_ELEM_FLAG_0100) { if ((originZ & 0x0F) != 8) { - gGameCommandErrorText = 954; + gGameCommandErrorText = STR_CONSTRUCTION_ERR_UNKNOWN; return MONEY32_UNDEFINED; } } else { if ((originZ & 0x0F) != 0) { - gGameCommandErrorText = 954; + gGameCommandErrorText = STR_CONSTRUCTION_ERR_UNKNOWN; return MONEY32_UNDEFINED; } } @@ -1777,9 +1777,7 @@ static money32 set_maze_track(uint16 x, uint8 flags, uint8 direction, uint16 y, } if ((z & 0xF) != 0) { - // ‘Can't construct this here…’ - // TODO: This string is empty - gGameCommandErrorText = 954; + gGameCommandErrorText = STR_CONSTRUCTION_ERR_UNKNOWN; return MONEY32_UNDEFINED; } diff --git a/src/title.c b/src/title.c index 8e813af596..effda0c0a7 100644 --- a/src/title.c +++ b/src/title.c @@ -788,7 +788,7 @@ bool title_refresh_sequence() return true; } log_error("Failed to load title sequence, hasLoad: %i, hasWait4seconds: %i, hasRestart: %i, hasInvalidSave: %i", hasLoad, hasWait, hasRestart, hasInvalidSave); - window_error_open(STR_ERR_FAILED_TO_LOAD_TITLE_SEQUENCE, (!hasWait && hasRestart) ? 5439 : STR_NONE); + window_error_open(STR_ERR_FAILED_TO_LOAD_TITLE_SEQUENCE, (!hasWait && hasRestart) ? STR_TITLE_EDITOR_ERR_RESTART_REQUIRES_WAIT : STR_NONE); _scriptNoLoadsSinceRestart = 1; if (_loadedScript != _magicMountainScript) SafeFree(_loadedScript); diff --git a/src/windows/custom_currency.c b/src/windows/custom_currency.c index 1d1029c6f2..cdafbd4587 100644 --- a/src/windows/custom_currency.c +++ b/src/windows/custom_currency.c @@ -198,7 +198,7 @@ static void custom_currency_window_mouseup(rct_window *w, int widgetIndex) WIDX_RATE, STR_RATE_INPUT_TITLE, STR_RATE_INPUT_DESC, - 5182, + STR_FORMAT_INTEGER, (uint32)CurrencyDescriptors[CURRENCY_CUSTOM].rate, CURRENCY_RATE_MAX_NUM_DIGITS ); diff --git a/src/windows/install_track.c b/src/windows/install_track.c index 3838bc4583..bea4056d61 100644 --- a/src/windows/install_track.c +++ b/src/windows/install_track.c @@ -289,7 +289,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) } // Ride length - set_format_arg(0, uint16, 1345); + set_format_arg(0, rct_string_id, STR_RIDE_LENGTH_ENTRY); set_format_arg(2, uint16, td6->ride_length); gfx_draw_string_left_clipped(dpi, STR_TRACK_LIST_RIDE_LENGTH, gCommonFormatArgs, 0, x, y, 214); y += 10; diff --git a/src/windows/ride.c b/src/windows/ride.c index a1044d7271..508f1f38bb 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -2610,9 +2610,9 @@ static rct_string_id window_ride_get_status_station(rct_window *w, void *argumen RCT2_GLOBAL((uintptr_t)arguments + 2, uint16) = queueLength; stringId = STR_QUEUE_EMPTY; if (queueLength == 1) - stringId++; // TODO: String calculation + stringId = STR_QUEUE_ONE_PERSON; else if (queueLength > 1) - stringId += 2;// TODO: String calculation + stringId = STR_QUEUE_PEOPLE; } RCT2_GLOBAL((uintptr_t)arguments + 0, rct_string_id) = stringId; diff --git a/src/windows/water.c b/src/windows/water.c index 7d57c99915..4a7b345420 100644 --- a/src/windows/water.c +++ b/src/windows/water.c @@ -179,7 +179,7 @@ static void window_water_inputsize(rct_window *w) { TextInputDescriptionArgs[0] = MINIMUM_TOOL_SIZE; TextInputDescriptionArgs[1] = MAXIMUM_TOOL_SIZE; - window_text_input_open(w, WIDX_PREVIEW, 5128, 5129, STR_NONE, STR_NONE, 3); + window_text_input_open(w, WIDX_PREVIEW, STR_SELECTION_SIZE, STR_ENTER_SELECTION_SIZE, STR_NONE, STR_NONE, 3); } /**