From b5c04a79e5698d08ec9f4b1d909583e8f0c53cfe Mon Sep 17 00:00:00 2001 From: osconnoisseur Date: Sun, 8 Nov 2015 22:35:13 -0600 Subject: [PATCH 01/13] Added buttons for "up" and "new file" and fixed #2233 --- src/windows/loadsave.c | 224 ++++++++++++++++++++--------------------- 1 file changed, 107 insertions(+), 117 deletions(-) diff --git a/src/windows/loadsave.c b/src/windows/loadsave.c index ca10ca179d..d9d9b5a3f4 100644 --- a/src/windows/loadsave.c +++ b/src/windows/loadsave.c @@ -43,6 +43,8 @@ enum { WIDX_BACKGROUND, WIDX_TITLE, WIDX_CLOSE, + WIDX_UP, + WIDX_NEW, WIDX_SORT_NAME, WIDX_SORT_DATE, WIDX_SCROLL, @@ -53,10 +55,12 @@ enum { static rct_widget window_loadsave_widgets[] = { { WWT_FRAME, 0, 0, WW - 1, 0, WH - 1, STR_NONE, STR_NONE }, { WWT_CAPTION, 0, 1, WW - 2, 1, 14, STR_NONE, STR_WINDOW_TITLE_TIP }, - { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, - { WWT_CLOSEBOX, 0, 4, (WW - 5) / 2, 36, 47, STR_NONE, STR_NONE }, - { WWT_CLOSEBOX, 0, (WW - 5) / 2 + 1, WW - 5 - 1, 36, 47, STR_NONE, STR_NONE }, - { WWT_SCROLL, 0, 4, WW - 5, 47, WH - 40, 2, STR_NONE }, + { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, //Window close button + { WWT_CLOSEBOX, 0, 4, 104, 36, 47, 2718, STR_NONE}, // Up + { WWT_CLOSEBOX, 0, 105, 205, 36, 47, 2719, STR_NONE}, // New + { WWT_CLOSEBOX, 0, 4, (WW - 5) / 2, 50, 61, STR_NONE, STR_NONE }, // Name + { WWT_CLOSEBOX, 0, (WW - 5) / 2 + 1, WW - 5 - 1, 50, 61, STR_NONE, STR_NONE }, // Date + { WWT_SCROLL, 0, 4, WW - 5, 61, WH - 40, 2, STR_NONE }, // File list { WWT_CLOSEBOX, 0, 4, 200, WH - 36, WH - 18, 2707, STR_NONE }, // Use native browser { WIDGETS_END } }; @@ -111,8 +115,6 @@ static rct_window_event_list window_loadsave_events = { #pragma endregion enum { - TYPE_UP, - TYPE_NEW_FILE, TYPE_DIRECTORY, TYPE_FILE, }; @@ -130,12 +132,13 @@ int _listItemsCount = 0; loadsave_list_item *_listItems = NULL; char _directory[MAX_PATH]; char _shortenedDirectory[MAX_PATH]; +static char _parentDirectory[MAX_PATH]; char _extension[32]; char _defaultName[MAX_PATH]; int _loadsaveType; int _type; -static void window_loadsave_populate_list(int includeNewItem, bool browsable, const char *directory, const char *extension); +static void window_loadsave_populate_list(rct_window *w, int includeNewItem, const char *directory, const char *extension); static void window_loadsave_select(rct_window *w, const char *path); static void window_loadsave_sort_list(int index, int endIndex); @@ -164,7 +167,7 @@ rct_window *window_loadsave_open(int type, char *defaultName) if (w == NULL) { w = window_create_centred(WW, WH, &window_loadsave_events, WC_LOADSAVE, WF_STICK_TO_FRONT); w->widgets = window_loadsave_widgets; - w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_SORT_NAME) | (1 << WIDX_SORT_DATE) | (1 << WIDX_BROWSE); + w->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_UP) | (1 << WIDX_NEW) | (1 << WIDX_SORT_NAME) | (1 << WIDX_SORT_DATE) | (1 << WIDX_BROWSE); w->colours[0] = 7; w->colours[1] = 7; w->colours[2] = 7; @@ -205,7 +208,7 @@ rct_window *window_loadsave_open(int type, char *defaultName) return NULL; } - window_loadsave_populate_list(includeNewItem, true, path, ".sv6"); + window_loadsave_populate_list(w, includeNewItem, path, ".sv6"); break; case LOADSAVETYPE_LANDSCAPE: platform_get_user_directory(path, "landscape"); @@ -215,7 +218,7 @@ rct_window *window_loadsave_open(int type, char *defaultName) return NULL; } - window_loadsave_populate_list(includeNewItem, true, path, ".sc6"); + window_loadsave_populate_list(w, includeNewItem, path, ".sc6"); break; case LOADSAVETYPE_SCENARIO: /* @@ -234,7 +237,7 @@ rct_window *window_loadsave_open(int type, char *defaultName) if (ch != NULL) *ch = 0; - window_loadsave_populate_list(includeNewItem, true, path, ".sc6"); + window_loadsave_populate_list(w, includeNewItem, path, ".sc6"); break; case LOADSAVETYPE_TRACK: /* @@ -253,7 +256,7 @@ rct_window *window_loadsave_open(int type, char *defaultName) if (ch != NULL) *ch = 0; - window_loadsave_populate_list(includeNewItem, true, path, ".td?"); + window_loadsave_populate_list(w, includeNewItem, path, ".td?"); break; } w->no_list_items = _listItemsCount; @@ -280,6 +283,27 @@ static void window_loadsave_mouseup(rct_window *w, int widgetIndex) case WIDX_CLOSE: window_close(w); break; + case WIDX_UP: + { + char directory[MAX_PATH]; + int includeNewItem = (_type & 1) == LOADSAVETYPE_SAVE; + + safe_strncpy(directory, _parentDirectory, sizeof(directory)); + window_loadsave_populate_list(w, includeNewItem, directory, _extension); + window_init_scroll_widgets(w); + w->no_list_items = _listItemsCount; + break; + } + case WIDX_NEW: + { + rct_string_id templateStringId = 3165; + char *templateString; + + templateString = (char *)language_get_string(templateStringId); + strcpy(templateString, _defaultName); + window_text_input_open(w, WIDX_NEW, STR_NONE, 2710, templateStringId, 0, 64); + break; + } case WIDX_BROWSE: safe_strncpy(filename, _directory, MAX_PATH); if (_type & LOADSAVETYPE_SAVE) @@ -363,40 +387,28 @@ static void window_loadsave_scrollmousedown(rct_window *w, int scrollIndex, int selectedItem = y / 10; if (selectedItem >= w->no_list_items) return; + if (_listItems[selectedItem].type == TYPE_DIRECTORY){ + // The selected item is a folder + int includeNewItem; - if (_listItems[selectedItem].type == TYPE_NEW_FILE) { - rct_string_id templateStringId = 3165; - char *templateString; + w->no_list_items = 0; + w->selected_list_item = -1; + includeNewItem = (_type & 1) == LOADSAVETYPE_SAVE; - templateString = (char*)language_get_string(templateStringId); - strcpy(templateString, _defaultName); + char directory[MAX_PATH]; + safe_strncpy(directory, _listItems[selectedItem].path, sizeof(directory)); - window_text_input_open(w, WIDX_SCROLL, STR_NONE, 2710, templateStringId, 0, 64); + window_loadsave_populate_list(w, includeNewItem, directory, _extension); + window_init_scroll_widgets(w); + + w->no_list_items = _listItemsCount; } else { - if (_listItems[selectedItem].type == TYPE_DIRECTORY || _listItems[selectedItem].type == TYPE_UP){ - // The selected item is a folder - int includeNewItem; - - w->no_list_items = 0; - w->selected_list_item = -1; - - includeNewItem = (_type & 1) == LOADSAVETYPE_SAVE; - - char directory[MAX_PATH]; - safe_strncpy(directory, _listItems[selectedItem].path, sizeof(directory)); - - window_loadsave_populate_list(includeNewItem, true, directory, _extension); - window_init_scroll_widgets(w); - - w->no_list_items = _listItemsCount; - } else { - // TYPE_FILE - // Load or overwrite - if ((_loadsaveType & 0x01) == LOADSAVETYPE_SAVE) - window_overwrite_prompt_open(_listItems[selectedItem].name, _listItems[selectedItem].path); - else - window_loadsave_select(w, _listItems[selectedItem].path); - } + // TYPE_FILE + // Load or overwrite + if ((_loadsaveType & 0x01) == LOADSAVETYPE_SAVE) + window_overwrite_prompt_open(_listItems[selectedItem].name, _listItems[selectedItem].path); + else + window_loadsave_select(w, _listItems[selectedItem].path); } } @@ -482,18 +494,20 @@ static void window_loadsave_paint(rct_window *w, rct_drawpixelinfo *dpi) // Draw shadow gfx_draw_string(dpi, buffer, 0, w->x + 4, w->y + 20); rct_string_id id = STR_NONE; + // Name button text if (gConfigGeneral.load_save_sort == SORT_NAME_ASCENDING) id = STR_UP; else if (gConfigGeneral.load_save_sort == SORT_NAME_DESCENDING) id = STR_DOWN; - gfx_draw_string_centred_clipped(dpi, STR_NAME, &id, 1, w->x + 4 + (w->width - 8) / 4, w->y + 36, (w->width - 8) / 2); + gfx_draw_string_centred_clipped(dpi, STR_NAME, &id, 1, w->x + 4 + (w->width - 8) / 4, w->y + 50, (w->width - 8) / 2); + // Date button text if (gConfigGeneral.load_save_sort == SORT_DATE_ASCENDING) id = STR_UP; else if (gConfigGeneral.load_save_sort == SORT_DATE_DESCENDING) id = STR_DOWN; else id = STR_NONE; - gfx_draw_string_centred_clipped(dpi, STR_DATE, &id, 1, w->x + 4 + (w->width - 8) * 3 / 4, w->y + 36, (w->width - 8) / 2); + gfx_draw_string_centred_clipped(dpi, STR_DATE, &id, 1, w->x + 4 + (w->width - 8) * 3 / 4, w->y + 50, (w->width - 8) / 2); } static void shorten_path(char* path, char* buffer, int available_width){ @@ -599,14 +613,14 @@ static void window_loadsave_sort_list(int index, int endIndex) qsort(_listItems + index, count, sizeof(loadsave_list_item), list_item_sort); } -static void window_loadsave_populate_list(int includeNewItem, bool browsable, const char *directory, const char *extension) +static void window_loadsave_populate_list(rct_window *w, int includeNewItem, const char *directory, const char *extension) { - int i, listItemCapacity, fileEnumHandle; - file_info fileInfo; + int i; + int sortStartIndex = 0; + int listItemCapacity = 8; loadsave_list_item *listItem; - const char *src; - char *dst, *last_dot_in_filename, filter[MAX_PATH], subDir[MAX_PATH]; - + char filter[MAX_PATH]; + safe_strncpy(_directory, directory, sizeof(_directory)); if (_extension != extension) { safe_strncpy(_extension, extension, sizeof(_extension)); @@ -620,58 +634,55 @@ static void window_loadsave_populate_list(int includeNewItem, bool browsable, co if (_listItems != NULL) free(_listItems); - - listItemCapacity = 8; _listItems = (loadsave_list_item*)malloc(listItemCapacity * sizeof(loadsave_list_item)); _listItemsCount = 0; + + window_loadsave_widgets[WIDX_NEW].type = includeNewItem?WWT_CLOSEBOX:WWT_EMPTY; // Hide/Show "new" button + if(directory[0]=='\0' && platform_get_drives()!=0) // List Windows drives + { + w->disabled_widgets |= (1<= 0; index--) { - if (directory[index] == platform_get_path_separator()) { - if (lastSlash != directoryLength){ - // The last slash has been changed before, we're now one up - lastSlash = index; - topLevel = 0; - break; - } else { - // The last slash, after the whole path - lastSlash = index; - } + if (platform_get_drives() & (1 << (x))){ + listItem = &_listItems[_listItemsCount]; + memset(listItem->path, '\0', MAX_PATH); + listItem->path[0] = 'A' + x; + listItem->path[1] = ':'; + listItem->path[2] = platform_get_path_separator(); + strcpy(listItem->name, listItem->path); + listItem->type = TYPE_DIRECTORY; + _listItemsCount++; } } - if (!topLevel){ - listItem = &_listItems[_listItemsCount]; - safe_strncpy(listItem->name, language_get_string(2718), sizeof(listItem->name)); - memset(listItem->path, '\0', sizeof(listItem->path)); - strncpy(listItem->path, directory, lastSlash + 1); - listItem->type = TYPE_UP; - _listItemsCount++; - } else if (platform_get_drives() != 0 && directory[0] != '\0'){ - includeNewItem = false; - listItem = &_listItems[_listItemsCount]; - safe_strncpy(listItem->name, language_get_string(2718), sizeof(listItem->name)); - memset(listItem->path, '\0', sizeof(listItem->path)); - listItem->type = TYPE_UP; - _listItemsCount++; + } + else + { + //Get parent directory + int directoryLength = strlen(directory); + char separator = platform_get_path_separator(); + for(i = directoryLength-2; i>=0; i--) + { + if(directory[i]==separator) + break; } - } - - if (includeNewItem) { - listItem = &_listItems[_listItemsCount]; - safe_strncpy(listItem->name, language_get_string(2719), sizeof(listItem->name)); - listItem->path[0] = '\0'; - listItem->type = TYPE_NEW_FILE; - _listItemsCount++; - } - - int sortStartIndex = _listItemsCount; - - if (directory[0] != '\0'){ + safe_strncpy(_parentDirectory, directory, sizeof(_parentDirectory)); + _parentDirectory[i+1] = '\0'; + if(_parentDirectory[0]=='\0' && platform_get_drives()==0) + w->disabled_widgets |= (1<disabled_widgets &= ~(1<disabled_widgets &= ~(1<path, '\0', MAX_PATH); - listItem->path[0] = 'A' + x; - listItem->path[1] = ':'; - listItem->path[2] = platform_get_path_separator(); - strcpy(listItem->name, listItem->path); - listItem->type = TYPE_DIRECTORY; - _listItemsCount++; - } - } } - - window_loadsave_sort_list(sortStartIndex, _listItemsCount - 1); } static void window_loadsave_invoke_callback(int result) From e64fd158ab072938cde4905c6c3dc57a5a6d1530 Mon Sep 17 00:00:00 2001 From: Krutonium Date: Wed, 11 Nov 2015 23:19:35 -0500 Subject: [PATCH 02/13] Update readme.md --- readme.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 99733e8b68..7e9b97ec3b 100644 --- a/readme.md +++ b/readme.md @@ -5,8 +5,12 @@ An open source clone of RollerCoaster Tycoon 2 built by decompiling the original - [Screenshot 3, high resolution](http://i.imgur.com/yFzNyVu.jpg) - [Screenshot 4, resizable window](http://imgur.com/a/3GDuT) -[![Travis CI](https://travis-ci.org/OpenRCT2/OpenRCT2.svg)](https://travis-ci.org/OpenRCT2/OpenRCT2) [![AppVeyor](https://ci.appveyor.com/api/projects/status/fib6re830brysuo2?svg=true)](https://ci.appveyor.com/project/IntelOrca/openrct2) +Linux Build: +[![Travis CI](https://travis-ci.org/OpenRCT2/OpenRCT2.svg)](https://travis-ci.org/OpenRCT2/OpenRCT2) +Windows Build: +[![AppVeyor](https://ci.appveyor.com/api/projects/status/fib6re830brysuo2?svg=true)](https://ci.appveyor.com/project/IntelOrca/openrct2) +Come talk with us if you have any questions: [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/OpenRCT2/OpenRCT2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) # Contents From 075b98e209ed1d5f9893efcde45ecbd49e246565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 12 Nov 2015 12:15:20 +0100 Subject: [PATCH 03/13] Minor cleanups Mostly just setting variables to better define game state, with one minor update of decompilation where an `or` instruction was used in place of `mov` (in `sub_6CBCE2`). --- src/config.c | 2 +- src/peep/staff.c | 1 + src/ride/ride.c | 9 +++++---- src/scenario.c | 2 +- src/windows/map.c | 2 +- src/windows/park.c | 1 + src/windows/ride.c | 3 +++ src/windows/ride_construction.c | 2 +- src/windows/title_editor.c | 4 +++- src/windows/track_place.c | 1 + 10 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/config.c b/src/config.c index 647f59e4f7..cd6057d65b 100644 --- a/src/config.c +++ b/src/config.c @@ -1493,7 +1493,7 @@ static void title_sequence_open(const char *path, const char *customName) token = &parts[0 * 128]; part1 = &parts[1 * 128]; part2 = &parts[2 * 128]; - title_command command; + title_command command = { 0 }; command.command = 0xFF; if (token[0] != 0) { diff --git a/src/peep/staff.c b/src/peep/staff.c index 3d44d0cb53..b187d632b3 100644 --- a/src/peep/staff.c +++ b/src/peep/staff.c @@ -389,6 +389,7 @@ uint16 hire_new_staff_member(uint8 staffType) RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_HIRE_NEW_STAFF; int eax, ebx, ecx, edx, esi, edi, ebp; + ecx = edx = esi = edi = ebp = 0; eax = 0x8000; ebx = staffType << 8 | GAME_COMMAND_FLAG_APPLY; diff --git a/src/ride/ride.c b/src/ride/ride.c index bb7261ad5b..573251d0d1 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -850,6 +850,7 @@ int ride_create_ride(ride_list_item listItem) ebx = GAME_COMMAND_FLAG_APPLY; edi = 0; esi = 0; + ebp = 0; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = 0x3DC; @@ -1194,7 +1195,7 @@ int sub_6C683D(int* x, int* y, int* z, int direction, int type, uint16 extra_par mapElement->properties.track.colour &= 0x0F; mapElement->properties.track.colour |= (extra_params & 0xFF) << 4; } - + if (flags & (1 << 3)) { track_element_set_cable_lift(mapElement); } @@ -5562,7 +5563,7 @@ void game_command_callback_ride_remove_track_piece(int eax, int ebx, int ecx, in z = gRideRemoveTrackPieceCallbackZ; direction = gRideRemoveTrackPieceCallbackDirection; type = gRideRemoveTrackPieceCallbackType; - + window_ride_construction_mouseup_demolish_next_piece(x, y, z, direction, type); } @@ -6412,9 +6413,9 @@ static void ride_update_vehicle_colours(int rideIndex) { rct_ride *ride; rct_vehicle *vehicle; - rct_vehicle_colour colours; + rct_vehicle_colour colours = { 0 }; uint16 spriteIndex; - uint8 coloursExtended; + uint8 coloursExtended = 0; ride = GET_RIDE(rideIndex); if (ride->type == RIDE_TYPE_SPACE_RINGS || ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_16)) { diff --git a/src/scenario.c b/src/scenario.c index 4d94b7be70..6975421c80 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -497,7 +497,7 @@ void scenario_success_submit_name(const char *name) **/ void scenario_entrance_fee_too_high_check() { - uint16 x, y; + uint16 x = 0, y = 0; uint16 totalRideValue = RCT2_GLOBAL(RCT2_TOTAL_RIDE_VALUE, uint16); uint16 park_entrance_fee = RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, uint16); int max_fee = totalRideValue + (totalRideValue / 2); diff --git a/src/windows/map.c b/src/windows/map.c index 163604d879..7c46d62645 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -1597,7 +1597,7 @@ static uint16 map_window_get_pixel_colour_ride(int x, int y) static void map_window_set_pixels(rct_window *w) { - uint16 colour, *destination; + uint16 colour = 0, *destination; int x, y, dx, dy; destination = (uint16*)((RCT2_GLOBAL(0x00F1AD6C, uint32) * 511) + RCT2_GLOBAL(RCT2_ADDRESS_MAP_IMAGE_DATA, uint32) + 255); diff --git a/src/windows/park.c b/src/windows/park.c index 6b32b71bed..91be02ae90 100644 --- a/src/windows/park.c +++ b/src/windows/park.c @@ -1053,6 +1053,7 @@ static void window_park_entrance_paint(rct_window *w, rct_drawpixelinfo *dpi) static void window_park_init_viewport(rct_window *w) { int i, x, y, z, r, xy, zr, viewportFlags; + x = y = z = r = xy = zr = 0; rct_viewport *viewport; rct_widget *viewportWidget; diff --git a/src/windows/ride.c b/src/windows/ride.c index b04e0f2cb7..b6f44dde0b 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -5341,6 +5341,9 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi top = measurement->lateral[x] + 52; bottom = measurement->lateral[x + 1] + 52; break; + default: + log_error("Wrong graph type %d", listType); + top = bottom = 0; } top = widget->bottom - widget->top - top - 13; diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 02de05c631..b3dae4b8de 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -2273,7 +2273,7 @@ static void sub_6CBCE2( offsetX = -trackBlock->y; offsetY = trackBlock->x; bl = rol8(bl, 3); - bh |= bl; + bh = bl; bh = ror8(bh, 4); bl &= 0x88; bh &= 0x77; diff --git a/src/windows/title_editor.c b/src/windows/title_editor.c index eb82afe2a8..41c2974acd 100644 --- a/src/windows/title_editor.c +++ b/src/windows/title_editor.c @@ -943,7 +943,7 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, ColourMapA[w->colours[1]].lighter | 0x1000000); } - rct_string_id commandName; + rct_string_id commandName = STR_NONE; switch (command->command) { case TITLE_SCRIPT_LOAD: commandName = 5415; @@ -984,6 +984,8 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int case TITLE_SCRIPT_END: commandName = 5426; break; + default: + log_warning("Unknown command %d", command->command); } if ((selected || hover) && !error) { diff --git a/src/windows/track_place.c b/src/windows/track_place.c index c879b4907a..85365c9dc9 100644 --- a/src/windows/track_place.c +++ b/src/windows/track_place.c @@ -352,6 +352,7 @@ static void window_track_place_attempt_placement(int x, int y, int z, int bl, mo int eax, ebx, ecx, edx, esi, edi, ebp; money32 result; + edx = esi = ebp = 0; eax = x; ebx = bl; ecx = y; From b5b1957f58b3af54df596d7c2f0379004e2a777e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 12 Nov 2015 13:32:15 +0100 Subject: [PATCH 04/13] Fix some left-shifts An explicit `1` is considered signed by compiler, if `int` is 32 bit long, a left shift `1 << 31` is undefined. Since the type of result is the type of left shift operand, make sure we shift unsigned int so that the behaviour is defined correctly. Also one fix in peep code, where it would use too big value for `item_extra_flags`. --- src/peep/peep.c | 28 ++++++++++++++-------------- src/util/util.c | 4 ++-- src/windows/scenery.c | 6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index d1d06e3ec7..e714c8de93 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -4147,7 +4147,7 @@ static void peep_update_using_bin(rct_peep* peep){ uint32 empty_containers = peep_empty_container_standard_flag(peep); for (uint8 cur_container = 0; cur_container < 32; cur_container++){ - if (!(empty_containers & (1 << cur_container))) continue; + if (!(empty_containers & (1u << cur_container))) continue; if (rubbish_in_bin != 0){ // OpenRCT2 modification: This previously used @@ -4177,7 +4177,7 @@ static void peep_update_using_bin(rct_peep* peep){ empty_containers = peep_empty_container_extra_flag(peep); for (uint8 cur_container = 0; cur_container < 32; cur_container++){ - if (!(empty_containers & (1 << cur_container))) continue; + if (!(empty_containers & (1u << cur_container))) continue; if (rubbish_in_bin != 0){ // OpenRCT2 modification: This previously used @@ -5741,9 +5741,9 @@ int peep_is_mechanic(rct_peep *peep) bool peep_has_item(rct_peep *peep, int peepItem) { if (peepItem < 32) { - return peep->item_standard_flags & (1 << peepItem); + return peep->item_standard_flags & (1u << peepItem); } else { - return peep->item_extra_flags & (1 << peepItem); + return peep->item_extra_flags & (1u << (peepItem - 32)); } } @@ -8608,7 +8608,7 @@ static void peep_pick_ride_to_go_on(rct_peep *peep) int i; FOR_ALL_RIDES(i, ride) { if (!peep_has_ridden(peep, i)) { - RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1 << (i & 0x1F)); + RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1u << (i & 0x1F)); } } } else { @@ -8623,7 +8623,7 @@ static void peep_pick_ride_to_go_on(rct_peep *peep) if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_TRACK) continue; int rideIndex = mapElement->properties.track.ride_index; - RCT2_ADDRESS(0x00F1AD98, uint32)[rideIndex >> 5] |= (1 << (rideIndex & 0x1F)); + RCT2_ADDRESS(0x00F1AD98, uint32)[rideIndex >> 5] |= (1u << (rideIndex & 0x1F)); } while (!map_element_is_last_for_tile(mapElement++)); } } @@ -8636,7 +8636,7 @@ static void peep_pick_ride_to_go_on(rct_peep *peep) if (ride->excitement == (ride_rating)0xFFFF) continue; if (ride->highest_drop_height <= 66 && ride->excitement < RIDE_RATING(8,00)) continue; - RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1 << (i & 0x1F)); + RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1u << (i & 0x1F)); } } @@ -8645,7 +8645,7 @@ static void peep_pick_ride_to_go_on(rct_peep *peep) uint8 *nextPotentialRide = potentialRides; int numPotentialRides = 0; for (int i = 0; i < MAX_RIDES; i++) { - if (!(RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] & (1 << (i & 0x1F)))) + if (!(RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] & (1u << (i & 0x1F)))) continue; rct_ride *ride = GET_RIDE(i); @@ -8724,7 +8724,7 @@ static void peep_head_for_nearest_ride_type(rct_peep *peep, int rideType) int i; FOR_ALL_RIDES(i, ride) { if (ride->type == rideType) { - RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1 << (i & 0x1F)); + RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1u << (i & 0x1F)); } } } else { @@ -8741,7 +8741,7 @@ static void peep_head_for_nearest_ride_type(rct_peep *peep, int rideType) int rideIndex = mapElement->properties.track.ride_index; ride = GET_RIDE(rideIndex); if (ride->type == rideType) { - RCT2_ADDRESS(0x00F1AD98, uint32)[rideIndex >> 5] |= (1 << (rideIndex & 0x1F)); + RCT2_ADDRESS(0x00F1AD98, uint32)[rideIndex >> 5] |= (1u << (rideIndex & 0x1F)); } } while (!map_element_is_last_for_tile(mapElement++)); } @@ -8754,7 +8754,7 @@ static void peep_head_for_nearest_ride_type(rct_peep *peep, int rideType) uint8 *nextPotentialRide = potentialRides; int numPotentialRides = 0; for (int i = 0; i < MAX_RIDES; i++) { - if (!(RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] & (1 << (i & 0x1F)))) + if (!(RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] & (1u << (i & 0x1F)))) continue; rct_ride *ride = GET_RIDE(i); @@ -8836,7 +8836,7 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep *peep, int rideTypeFl int i; FOR_ALL_RIDES(i, ride) { if (RCT2_ADDRESS(RCT2_ADDRESS_RIDE_FLAGS, uint32)[ride->type * 2] & rideTypeFlags) { - RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1 << (i & 0x1F)); + RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] |= (1u << (i & 0x1F)); } } } else { @@ -8853,7 +8853,7 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep *peep, int rideTypeFl int rideIndex = mapElement->properties.track.ride_index; ride = GET_RIDE(rideIndex); if (RCT2_ADDRESS(RCT2_ADDRESS_RIDE_FLAGS, uint32)[ride->type * 2] & rideTypeFlags) { - RCT2_ADDRESS(0x00F1AD98, uint32)[rideIndex >> 5] |= (1 << (rideIndex & 0x1F)); + RCT2_ADDRESS(0x00F1AD98, uint32)[rideIndex >> 5] |= (1u << (rideIndex & 0x1F)); } } while (!map_element_is_last_for_tile(mapElement++)); } @@ -8866,7 +8866,7 @@ static void peep_head_for_nearest_ride_with_flags(rct_peep *peep, int rideTypeFl uint8 *nextPotentialRide = potentialRides; int numPotentialRides = 0; for (int i = 0; i < MAX_RIDES; i++) { - if (!(RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] & (1 << (i & 0x1F)))) + if (!(RCT2_ADDRESS(0x00F1AD98, uint32)[i >> 5] & (1u << (i & 0x1F)))) continue; rct_ride *ride = GET_RIDE(i); diff --git a/src/util/util.c b/src/util/util.c index a1c93d7ebe..bfccdfa706 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -146,7 +146,7 @@ int bitscanforward(int source) return success != 0 ? i : -1; #else for (i = 0; i < 32; i++) - if (source & (1 << i)) + if (source & (1u << i)) return i; return -1; @@ -157,7 +157,7 @@ int bitcount(int source) { int result = 0; for (int i = 0; i < 32; i++) { - if (source & (1 << i)) { + if (source & (1u << i)) { result++; } } diff --git a/src/windows/scenery.c b/src/windows/scenery.c index f9f99c7c73..fd42a10f44 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -188,7 +188,7 @@ void window_scenery_update_scroll(rct_window *w); * The same code repeated five times for every scenery entry type */ void init_scenery_entry(rct_scenery_entry *sceneryEntry, int index, uint8 sceneryTabId) { - if (RCT2_ADDRESS(0x01357BD0, sint32)[index >> 5] & (1 << (index & 0x1F))) { + if (RCT2_ADDRESS(0x01357BD0, sint32)[index >> 5] & (1u << (index & 0x1F))) { if (sceneryTabId != 0xFF) { for (int i = 0; i < SCENERY_ENTRIES_BY_TAB; i++) { if (window_scenery_tab_entries[sceneryTabId][i] == -1) @@ -246,7 +246,7 @@ void init_scenery() for (int i = 0; i < scenerySetEntry->entry_count; i++) { uint16 sceneryEntryId = scenerySetEntry->scenery_entries[i]; uint32 ecx = RCT2_ADDRESS(0x01357BD0, uint32)[sceneryEntryId >> 5]; - uint32 edx = 1 << (sceneryEntryId & 0x1F); + uint32 edx = 1u << (sceneryEntryId & 0x1F); if (ecx & edx) { window_scenery_tab_entries[scenerySetIndex][sceneryTabEntryCount] = sceneryEntryId; window_scenery_tab_entries[scenerySetIndex][++sceneryTabEntryCount] = -1; @@ -1185,4 +1185,4 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrol } sceneryTabItemIndex++; } -} \ No newline at end of file +} From 6723f51087b78078fbb4d62d73de549743f64616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 12 Nov 2015 14:08:32 +0100 Subject: [PATCH 05/13] Keep track of address returned by malloc to free it correctly When doing g2 generation on Linux, src variable was not modified in the same way as on Windows, which caused free() on a pointer that was not malloc()ed. This fixes #2219. --- src/cmdline_sprite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmdline_sprite.c b/src/cmdline_sprite.c index d6e8ac2c21..5982135a92 100644 --- a/src/cmdline_sprite.c +++ b/src/cmdline_sprite.c @@ -264,6 +264,7 @@ bool sprite_file_import(const char *path, rct_g1_element *outElement, uint8 **ou // A larger range is needed for proper dithering sint16 *src = malloc(height * width * 4 * 2); + sint16 *src_orig = src; for (uint32 x = 0; x < height * width * 4; x++){ src[x] = (sint16) pixels[x]; } @@ -375,7 +376,7 @@ bool sprite_file_import(const char *path, rct_g1_element *outElement, uint8 **ou } } free(pixels); - free(src); + free(src_orig); int bufferLength = (int)(dst - buffer); buffer = realloc(buffer, bufferLength); From fe4d98bc833a177ba329ca320848ed3e4f168539 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 12 Nov 2015 13:36:16 -0600 Subject: [PATCH 06/13] Fixed off-by-one errors in string conversion --- src/platform/linux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/platform/linux.c b/src/platform/linux.c index 5117966ece..68291e8d3a 100644 --- a/src/platform/linux.c +++ b/src/platform/linux.c @@ -209,10 +209,10 @@ int platform_enumerate_files_begin(const utf8 *pattern) enumerate_file_info *enumFileInfo; wchar_t *wpattern = utf8_to_widechar(pattern); int length = min(utf8_length(pattern), MAX_PATH); - char *npattern = malloc(length); + char *npattern = malloc(length+1); int converted; converted = wcstombs(npattern, wpattern, length); - npattern[length - 1] = '\0'; + npattern[length] = '\0'; if (converted == MAX_PATH) { log_warning("truncated string %s", npattern); } @@ -271,7 +271,7 @@ int platform_enumerate_files_begin(const utf8 *pattern) for (int i = 0; i < countof(_enumerateFileInfoList); i++) { enumFileInfo = &_enumerateFileInfoList[i]; if (!enumFileInfo->active) { - safe_strncpy(enumFileInfo->pattern, npattern, length); + safe_strncpy(enumFileInfo->pattern, npattern, sizeof(enumFileInfo->pattern)); cnt = scandir(dir_name, &enumFileInfo->fileListTemp, winfilter, alphasort); if (cnt < 0) { @@ -395,10 +395,10 @@ int platform_enumerate_directories_begin(const utf8 *directory) enumerate_file_info *enumFileInfo; wchar_t *wpattern = utf8_to_widechar(directory); int length = min(utf8_length(directory), MAX_PATH); - char *npattern = malloc(length); + char *npattern = malloc(length+1); int converted; converted = wcstombs(npattern, wpattern, length); - npattern[length - 1] = '\0'; + npattern[length] = '\0'; if (converted == MAX_PATH) { log_warning("truncated string %s", npattern); } @@ -477,7 +477,7 @@ bool platform_enumerate_directories_next(int handle, utf8 *path) log_error("failed to stat file '%s'! errno = %i", fileName, errno); return false; } - // so very, very wrong… + // so very, very wrong safe_strncpy(path, basename(fileName), MAX_PATH); strncat(path, "/", MAX_PATH); path[MAX_PATH - 1] = '\0'; From 8bcf2e1b8cdc7521d533ec792cb482c524f46cb5 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 13 Nov 2015 04:00:17 +0000 Subject: [PATCH 07/13] Merge Localisation/master into OpenRCT2/develop. --- data/language/chinese_traditional.txt | 4 ++-- data/language/english_us.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/language/chinese_traditional.txt b/data/language/chinese_traditional.txt index 6364397fb5..4e2ef366cd 100644 --- a/data/language/chinese_traditional.txt +++ b/data/language/chinese_traditional.txt @@ -3864,8 +3864,8 @@ STR_5521 :{SMALLFONT}{BLACK}明紫色 STR_5522 :{SMALLFONT}{BLACK}暗藍色 STR_5523 :{SMALLFONT}{BLACK}淺藍色 STR_5524 :{SMALLFONT}{BLACK}冰藍色 -STR_5525 :{SMALLFONT}{BLACK}鴨綠色 -STR_5526 :{SMALLFONT}{BLACK}藍綠色 +STR_5525 :{SMALLFONT}{BLACK}深水配色 +STR_5526 :{SMALLFONT}{BLACK}淺水配色 STR_5527 :{SMALLFONT}{BLACK}深綠色 STR_5528 :{SMALLFONT}{BLACK}暗綠色 STR_5529 :{SMALLFONT}{BLACK}苔蘚綠色 diff --git a/data/language/english_us.txt b/data/language/english_us.txt index a173125c84..3f9cdf3d31 100644 --- a/data/language/english_us.txt +++ b/data/language/english_us.txt @@ -3907,7 +3907,7 @@ STR_5563 :This feature is currently unstable, take extra caution. STR_5564 :Insert Corrupt Element STR_5565 :{SMALLFONT}{BLACK}Inserts a corrupt map element at top of tile. This will hide any element above the corrupt element. STR_5566 :Password: -STR_5567 :Advertize +STR_5567 :Advertise STR_5568 :Password Required STR_5569 :This server requires a password STR_5570 :Fetch Servers From 4bf9680b4367558cc65a2f7fd0e9b92c9c6f838d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 13 Nov 2015 11:52:13 +0100 Subject: [PATCH 08/13] Update lodepng to 20151024 https://transfer.sh/11TTTm/orctlibs.zip https://transfer.sh/y9wvx/orctlibs-vs.zip --- build.sh | 2 +- pre-build.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 6bdf0829f1..d1dc442fa3 100755 --- a/build.sh +++ b/build.sh @@ -13,7 +13,7 @@ if [[ ! -d build ]]; then fi # keep in sync with version in install.sh -sha256sum=0a7b5ea46e9cb4b19000b69690eae0b75929752f7db192c78bd7ffb61d696835 +sha256sum=69ff98c9544838fb16384bc78af9dc1c452b9d01d919e43f5fec686d02c9bdd8 libVFile="./libversion" libdir="./lib" currentversion=0 diff --git a/pre-build.ps1 b/pre-build.ps1 index 539e65755f..a37f3d8993 100644 --- a/pre-build.ps1 +++ b/pre-build.ps1 @@ -1,5 +1,5 @@ #init -$libversion = 3 +$libversion = 4 $path = Split-Path $Script:MyInvocation.MyCommand.Path $zip = $path+'\orctlibs.zip' $libs = $path+'\lib' From 60f7d29c2e67b00fb415f26f6cc2e17344ef0b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 13 Nov 2015 14:40:25 +0100 Subject: [PATCH 09/13] Zero the buffer for g2.dat Some leftover data caused the g2.dat generated on different platforms to have mismatching cheksums. Zeroing the buffer makes them checksum-identical. --- src/cmdline_sprite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmdline_sprite.c b/src/cmdline_sprite.c index 5982135a92..0e8f84a83a 100644 --- a/src/cmdline_sprite.c +++ b/src/cmdline_sprite.c @@ -260,6 +260,7 @@ bool sprite_file_import(const char *path, rct_g1_element *outElement, uint8 **ou } uint8 *buffer = malloc((height * 2) + (width * height * 16)); + memset(buffer, 0, (height * 2) + (width * height * 16)); uint16 *yOffsets = (uint16*)buffer; // A larger range is needed for proper dithering From 7aa8e6040e2a5ab5eab3ce6cb992e6999f74bdef Mon Sep 17 00:00:00 2001 From: "U-HP-Pavilion-PC\\Cameron" Date: Fri, 13 Nov 2015 16:08:33 -0600 Subject: [PATCH 10/13] Converted to sentence case and removed brackets from STR_2718 and STR_2719 --- data/language/chinese_simplified.txt | 4 ++-- data/language/chinese_traditional.txt | 4 ++-- data/language/dutch.txt | 4 ++-- data/language/english_uk.txt | 4 ++-- data/language/english_us.txt | 4 ++-- data/language/finnish.txt | 4 ++-- data/language/french.txt | 4 ++-- data/language/german.txt | 4 ++-- data/language/hungarian.txt | 4 ++-- data/language/italian.txt | 4 ++-- data/language/korean.txt | 4 ++-- data/language/polish.txt | 4 ++-- data/language/portuguese_br.txt | 4 ++-- data/language/russian.txt | 4 ++-- data/language/spanish_sp.txt | 4 ++-- data/language/swedish.txt | 4 ++-- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/data/language/chinese_simplified.txt b/data/language/chinese_simplified.txt index d543ddea86..ae1c920458 100644 --- a/data/language/chinese_simplified.txt +++ b/data/language/chinese_simplified.txt @@ -2728,8 +2728,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/chinese_traditional.txt b/data/language/chinese_traditional.txt index 6364397fb5..3c1c34ef79 100644 --- a/data/language/chinese_traditional.txt +++ b/data/language/chinese_traditional.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(向上層) -STR_2719 :(建立新檔案) +STR_2718 :向上層 +STR_2719 :建立新檔案 STR_2720 :{UINT16}秒 STR_2721 :{UINT16}秒 STR_2722 :{UINT16}分:{UINT16}秒 diff --git a/data/language/dutch.txt b/data/language/dutch.txt index 9526dd4d75..7a5d3d50cf 100644 --- a/data/language/dutch.txt +++ b/data/language/dutch.txt @@ -2719,8 +2719,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(één map omhoog) -STR_2719 :(nieuw bestand) +STR_2718 :Één map omhoog +STR_2719 :Nieuw bestand STR_2720 :{UINT16}s STR_2721 :{UINT16}s STR_2722 :{UINT16}m {UINT16}s diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index 8460f2a6ee..e18723052b 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/english_us.txt b/data/language/english_us.txt index a173125c84..81e3d4c0b5 100644 --- a/data/language/english_us.txt +++ b/data/language/english_us.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/finnish.txt b/data/language/finnish.txt index 8b80312a12..728bb8b0b1 100644 --- a/data/language/finnish.txt +++ b/data/language/finnish.txt @@ -2725,8 +2725,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(ylös) -STR_2719 :(uusi tiedosto) +STR_2718 :Ylös +STR_2719 :Uusi tiedosto STR_2720 :{UINT16}sek STR_2721 :{UINT16}sekuntia STR_2722 :{UINT16}min:{UINT16}sek diff --git a/data/language/french.txt b/data/language/french.txt index ee3f80705f..2e828d38b5 100644 --- a/data/language/french.txt +++ b/data/language/french.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(nouveau fichier) +STR_2718 :Up +STR_2719 :Nouveau fichier STR_2720 :{UINT16}s STR_2721 :{UINT16}s STR_2722 :{UINT16}m {UINT16}s diff --git a/data/language/german.txt b/data/language/german.txt index 8a048f6ef0..d923316476 100644 --- a/data/language/german.txt +++ b/data/language/german.txt @@ -2721,8 +2721,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(Hoch) -STR_2719 :(Neue Datei) +STR_2718 :Hoch +STR_2719 :Neue Datei STR_2720 :{UINT16}Sek. STR_2721 :{UINT16}Sek. STR_2722 :{UINT16}Min:{UINT16}Sek. diff --git a/data/language/hungarian.txt b/data/language/hungarian.txt index 3479980735..afe4116860 100644 --- a/data/language/hungarian.txt +++ b/data/language/hungarian.txt @@ -2722,8 +2722,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/italian.txt b/data/language/italian.txt index cc9467fb10..8c30072aa0 100644 --- a/data/language/italian.txt +++ b/data/language/italian.txt @@ -2722,8 +2722,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/korean.txt b/data/language/korean.txt index 11e08e4aad..2ab5ba9175 100644 --- a/data/language/korean.txt +++ b/data/language/korean.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(상위 폴더) -STR_2719 :(새 파일) +STR_2718 :상위 폴더 +STR_2719 :새 파일 STR_2720 :{UINT16}초 STR_2721 :{UINT16}초 STR_2722 :{UINT16}분 {UINT16}초 diff --git a/data/language/polish.txt b/data/language/polish.txt index 48d9b4a71a..e982fb07ac 100644 --- a/data/language/polish.txt +++ b/data/language/polish.txt @@ -2760,8 +2760,8 @@ STR_2715 :. STR_2716 :/ STR_2717 :' # New strings (previously these were ???) -STR_2718 :(..) -STR_2719 :(nowy plik) +STR_2718 :.. +STR_2719 :Nowy plik # sec, secs STR_2720 :{UINT16}sek STR_2721 :{UINT16}sek diff --git a/data/language/portuguese_br.txt b/data/language/portuguese_br.txt index 6a263f8de4..b5a6da4df1 100644 --- a/data/language/portuguese_br.txt +++ b/data/language/portuguese_br.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(cima) -STR_2719 :(novo arquivo) +STR_2718 :Cima +STR_2719 :Novo arquivo STR_2720 :{UINT16}seg STR_2721 :{UINT16}segs STR_2722 :{UINT16}min:{UINT16}seg diff --git a/data/language/russian.txt b/data/language/russian.txt index 1216f8c625..4169a71f6a 100644 --- a/data/language/russian.txt +++ b/data/language/russian.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/spanish_sp.txt b/data/language/spanish_sp.txt index 9c626836b8..45cdf99063 100644 --- a/data/language/spanish_sp.txt +++ b/data/language/spanish_sp.txt @@ -2722,8 +2722,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/swedish.txt b/data/language/swedish.txt index 81e930b655..30960aa72c 100644 --- a/data/language/swedish.txt +++ b/data/language/swedish.txt @@ -2724,8 +2724,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sek STR_2721 :{UINT16}sek STR_2722 :{UINT16}min:{UINT16}sek From 557a89928c2d6463cd6404a0fde1042359fe80bc Mon Sep 17 00:00:00 2001 From: "U-HP-Pavilion-PC\\Cameron" Date: Fri, 13 Nov 2015 16:23:16 -0600 Subject: [PATCH 11/13] Revert "Converted to sentence case and removed brackets from STR_2718 and STR_2719" This reverts commit 7aa8e6040e2a5ab5eab3ce6cb992e6999f74bdef. --- data/language/chinese_simplified.txt | 4 ++-- data/language/chinese_traditional.txt | 4 ++-- data/language/dutch.txt | 4 ++-- data/language/english_uk.txt | 4 ++-- data/language/english_us.txt | 4 ++-- data/language/finnish.txt | 4 ++-- data/language/french.txt | 4 ++-- data/language/german.txt | 4 ++-- data/language/hungarian.txt | 4 ++-- data/language/italian.txt | 4 ++-- data/language/korean.txt | 4 ++-- data/language/polish.txt | 4 ++-- data/language/portuguese_br.txt | 4 ++-- data/language/russian.txt | 4 ++-- data/language/spanish_sp.txt | 4 ++-- data/language/swedish.txt | 4 ++-- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/data/language/chinese_simplified.txt b/data/language/chinese_simplified.txt index ae1c920458..d543ddea86 100644 --- a/data/language/chinese_simplified.txt +++ b/data/language/chinese_simplified.txt @@ -2728,8 +2728,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/chinese_traditional.txt b/data/language/chinese_traditional.txt index 3c1c34ef79..6364397fb5 100644 --- a/data/language/chinese_traditional.txt +++ b/data/language/chinese_traditional.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :向上層 -STR_2719 :建立新檔案 +STR_2718 :(向上層) +STR_2719 :(建立新檔案) STR_2720 :{UINT16}秒 STR_2721 :{UINT16}秒 STR_2722 :{UINT16}分:{UINT16}秒 diff --git a/data/language/dutch.txt b/data/language/dutch.txt index 7a5d3d50cf..9526dd4d75 100644 --- a/data/language/dutch.txt +++ b/data/language/dutch.txt @@ -2719,8 +2719,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Één map omhoog -STR_2719 :Nieuw bestand +STR_2718 :(één map omhoog) +STR_2719 :(nieuw bestand) STR_2720 :{UINT16}s STR_2721 :{UINT16}s STR_2722 :{UINT16}m {UINT16}s diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index e18723052b..8460f2a6ee 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/english_us.txt b/data/language/english_us.txt index 81e3d4c0b5..a173125c84 100644 --- a/data/language/english_us.txt +++ b/data/language/english_us.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/finnish.txt b/data/language/finnish.txt index 728bb8b0b1..8b80312a12 100644 --- a/data/language/finnish.txt +++ b/data/language/finnish.txt @@ -2725,8 +2725,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Ylös -STR_2719 :Uusi tiedosto +STR_2718 :(ylös) +STR_2719 :(uusi tiedosto) STR_2720 :{UINT16}sek STR_2721 :{UINT16}sekuntia STR_2722 :{UINT16}min:{UINT16}sek diff --git a/data/language/french.txt b/data/language/french.txt index 2e828d38b5..ee3f80705f 100644 --- a/data/language/french.txt +++ b/data/language/french.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :Nouveau fichier +STR_2718 :(up) +STR_2719 :(nouveau fichier) STR_2720 :{UINT16}s STR_2721 :{UINT16}s STR_2722 :{UINT16}m {UINT16}s diff --git a/data/language/german.txt b/data/language/german.txt index d923316476..8a048f6ef0 100644 --- a/data/language/german.txt +++ b/data/language/german.txt @@ -2721,8 +2721,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Hoch -STR_2719 :Neue Datei +STR_2718 :(Hoch) +STR_2719 :(Neue Datei) STR_2720 :{UINT16}Sek. STR_2721 :{UINT16}Sek. STR_2722 :{UINT16}Min:{UINT16}Sek. diff --git a/data/language/hungarian.txt b/data/language/hungarian.txt index afe4116860..3479980735 100644 --- a/data/language/hungarian.txt +++ b/data/language/hungarian.txt @@ -2722,8 +2722,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/italian.txt b/data/language/italian.txt index 8c30072aa0..cc9467fb10 100644 --- a/data/language/italian.txt +++ b/data/language/italian.txt @@ -2722,8 +2722,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/korean.txt b/data/language/korean.txt index 2ab5ba9175..11e08e4aad 100644 --- a/data/language/korean.txt +++ b/data/language/korean.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :상위 폴더 -STR_2719 :새 파일 +STR_2718 :(상위 폴더) +STR_2719 :(새 파일) STR_2720 :{UINT16}초 STR_2721 :{UINT16}초 STR_2722 :{UINT16}분 {UINT16}초 diff --git a/data/language/polish.txt b/data/language/polish.txt index e982fb07ac..48d9b4a71a 100644 --- a/data/language/polish.txt +++ b/data/language/polish.txt @@ -2760,8 +2760,8 @@ STR_2715 :. STR_2716 :/ STR_2717 :' # New strings (previously these were ???) -STR_2718 :.. -STR_2719 :Nowy plik +STR_2718 :(..) +STR_2719 :(nowy plik) # sec, secs STR_2720 :{UINT16}sek STR_2721 :{UINT16}sek diff --git a/data/language/portuguese_br.txt b/data/language/portuguese_br.txt index b5a6da4df1..6a263f8de4 100644 --- a/data/language/portuguese_br.txt +++ b/data/language/portuguese_br.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Cima -STR_2719 :Novo arquivo +STR_2718 :(cima) +STR_2719 :(novo arquivo) STR_2720 :{UINT16}seg STR_2721 :{UINT16}segs STR_2722 :{UINT16}min:{UINT16}seg diff --git a/data/language/russian.txt b/data/language/russian.txt index 4169a71f6a..1216f8c625 100644 --- a/data/language/russian.txt +++ b/data/language/russian.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/spanish_sp.txt b/data/language/spanish_sp.txt index 45cdf99063..9c626836b8 100644 --- a/data/language/spanish_sp.txt +++ b/data/language/spanish_sp.txt @@ -2722,8 +2722,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec diff --git a/data/language/swedish.txt b/data/language/swedish.txt index 30960aa72c..81e930b655 100644 --- a/data/language/swedish.txt +++ b/data/language/swedish.txt @@ -2724,8 +2724,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :Up -STR_2719 :New file +STR_2718 :(up) +STR_2719 :(new file) STR_2720 :{UINT16}sek STR_2721 :{UINT16}sek STR_2722 :{UINT16}min:{UINT16}sek From e2545599edc650574ad385fe29ebc2f6716a3153 Mon Sep 17 00:00:00 2001 From: "U-HP-Pavilion-PC\\Cameron" Date: Fri, 13 Nov 2015 16:25:52 -0600 Subject: [PATCH 12/13] Converted to sentence case and removed brackets from STR_2718 and 2719 in english_uk.txt --- data/language/english_uk.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index 8460f2a6ee..e18723052b 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -2723,8 +2723,8 @@ STR_2714 :- STR_2715 :. STR_2716 :/ STR_2717 :' -STR_2718 :(up) -STR_2719 :(new file) +STR_2718 :Up +STR_2719 :New file STR_2720 :{UINT16}sec STR_2721 :{UINT16}secs STR_2722 :{UINT16}min:{UINT16}sec From 44e3e74a65d8a3f05768f7ba4c64fb5cd4e93d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 13 Nov 2015 23:33:24 +0100 Subject: [PATCH 13/13] Change pre-built link to http://openrct2.website/ --- install.sh | 2 +- pre-build.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index fe2a71da27..eb04f41dd3 100755 --- a/install.sh +++ b/install.sh @@ -4,7 +4,7 @@ SDL2_PV=2.0.3 SDL2_TTF_PV=2.0.12 cachedir=.cache -liburl=https://openrct.net/launcher/libs/orctlibs.zip +liburl=https://openrct2.website/files/orctlibs.zip mkdir -p $cachedir echo $(uname) diff --git a/pre-build.ps1 b/pre-build.ps1 index a37f3d8993..3e350d0c26 100644 --- a/pre-build.ps1 +++ b/pre-build.ps1 @@ -4,7 +4,7 @@ $path = Split-Path $Script:MyInvocation.MyCommand.Path $zip = $path+'\orctlibs.zip' $libs = $path+'\lib' $libsVFile = $path+'\libversion' -$liburl = 'https://openrct.net/launcher/libs/orctlibs_vs.zip' +$liburl = 'https://openrct2.website/files/orctlibs-vs.zip' $libsTest = Test-Path $libs #libs version test