mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 10:02:27 +01:00
Add OpenRCT2 official title music
Co-Authored-By: Ted John <intelorca@gmail.com>
This commit is contained in:
@@ -3691,6 +3691,8 @@ STR_6583 :{WINDOW_COLOUR_2}Reversed Trains
|
|||||||
STR_6584 :Select to run trains backwards
|
STR_6584 :Select to run trains backwards
|
||||||
STR_6585 :Can’t make changes…
|
STR_6585 :Can’t make changes…
|
||||||
|
|
||||||
|
STR_6586 :OpenRCT2
|
||||||
|
|
||||||
#############
|
#############
|
||||||
# Scenarios #
|
# Scenarios #
|
||||||
################
|
################
|
||||||
|
|||||||
@@ -1357,6 +1357,8 @@ private:
|
|||||||
gDropdownItems[numItems++].Args = TitleMusicNames[0];
|
gDropdownItems[numItems++].Args = TitleMusicNames[0];
|
||||||
gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL;
|
gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL;
|
||||||
gDropdownItems[numItems++].Args = TitleMusicNames[2];
|
gDropdownItems[numItems++].Args = TitleMusicNames[2];
|
||||||
|
gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL;
|
||||||
|
gDropdownItems[numItems++].Args = TitleMusicNames[3];
|
||||||
ShowDropdown(widget, numItems);
|
ShowDropdown(widget, numItems);
|
||||||
if (gConfigSound.TitleMusic == TitleMusicKind::None)
|
if (gConfigSound.TitleMusic == TitleMusicKind::None)
|
||||||
Dropdown::SetChecked(0, true);
|
Dropdown::SetChecked(0, true);
|
||||||
@@ -1408,9 +1410,9 @@ private:
|
|||||||
case WIDX_TITLE_MUSIC_DROPDOWN:
|
case WIDX_TITLE_MUSIC_DROPDOWN:
|
||||||
{
|
{
|
||||||
auto titleMusic = static_cast<TitleMusicKind>(dropdownIndex);
|
auto titleMusic = static_cast<TitleMusicKind>(dropdownIndex);
|
||||||
if (!IsRCT1TitleMusicAvailable() && dropdownIndex != 0)
|
if (!IsRCT1TitleMusicAvailable() && dropdownIndex >= EnumValue(TitleMusicKind::RCT1))
|
||||||
{
|
{
|
||||||
titleMusic = TitleMusicKind::RCT2;
|
titleMusic = static_cast<TitleMusicKind>(EnumValue(titleMusic) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
gConfigSound.TitleMusic = titleMusic;
|
gConfigSound.TitleMusic = titleMusic;
|
||||||
@@ -2147,10 +2149,8 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
static constexpr StringId TitleMusicNames[] = {
|
static constexpr StringId TitleMusicNames[] = {
|
||||||
STR_OPTIONS_MUSIC_VALUE_NONE,
|
STR_OPTIONS_MUSIC_VALUE_NONE, STR_ROLLERCOASTER_TYCOON_1_DROPDOWN, STR_ROLLERCOASTER_TYCOON_2_DROPDOWN,
|
||||||
STR_ROLLERCOASTER_TYCOON_1_DROPDOWN,
|
STR_OPENRCT2_DROPDOWN, STR_OPTIONS_MUSIC_VALUE_RANDOM,
|
||||||
STR_ROLLERCOASTER_TYCOON_2_DROPDOWN,
|
|
||||||
STR_OPTIONS_MUSIC_VALUE_RANDOM,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr StringId FullscreenModeNames[] = {
|
static constexpr StringId FullscreenModeNames[] = {
|
||||||
|
|||||||
@@ -269,9 +269,9 @@ namespace OpenRCT2::Audio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ObjectEntryDescriptor GetTitleMusicDescriptor()
|
static ObjectEntryDescriptor GetTitleMusicDescriptor(TitleMusicKind kind)
|
||||||
{
|
{
|
||||||
switch (gConfigSound.TitleMusic)
|
switch (kind)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
@@ -279,13 +279,27 @@ namespace OpenRCT2::Audio
|
|||||||
return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT1Title);
|
return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT1Title);
|
||||||
case TitleMusicKind::RCT2:
|
case TitleMusicKind::RCT2:
|
||||||
return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT2Title);
|
return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::RCT2Title);
|
||||||
|
case TitleMusicKind::OpenRCT2:
|
||||||
|
return ObjectEntryDescriptor(ObjectType::Audio, AudioObjectIdentifiers::OpenRCT2Title);
|
||||||
case TitleMusicKind::Random:
|
case TitleMusicKind::Random:
|
||||||
return ObjectEntryDescriptor(
|
switch (UtilRand() % 3)
|
||||||
ObjectType::Audio,
|
{
|
||||||
(UtilRand() & 1) ? AudioObjectIdentifiers::RCT1Title : AudioObjectIdentifiers::RCT2Title);
|
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()
|
void PlayTitleMusic()
|
||||||
{
|
{
|
||||||
if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || gIntroState != IntroState::None)
|
if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || gIntroState != IntroState::None)
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ namespace OpenRCT2::Audio
|
|||||||
constexpr std::string_view RCT2Base = "rct2.audio.base";
|
constexpr std::string_view RCT2Base = "rct2.audio.base";
|
||||||
constexpr std::string_view RCTCBase = "rct2.audio.base.rctc";
|
constexpr std::string_view RCTCBase = "rct2.audio.base.rctc";
|
||||||
constexpr std::string_view RCT2Title = "rct2.audio.title";
|
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 RCT2Circus = "rct2.audio.circus";
|
||||||
constexpr std::string_view OpenRCT2Additional = "openrct2.audio.additional";
|
constexpr std::string_view OpenRCT2Additional = "openrct2.audio.additional";
|
||||||
} // namespace AudioObjectIdentifiers
|
} // namespace AudioObjectIdentifiers
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ enum class TitleMusicKind : int32_t
|
|||||||
None,
|
None,
|
||||||
RCT1,
|
RCT1,
|
||||||
RCT2,
|
RCT2,
|
||||||
|
OpenRCT2,
|
||||||
Random
|
Random
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3990,6 +3990,8 @@ enum : uint16_t
|
|||||||
STR_OPTION_REVERSE_TRAINS_TIP = 6584,
|
STR_OPTION_REVERSE_TRAINS_TIP = 6584,
|
||||||
STR_RIDE_SET_VEHICLE_REVERSED_FAIL = 6585,
|
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
|
// 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
|
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user