mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 04:33:51 +00:00
Add original music to login rotation and zone playlists
11 original tracks in assets/Original Music/ now play on the login screen and in thematically matched zones across Eastern Kingdoms and Kalimdor. Added crossfadeToFile to MusicManager for local file playback during zone transitions. New zones: Tirisfal, Undercity, Barrens, STV, Duskwood, Burning Steppes, Searing Gorge, Ironforge, Loch Modan, Orgrimmar, Durotar, Mulgore, Thunder Bluff, Darkshore, Teldrassil, Darnassus.
This commit is contained in:
parent
9fc41d6f30
commit
d2b46d410a
16 changed files with 392 additions and 17 deletions
|
|
@ -214,25 +214,40 @@ void AuthScreen::render(auth::AuthHandler& authHandler) {
|
|||
music->update(ImGui::GetIO().DeltaTime);
|
||||
if (!music->isPlaying()) {
|
||||
static std::mt19937 rng(std::random_device{}());
|
||||
static const std::array<const char*, 3> kLoginTracks = {
|
||||
// Tracks in assets/ root
|
||||
static const std::array<const char*, 1> kRootTracks = {
|
||||
"Raise the Mug, Sound the Warcry.mp3",
|
||||
};
|
||||
// Tracks in assets/Original Music/
|
||||
static const std::array<const char*, 11> kOriginalTracks = {
|
||||
"Gold on the Tide in Booty Bay.mp3",
|
||||
"Lanterns Over Lordaeron.mp3",
|
||||
"Loot the Dogs.mp3",
|
||||
"One More Pull.mp3",
|
||||
"Roll Need Greed.mp3",
|
||||
"RunBackPolka.mp3",
|
||||
"The Barrens Has No End.mp3",
|
||||
"The Bone Collector.mp3",
|
||||
"Wanderwewill.mp3",
|
||||
"Gold on the Tide in Booty Bay.mp3"
|
||||
"WHO PULLED_.mp3",
|
||||
"You No Take Candle!.mp3",
|
||||
};
|
||||
|
||||
std::vector<std::string> availableTracks;
|
||||
availableTracks.reserve(kLoginTracks.size());
|
||||
for (const char* track : kLoginTracks) {
|
||||
std::filesystem::path localPath = std::filesystem::path("assets") / track;
|
||||
if (std::filesystem::exists(localPath)) {
|
||||
availableTracks.push_back(localPath.string());
|
||||
continue;
|
||||
}
|
||||
|
||||
std::filesystem::path cwdPath = std::filesystem::current_path() / "assets" / track;
|
||||
if (std::filesystem::exists(cwdPath)) {
|
||||
availableTracks.push_back(cwdPath.string());
|
||||
auto tryAddTrack = [&](const std::filesystem::path& base, const char* track) {
|
||||
std::filesystem::path p = base / track;
|
||||
if (std::filesystem::exists(p)) {
|
||||
availableTracks.push_back(p.string());
|
||||
}
|
||||
};
|
||||
for (const char* track : kRootTracks) {
|
||||
tryAddTrack("assets", track);
|
||||
if (availableTracks.empty())
|
||||
tryAddTrack(std::filesystem::current_path() / "assets", track);
|
||||
}
|
||||
for (const char* track : kOriginalTracks) {
|
||||
tryAddTrack(std::filesystem::path("assets") / "Original Music", track);
|
||||
tryAddTrack(std::filesystem::current_path() / "assets" / "Original Music", track);
|
||||
}
|
||||
|
||||
if (!availableTracks.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue