From 65a0dcbc8af90236be357703faf2908b790adb4e Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Tue, 1 Dec 2015 12:18:14 +0100 Subject: [PATCH 1/9] Fixed #2407 - Prevent prompt from showing shortly after loading a second park. --- src/game.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game.c b/src/game.c index 65802ea818..e39bc2b0f5 100644 --- a/src/game.c +++ b/src/game.c @@ -787,6 +787,9 @@ int game_load_sv6(SDL_RWops* rw) game_convert_strings_to_utf8(); game_fix_save_vars(); // OpenRCT2 fix broken save games + // #2407: Resetting screen time to not open a save prompt shortly after loading a park. + RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0; + return 1; } From 8de299cc0607e9f8bc11f6b44d627a62393d2a75 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Tue, 1 Dec 2015 17:51:44 +0000 Subject: [PATCH 2/9] fix #2415: day / night cycle not working --- src/scenario.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scenario.c b/src/scenario.c index 8a6cd24f97..48888e0fc5 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -627,6 +627,8 @@ static void scenario_update_daynight_cycle() } else { gDayNightCycle = 0.0f; } + + platform_update_palette(RCT2_ADDRESS(RCT2_ADDRESS_PALETTE, uint8), 10, 236); } /* From 60300dcecedce24715d0ebcf9620aa6fb18cd38a Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Tue, 1 Dec 2015 18:30:04 +0000 Subject: [PATCH 3/9] update version and branch --- src/rct2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rct2.h b/src/rct2.h index 7fafed7633..821159f8bf 100644 --- a/src/rct2.h +++ b/src/rct2.h @@ -84,7 +84,7 @@ typedef utf16* utf16string; #endif #define OPENRCT2_NAME "OpenRCT2" -#define OPENRCT2_VERSION "0.0.3" +#define OPENRCT2_VERSION "0.0.3.1" #define OPENRCT2_ARCHITECTURE "x86" #ifdef _WIN32 #define OPENRCT2_PLATFORM "Windows" @@ -103,7 +103,7 @@ typedef utf16* utf16string; // The following constants are for automated build servers #define OPENRCT2_BUILD_NUMBER "" #define OPENRCT2_BUILD_SERVER "" -#define OPENRCT2_BRANCH "" +#define OPENRCT2_BRANCH "pre-release-0.0.3.1" #define OPENRCT2_COMMIT_SHA1 "" #define OPENRCT2_COMMIT_SHA1_SHORT "" #define OPENRCT2_MASTER_SERVER_URL "https://servers.openrct2.website" From 942617091843b7c4e7e2c6e0db2f6332dd04b7ea Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 2 Dec 2015 17:50:32 +0000 Subject: [PATCH 4/9] fix #2425: ride campaign list corrupted if over 40 rides --- src/windows/new_campaign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/windows/new_campaign.c b/src/windows/new_campaign.c index 611a8cb1f2..f2af8b3227 100644 --- a/src/windows/new_campaign.c +++ b/src/windows/new_campaign.c @@ -178,7 +178,7 @@ void window_new_campaign_open(sint16 campaignType) // Take top 40 most reliable rides if (numApplicableRides > 40) { - qsort(window_new_campaign_rides, countof(window_new_campaign_rides), sizeof(uint8), ride_value_compare); + qsort(window_new_campaign_rides, numApplicableRides, sizeof(uint8), ride_value_compare); numApplicableRides = 40; } From 8eb313f85291c93f1370c8c387c0d111a14b4ac2 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Wed, 2 Dec 2015 18:59:00 +0000 Subject: [PATCH 5/9] Fix #2417 also fixed some surface pathfinding bugs. Guests were ignoring fences when surface pathfinding even when there was an available exit. Missing &= 3 was causing the assert to trigger. --- src/peep/peep.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index a147e5415c..7961c49e17 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -6589,7 +6589,7 @@ static int peep_interact_with_shop(rct_peep* peep, sint16 x, sint16 y, rct_map_e /* rct2: 0x0069524E */ static int peep_move_one_tile(uint8 direction, rct_peep* peep){ - assert(direction <= 7); + assert(direction <= 3); sint16 x = peep->next_x; sint16 y = peep->next_y; x += TileDirectionDelta[direction].x; @@ -6620,10 +6620,9 @@ static int guest_surface_path_finding(rct_peep* peep){ if (!fence_in_the_way(x, y, z, z + 4, randDirection)){ x += TileDirectionDelta[randDirection].x; y += TileDirectionDelta[randDirection].y; - randDirection ^= (1 << 1); + uint8 backwardsDirection = randDirection ^ (1 << 1); - if (!fence_in_the_way(x, y, z, z + 4, randDirection)){ - randDirection ^= (1 << 1); + if (!fence_in_the_way(x, y, z, z + 4, backwardsDirection)){ if (!map_surface_is_blocked(x, y)){ return peep_move_one_tile(randDirection, peep); } @@ -6637,13 +6636,14 @@ static int guest_surface_path_finding(rct_peep* peep){ } randDirection &= 3; + x = peep->next_x; + y = peep->next_y; if (!fence_in_the_way(x, y, z, z + 4, randDirection)){ x += TileDirectionDelta[randDirection].x; y += TileDirectionDelta[randDirection].y; - randDirection ^= (1 << 1); + uint8 backwardsDirection = randDirection ^ (1 << 1); - if (!fence_in_the_way(x, y, z, z + 4, randDirection)){ - randDirection ^= (1 << 1); + if (!fence_in_the_way(x, y, z, z + 4, backwardsDirection)){ if (!map_surface_is_blocked(x, y)){ return peep_move_one_tile(randDirection, peep); } @@ -6653,13 +6653,14 @@ static int guest_surface_path_finding(rct_peep* peep){ randDirection -= 2; randDirection &= 3; + x = peep->next_x; + y = peep->next_y; if (!fence_in_the_way(x, y, z, z + 4, randDirection)){ x += TileDirectionDelta[randDirection].x; y += TileDirectionDelta[randDirection].y; - randDirection ^= (1 << 1); + uint8 backwardsDirection = randDirection ^ (1 << 1); - if (!fence_in_the_way(x, y, z, z + 4, randDirection)){ - randDirection ^= (1 << 1); + if (!fence_in_the_way(x, y, z, z + 4, backwardsDirection)){ if (!map_surface_is_blocked(x, y)){ return peep_move_one_tile(randDirection, peep); } @@ -6670,6 +6671,7 @@ static int guest_surface_path_finding(rct_peep* peep){ if (rand_backwards){ randDirection += 2; } + randDirection &= 3; return peep_move_one_tile(randDirection, peep); } From 11398cf60f7ba297a35a430845836ee9b1f9e344 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Fri, 4 Dec 2015 16:57:43 +0000 Subject: [PATCH 6/9] Fix warning. --- src/windows/ride.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/windows/ride.c b/src/windows/ride.c index b222be3b2a..b68086446c 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -1599,7 +1599,7 @@ void window_ride_construct(rct_window *w) { // Window may be closed by close by class so // make backup before calling. - uint8 rideIndex = w->number; + uint8 rideIndex = (uint8)w->number; window_close_by_class(WC_RIDE_CONSTRUCTION); ride_construct(rideIndex); } From 737baf8b78db697f0532fba0099780912cf4521e Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Fri, 4 Dec 2015 18:59:59 +0000 Subject: [PATCH 7/9] fix #2158: Video Freeze when window is maximised, minimised and then restored --- src/platform/shared.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/platform/shared.c b/src/platform/shared.c index bc92131204..ae34b6385e 100644 --- a/src/platform/shared.c +++ b/src/platform/shared.c @@ -434,6 +434,20 @@ void platform_process_messages() rct2_quit(); break; case SDL_WINDOWEVENT: + // HACK: Fix #2158, OpenRCT2 does not draw if it does not think that the window is + // visible - due a bug in SDL2.0.3 this hack is required if the + // window is maximised, minimised and then restored again. + if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) { + if (SDL_GetWindowFlags(gWindow) & SDL_WINDOW_MAXIMIZED) { + SDL_RestoreWindow(gWindow); + SDL_MaximizeWindow(gWindow); + } + if (SDL_GetWindowFlags(gWindow) & SDL_WINDOW_FULLSCREEN_DESKTOP) { + SDL_RestoreWindow(gWindow); + SDL_SetWindowFullscreen(gWindow, SDL_WINDOW_FULLSCREEN_DESKTOP); + } + } + if (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) platform_resize(e.window.data1, e.window.data2); if (gConfigSound.audio_focus && gConfigSound.sound) { From 9c19d689c2771c102266127a1ce53ebd2e696ef4 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Fri, 4 Dec 2015 19:02:24 +0000 Subject: [PATCH 8/9] fix #2434: Dropdown menus linger when toolbars are toggled --- src/interface/keyboard_shortcut.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/interface/keyboard_shortcut.c b/src/interface/keyboard_shortcut.c index 946ab53dcf..606b45a181 100644 --- a/src/interface/keyboard_shortcut.c +++ b/src/interface/keyboard_shortcut.c @@ -259,6 +259,7 @@ static void shortcut_remove_top_bottom_toolbar_toggle() return; if (window_find_by_class(WC_TOP_TOOLBAR) != NULL) { + window_close(window_find_by_class(WC_DROPDOWN)); window_close(window_find_by_class(WC_TOP_TOOLBAR)); window_close(window_find_by_class(WC_BOTTOM_TOOLBAR)); } else { From 8e6c345be69a95d496d934e017a21ce09a01868c Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Fri, 4 Dec 2015 19:09:05 +0000 Subject: [PATCH 9/9] prepare distribution files for pre-release-0.0.3.1 --- distribution/changelog.txt | 9 +++++++++ distribution/known_issues.txt | 2 +- distribution/readme.txt | 4 ++-- distribution/windows/install.nsi | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 9a56b27bae..7b2d736895 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,3 +1,12 @@ +0.0.3.1-beta (2015-12-04) +------------------------------------------------------------------------ +- Fix: [#2407] save game prompt delay is not reset on start scenario +- Fix: [#2415] day / night cycle did not update colours during gameplay +- Fix: [#2425] new campaign for ride shows invalid list when over 40 rides +- Fix: [#2417] peep direction assertion somtimes during pathfinding +- Fix: [#2158] video freeze when window is maximised, minimised and then restored +- Fix: [#2434] dropdown menus linger when toolbars are hidden + 0.0.3-beta (2015-11-30) ------------------------------------------------------------------------ - Feature: Adding extra title sequences. diff --git a/distribution/known_issues.txt b/distribution/known_issues.txt index 9e0a74180f..de62cc621d 100644 --- a/distribution/known_issues.txt +++ b/distribution/known_issues.txt @@ -1,4 +1,4 @@ -Release version: 0.0.3-beta +Release version: 0.0.3-1-beta ------------------------------------------------------------------------ * Some sounds play at their maximum volume irrespective of the sound volume control. * Scenario editor object selection window will show object names in the selected language at the time of building the object cache. (Deleting plugin.dat in Documents/OpenRCT2 will fix this) diff --git a/distribution/readme.txt b/distribution/readme.txt index 0ba70659e4..52c8c86a18 100644 --- a/distribution/readme.txt +++ b/distribution/readme.txt @@ -1,5 +1,5 @@ -Last updated: 2015-30-11 -Release version: 0.0.3-beta +Last updated: 2015-12-04 +Release version: 0.0.3-1-beta ------------------------------------------------------------------------ diff --git a/distribution/windows/install.nsi b/distribution/windows/install.nsi index 837658b62f..ab98ba78d1 100644 --- a/distribution/windows/install.nsi +++ b/distribution/windows/install.nsi @@ -2,7 +2,7 @@ !define /ifndef APPV_MAJOR 0 !define /ifndef APPV_MINOR 0 !define /ifndef APPV_MAINT 3 -!define /ifndef APPV_BUILD 0 +!define /ifndef APPV_BUILD 1 !define /ifndef APPV_EXTRA "-beta" !define APPNAME "OpenRCT2" ; Define application name