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 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; } 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 { 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); } 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) { 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); } /* 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; } 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); }