mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-02-20 00:04:23 -05:00
- Mute button: small [M] button alongside minimap zoom controls, turns red when active; directly sets AudioEngine master volume to 0, restores on unmute; persists in settings.cfg - Original Soundtrack: checkbox in Settings > Audio that controls whether custom original music tracks (file: prefix) are included in zone music rotation; when disabled, only WoW MPQ tracks play; persists in settings.cfg - ZoneManager.getRandomMusic() now filters file: paths when OST is disabled, falling back to full list if zone has no non-file tracks
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <cstdint>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
namespace wowee {
|
|
namespace game {
|
|
|
|
struct ZoneInfo {
|
|
uint32_t id;
|
|
std::string name;
|
|
std::vector<std::string> musicPaths; // MPQ paths to music files
|
|
};
|
|
|
|
class ZoneManager {
|
|
public:
|
|
void initialize();
|
|
|
|
uint32_t getZoneId(int tileX, int tileY) const;
|
|
const ZoneInfo* getZoneInfo(uint32_t zoneId) const;
|
|
std::string getRandomMusic(uint32_t zoneId);
|
|
std::vector<std::string> getAllMusicPaths() const;
|
|
|
|
// When false, file: (original soundtrack) tracks are excluded from the pool
|
|
void setUseOriginalSoundtrack(bool use) { useOriginalSoundtrack_ = use; }
|
|
bool getUseOriginalSoundtrack() const { return useOriginalSoundtrack_; }
|
|
|
|
private:
|
|
// tile key = tileX * 100 + tileY
|
|
std::unordered_map<int, uint32_t> tileToZone;
|
|
std::unordered_map<uint32_t, ZoneInfo> zones;
|
|
std::string lastPlayedMusic_;
|
|
bool useOriginalSoundtrack_ = true;
|
|
};
|
|
|
|
} // namespace game
|
|
} // namespace wowee
|