From 674443d0753198193e23207e59fb7f9047491f10 Mon Sep 17 00:00:00 2001 From: Karst Date: Fri, 5 May 2023 15:38:03 +0200 Subject: [PATCH 1/7] Add OpenRCT2 official title music Co-Authored-By: Ted John --- data/language/en-GB.txt | 2 ++ src/openrct2-ui/windows/Options.cpp | 12 ++++++------ src/openrct2/audio/Audio.cpp | 24 +++++++++++++++++++----- src/openrct2/audio/audio.h | 1 + src/openrct2/config/Config.h | 1 + src/openrct2/localisation/StringIds.h | 2 ++ 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 8f0fa47df9..ffe238ef46 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3691,6 +3691,8 @@ STR_6583 :{WINDOW_COLOUR_2}Reversed Trains STR_6584 :Select to run trains backwards STR_6585 :Can’t make changes… +STR_6586 :OpenRCT2 + ############# # Scenarios # ################ diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index a45c659922..93e6b272fc 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -1357,6 +1357,8 @@ private: gDropdownItems[numItems++].Args = TitleMusicNames[0]; gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[numItems++].Args = TitleMusicNames[2]; + gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; + gDropdownItems[numItems++].Args = TitleMusicNames[3]; ShowDropdown(widget, numItems); if (gConfigSound.TitleMusic == TitleMusicKind::None) Dropdown::SetChecked(0, true); @@ -1408,9 +1410,9 @@ private: case WIDX_TITLE_MUSIC_DROPDOWN: { auto titleMusic = static_cast(dropdownIndex); - if (!IsRCT1TitleMusicAvailable() && dropdownIndex != 0) + if (!IsRCT1TitleMusicAvailable() && dropdownIndex >= EnumValue(TitleMusicKind::RCT1)) { - titleMusic = TitleMusicKind::RCT2; + titleMusic = static_cast(EnumValue(titleMusic) + 1); } gConfigSound.TitleMusic = titleMusic; @@ -2147,10 +2149,8 @@ private: }; static constexpr StringId TitleMusicNames[] = { - STR_OPTIONS_MUSIC_VALUE_NONE, - STR_ROLLERCOASTER_TYCOON_1_DROPDOWN, - STR_ROLLERCOASTER_TYCOON_2_DROPDOWN, - STR_OPTIONS_MUSIC_VALUE_RANDOM, + STR_OPTIONS_MUSIC_VALUE_NONE, STR_ROLLERCOASTER_TYCOON_1_DROPDOWN, STR_ROLLERCOASTER_TYCOON_2_DROPDOWN, + STR_OPENRCT2_DROPDOWN, STR_OPTIONS_MUSIC_VALUE_RANDOM, }; static constexpr StringId FullscreenModeNames[] = { diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index e9ef18924c..fbcbccefa1 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -269,9 +269,9 @@ namespace OpenRCT2::Audio } } - static ObjectEntryDescriptor GetTitleMusicDescriptor() + static ObjectEntryDescriptor GetTitleMusicDescriptor(TitleMusicKind kind) { - switch (gConfigSound.TitleMusic) + switch (kind) { default: return {}; @@ -279,13 +279,27 @@ namespace OpenRCT2::Audio return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT1Title); case TitleMusicKind::RCT2: return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT2Title); + case TitleMusicKind::OpenRCT2: + return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::OpenRCT2Title); case TitleMusicKind::Random: - return ObjectEntryDescriptor( - ObjectType::Audio, - (UtilRand() & 1) ? AudioObjectIdentifiers::RCT1Title : AudioObjectIdentifiers::RCT2Title); + switch (UtilRand() % 3) + { + case 0: + return GetTitleMusicDescriptor(TitleMusicKind::RCT1); + case 1: + return GetTitleMusicDescriptor(TitleMusicKind::RCT2); + case 2: + default: + return GetTitleMusicDescriptor(TitleMusicKind::OpenRCT2); + } } } + static ObjectEntryDescriptor GetTitleMusicDescriptor() + { + return GetTitleMusicDescriptor(gConfigSound.TitleMusic); + } + void PlayTitleMusic() { if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || gIntroState != IntroState::None) diff --git a/src/openrct2/audio/audio.h b/src/openrct2/audio/audio.h index 34849ad5f2..583d6019ff 100644 --- a/src/openrct2/audio/audio.h +++ b/src/openrct2/audio/audio.h @@ -142,6 +142,7 @@ namespace OpenRCT2::Audio constexpr std::string_view RCT2Base = "rct2.audio.base"; constexpr std::string_view RCTCBase = "rct2.audio.base.rctc"; constexpr std::string_view RCT2Title = "rct2.audio.title"; + constexpr std::string_view OpenRCT2Title = "openrct2.audio.title"; constexpr std::string_view RCT2Circus = "rct2.audio.circus"; constexpr std::string_view OpenRCT2Additional = "openrct2.audio.additional"; } // namespace AudioObjectIdentifiers diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index 9992cf0f49..b014976130 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -253,6 +253,7 @@ enum class TitleMusicKind : int32_t None, RCT1, RCT2, + OpenRCT2, Random }; diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 5ae21eff8b..8622a89686 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -3990,6 +3990,8 @@ enum : uint16_t STR_OPTION_REVERSE_TRAINS_TIP = 6584, STR_RIDE_SET_VEHICLE_REVERSED_FAIL = 6585, + STR_OPENRCT2_DROPDOWN = 6586, + // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working /* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings }; From 6d84a0681e3da77f8ec808526a5a99b5b8b053ad Mon Sep 17 00:00:00 2001 From: Karst Date: Fri, 5 May 2023 16:20:59 +0200 Subject: [PATCH 2/7] Add about info --- contributors.md | 7 +++++++ data/language/en-GB.txt | 2 ++ distribution/changelog.txt | 1 + src/openrct2-ui/windows/About.cpp | 6 ++++-- src/openrct2/localisation/StringIds.h | 2 ++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/contributors.md b/contributors.md index 4d79b03284..9df1200171 100644 --- a/contributors.md +++ b/contributors.md @@ -277,6 +277,13 @@ The following people are not part of the development team, but have been contrib ## Music * Karst "Jalmaan" van Galen Last (AuraSpecs) * (Flyxxpy) +* Jan Büchner (Greyfade) +* Allister Brimble +* Herman Riddering + +## Sound Effects +* Karst van Galen Last (AuraSpecs) +* (ThatGuyYouKnow) ## RollerCoaster Tycoon 2 credits Design and programming by Chris Sawyer diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index ffe238ef46..43b81094af 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3692,6 +3692,8 @@ STR_6584 :Select to run trains backwards STR_6585 :Can’t make changes… STR_6586 :OpenRCT2 +STR_6587 :The OpenRCT2 Title Theme is a work of Allister Brimble,{NEWLINE}licenced CC BY-SA 4.0. +STR_6588 :Thanks to Herman Riddering for allowing us to record the 35er Voigt. ############# # Scenarios # diff --git a/distribution/changelog.txt b/distribution/changelog.txt index c4600d5484..d2c814d257 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,5 +1,6 @@ 0.4.6 (in development) ------------------------------------------------------------------------ +- Feature: [OpenMusic#41] Official Title Theme by Allister Brimble. - Improved: [#20200] Allow audio files to play to up to 44100hz sample rate (from 22050hz). - Change: [#20110] Fix a few RCT1 build height parity discrepancies. - Fix: [#19823] Parkobj, disallow overriding objects of different object types. diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index 188abd94cf..1230ea7c35 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -74,10 +74,12 @@ static Widget _windowAboutOpenRCT2Widgets[] = { MakeWidget({168, 115 + 40}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CHANGELOG_ELLIPSIS), // changelog button MakeWidget({168, 115 + 60}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_JOIN_DISCORD ), // "join discord" button MakeWidget({10, 250}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION_2), // More info - MakeWidget({10, 300}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION_3), // Copyright - MakeWidget({10, 350}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_SPECIAL_THANKS_1), // Special Thanks + MakeWidget({10, 280}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_DESCRIPTION_3), // Copyright + MakeWidget({10, 360}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_SPECIAL_THANKS_1), // Special Thanks MakeWidget({10, 375}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_SPECIAL_THANKS_2), // Company names MakeWidget({168, 115 + 80}, {200, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_CONTRIBUTORS_WINDOW_BUTTON), // "contributors" button + MakeWidget({10, 310}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_OPENRCT2_TITLE), // Title Theme + MakeWidget({10, 338}, {WW - 20, 50}, WindowWidgetType::LabelCentred, WindowColour::Secondary, STR_ABOUT_FAIRGROUND_ORGAN), // Fairground organ WIDGETS_END, }; diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 8622a89686..36054623c9 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -3991,6 +3991,8 @@ enum : uint16_t STR_RIDE_SET_VEHICLE_REVERSED_FAIL = 6585, STR_OPENRCT2_DROPDOWN = 6586, + STR_ABOUT_OPENRCT2_TITLE = 6587, + STR_ABOUT_FAIRGROUND_ORGAN = 6588, // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working /* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings From 0a8c80434706b3eb88b3f0c7cbcd37f38bfcb257 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Mon, 15 May 2023 00:10:45 +0200 Subject: [PATCH 3/7] Make the OpenRCT2 theme song the default --- src/openrct2-ui/windows/Options.cpp | 75 ++++++++++++----------------- src/openrct2/config/Config.cpp | 5 +- src/openrct2/config/Config.h | 4 +- 3 files changed, 37 insertions(+), 47 deletions(-) diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 93e6b272fc..172f485e31 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -1349,34 +1349,22 @@ private: break; case WIDX_TITLE_MUSIC_DROPDOWN: { - if (!IsRCT1TitleMusicAvailable()) + const bool rct1MusicThemeIsAvailable = IsRCT1TitleMusicAvailable(); + int32_t numItems{}; + int32_t checkedIndex{}; + for (auto theme : TitleThemeOptions) { - // Only show None and RCT2 - int32_t numItems{}; + if (theme.Kind == TitleMusicKind::RCT1 && !rct1MusicThemeIsAvailable) + continue; + + if (gConfigSound.TitleMusic == theme.Kind) + checkedIndex = numItems; + gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[numItems++].Args = TitleMusicNames[0]; - gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[numItems++].Args = TitleMusicNames[2]; - gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[numItems++].Args = TitleMusicNames[3]; - ShowDropdown(widget, numItems); - if (gConfigSound.TitleMusic == TitleMusicKind::None) - Dropdown::SetChecked(0, true); - else if (gConfigSound.TitleMusic == TitleMusicKind::RCT2) - Dropdown::SetChecked(1, true); - } - else - { - // Show None, RCT1, RCT2 and random - int32_t numItems{}; - for (auto musicName : TitleMusicNames) - { - gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[numItems++].Args = musicName; - } - ShowDropdown(widget, numItems); - Dropdown::SetChecked(EnumValue(gConfigSound.TitleMusic), true); + gDropdownItems[numItems++].Args = theme.Name; } + ShowDropdown(widget, numItems); + Dropdown::SetChecked(checkedIndex, true); break; } } @@ -1409,18 +1397,12 @@ private: break; case WIDX_TITLE_MUSIC_DROPDOWN: { - auto titleMusic = static_cast(dropdownIndex); - if (!IsRCT1TitleMusicAvailable() && dropdownIndex >= EnumValue(TitleMusicKind::RCT1)) - { - titleMusic = static_cast(EnumValue(titleMusic) + 1); - } - - gConfigSound.TitleMusic = titleMusic; + gConfigSound.TitleMusic = TitleThemeOptions[dropdownIndex].Kind; ConfigSaveDefault(); Invalidate(); OpenRCT2::Audio::StopTitleMusic(); - if (titleMusic != TitleMusicKind::None) + if (gConfigSound.TitleMusic != TitleMusicKind::None) { OpenRCT2::Audio::PlayTitleMusic(); } @@ -1467,14 +1449,14 @@ private: return { 500, 0 }; } - StringId GetTitleMusicName() + StringId GetTitleMusicName() const { - auto index = EnumValue(gConfigSound.TitleMusic); - if (index < 0 || static_cast(index) >= std::size(TitleMusicNames)) - { - index = EnumValue(TitleMusicKind::None); - } - return TitleMusicNames[index]; + auto theme = std::find_if(std::begin(TitleThemeOptions), std::end(TitleThemeOptions), [](auto&& theme) { + return gConfigSound.TitleMusic == theme.Kind; + }); + if (theme != std::end(TitleThemeOptions)) + return theme->Name; + return STR_OPENRCT2_DROPDOWN; } void AudioPrepareDraw() @@ -2148,9 +2130,16 @@ private: STR_SAVE_EVERY_30MINUTES, STR_SAVE_EVERY_HOUR, STR_SAVE_NEVER, }; - static constexpr StringId TitleMusicNames[] = { - STR_OPTIONS_MUSIC_VALUE_NONE, STR_ROLLERCOASTER_TYCOON_1_DROPDOWN, STR_ROLLERCOASTER_TYCOON_2_DROPDOWN, - STR_OPENRCT2_DROPDOWN, STR_OPTIONS_MUSIC_VALUE_RANDOM, + static constexpr struct + { + TitleMusicKind Kind; + StringId Name; + } TitleThemeOptions[] = { + { TitleMusicKind::None, STR_OPTIONS_MUSIC_VALUE_NONE }, + { TitleMusicKind::OpenRCT2, STR_OPENRCT2_DROPDOWN }, + { TitleMusicKind::RCT1, STR_ROLLERCOASTER_TYCOON_1_DROPDOWN }, + { TitleMusicKind::RCT2, STR_ROLLERCOASTER_TYCOON_2_DROPDOWN }, + { TitleMusicKind::Random, STR_OPTIONS_MUSIC_VALUE_RANDOM }, }; static constexpr StringId FullscreenModeNames[] = { diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index d6caff1787..1e75cff005 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -362,7 +362,8 @@ namespace Config model->Device = reader->GetString("audio_device", ""); model->MasterSoundEnabled = reader->GetBoolean("master_sound", true); model->MasterVolume = reader->GetInt32("master_volume", 100); - model->TitleMusic = static_cast(reader->GetInt32("title_music", EnumValue(TitleMusicKind::RCT2))); + model->TitleMusic = static_cast( + reader->GetInt32("title_theme", EnumValue(TitleMusicKind::OpenRCT2))); model->SoundEnabled = reader->GetBoolean("sound", true); model->SoundVolume = reader->GetInt32("sound_volume", 100); model->RideMusicEnabled = reader->GetBoolean("ride_music", true); @@ -378,7 +379,7 @@ namespace Config writer->WriteString("audio_device", model->Device); writer->WriteBoolean("master_sound", model->MasterSoundEnabled); writer->WriteInt32("master_volume", model->MasterVolume); - writer->WriteInt32("title_music", EnumValue(model->TitleMusic)); + writer->WriteInt32("title_theme", EnumValue(model->TitleMusic)); writer->WriteBoolean("sound", model->SoundEnabled); writer->WriteInt32("sound_volume", model->SoundVolume); writer->WriteBoolean("ride_music", model->RideMusicEnabled); diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index b014976130..5dd801bfba 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -251,10 +251,10 @@ enum class MeasurementFormat : int32_t enum class TitleMusicKind : int32_t { None, + Random, + OpenRCT2, RCT1, RCT2, - OpenRCT2, - Random }; extern GeneralConfiguration gConfigGeneral; From edd31163b057ff6fbe066228d60c65f3f8f87a7b Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Mon, 15 May 2023 00:42:47 +0200 Subject: [PATCH 4/7] Refactor GetTitleMusicDescriptor back to one function --- src/openrct2/audio/Audio.cpp | 53 ++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index fbcbccefa1..9ff0e79b76 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -269,35 +269,34 @@ namespace OpenRCT2::Audio } } - static ObjectEntryDescriptor GetTitleMusicDescriptor(TitleMusicKind kind) - { - switch (kind) - { - default: - return {}; - case TitleMusicKind::RCT1: - return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT1Title); - case TitleMusicKind::RCT2: - return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT2Title); - case TitleMusicKind::OpenRCT2: - return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::OpenRCT2Title); - case TitleMusicKind::Random: - switch (UtilRand() % 3) - { - case 0: - return GetTitleMusicDescriptor(TitleMusicKind::RCT1); - case 1: - return GetTitleMusicDescriptor(TitleMusicKind::RCT2); - case 2: - default: - return GetTitleMusicDescriptor(TitleMusicKind::OpenRCT2); - } - } - } - static ObjectEntryDescriptor GetTitleMusicDescriptor() { - return GetTitleMusicDescriptor(gConfigSound.TitleMusic); + static constexpr std::array selectableAudioIds{ + AudioObjectIdentifiers::OpenRCT2Title, + AudioObjectIdentifiers::RCT1Title, + AudioObjectIdentifiers::RCT2Title, + }; + int32_t IdIndex{}; + switch (gConfigSound.TitleMusic) + { + default: + case TitleMusicKind::OpenRCT2: + IdIndex = 0; + break; + case TitleMusicKind::RCT1: + IdIndex = 1; + break; + case TitleMusicKind::RCT2: + IdIndex = 2; + break; + case TitleMusicKind::Random: + IdIndex = UtilRand() % std::size(selectableAudioIds); + break; + case TitleMusicKind::None: + return {}; + } + + return ObjectEntryDescriptor(ObjectType::Audio, selectableAudioIds[IdIndex]); } void PlayTitleMusic() From 286d116026e4aa49974d1fc4e1189fca53adbac1 Mon Sep 17 00:00:00 2001 From: Karst Date: Mon, 15 May 2023 20:15:19 +0200 Subject: [PATCH 5/7] Update OpenMusic to v1.3.1 Co-Authored-By: Hielke Morsink Co-Authored-By: deurklink <6469413+Deurklink@users.noreply.github.com> Co-Authored-By: Ted John --- CMakeLists.txt | 4 ++-- openrct2.proj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78307ec3de..7380c4104b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,9 +72,9 @@ set(OPENSFX_VERSION "1.0.3") set(OPENSFX_URL "https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v${OPENSFX_VERSION}/opensound.zip") set(OPENSFX_SHA1 "ffec5a97bd5035860c4c9a43fe32cf51886478e3") -set(OPENMSX_VERSION "1.3.0") +set(OPENMSX_VERSION "1.3.1") set(OPENMSX_URL "https://github.com/OpenRCT2/OpenMusic/releases/download/v${OPENMSX_VERSION}/openmusic.zip") -set(OPENMSX_SHA1 "b0cec998a3679f1cde17d91f2508ec4923c1a25c") +set(OPENMSX_SHA1 "cb7b05af97aaf7949fb509063d45df6613f20521") set(REPLAYS_VERSION "0.0.78") set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip") diff --git a/openrct2.proj b/openrct2.proj index 8d84896507..4a232ac015 100644 --- a/openrct2.proj +++ b/openrct2.proj @@ -49,8 +49,8 @@ 02ddf6c685a2da8bac98a57b34be95d63192443d https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.3/opensound.zip ffec5a97bd5035860c4c9a43fe32cf51886478e3 - https://github.com/OpenRCT2/OpenMusic/releases/download/v1.3.0/openmusic.zip - b0cec998a3679f1cde17d91f2508ec4923c1a25c + https://github.com/OpenRCT2/OpenMusic/releases/download/v1.3.1/openmusic.zip + cb7b05af97aaf7949fb509063d45df6613f20521 https://github.com/OpenRCT2/replays/releases/download/v0.0.78/replays.zip 31C5D07EED8481D5C6D57F9E4FE9443AAEDE7739 From fd3346b4b3a35f09bcca4eb485ee0a1e91889ddc Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Mon, 15 May 2023 20:57:17 +0200 Subject: [PATCH 6/7] Fix: items after the removed RCT1 theme have wrong index --- src/openrct2-ui/windows/Options.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 172f485e31..b1d019bb0b 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -1397,6 +1397,14 @@ private: break; case WIDX_TITLE_MUSIC_DROPDOWN: { + // HACK: When RCT1 is not available, it's not in the dropdown, so indices higher than it should be incremented + const bool rct1MusicThemeIsAvailable = IsRCT1TitleMusicAvailable(); + for (size_t i = 0; i < std::size(TitleThemeOptions) && static_cast(i) <= dropdownIndex; i++) + { + if (TitleThemeOptions[i].Kind == TitleMusicKind::RCT1 && !rct1MusicThemeIsAvailable) + dropdownIndex++; + } + gConfigSound.TitleMusic = TitleThemeOptions[dropdownIndex].Kind; ConfigSaveDefault(); Invalidate(); From 27e06ef7b798fbe3c97deb0824906c75e78ea50f Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Mon, 15 May 2023 21:30:06 +0200 Subject: [PATCH 7/7] Fix naming collision --- src/openrct2-ui/windows/Options.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index b1d019bb0b..2c395aa061 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -1459,8 +1459,8 @@ private: StringId GetTitleMusicName() const { - auto theme = std::find_if(std::begin(TitleThemeOptions), std::end(TitleThemeOptions), [](auto&& theme) { - return gConfigSound.TitleMusic == theme.Kind; + auto theme = std::find_if(std::begin(TitleThemeOptions), std::end(TitleThemeOptions), [](auto&& option) { + return gConfigSound.TitleMusic == option.Kind; }); if (theme != std::end(TitleThemeOptions)) return theme->Name;