#pragma once #include #include #include #include namespace wowee { namespace pipeline { class AssetManager; } namespace audio { class SpellSoundManager { public: SpellSoundManager() = default; ~SpellSoundManager() = default; // Initialization bool initialize(pipeline::AssetManager* assets); void shutdown(); // Volume control void setVolumeScale(float scale); float getVolumeScale() const { return volumeScale_; } // Magic school types enum class MagicSchool { FIRE, FROST, HOLY, NATURE, SHADOW, ARCANE, PHYSICAL // Non-magical abilities }; // Spell power level enum class SpellPower { LOW, // Weak spells, low level MEDIUM, // Standard spells HIGH // Powerful spells }; // Spell casting sounds void playPrecast(MagicSchool school, SpellPower power); // Channeling/preparation void playCast(MagicSchool school); // When spell fires void playImpact(MagicSchool school, SpellPower power); // When spell hits target // Specific spell sounds void playFireball(); void playFrostbolt(); void playLightningBolt(); void playHeal(); void playShadowBolt(); private: struct SpellSample { std::string path; std::vector data; bool loaded; }; // Precast sound libraries (channeling) std::vector precastFireLowSounds_; std::vector precastFireMediumSounds_; std::vector precastFireHighSounds_; std::vector precastFrostLowSounds_; std::vector precastFrostMediumSounds_; std::vector precastFrostHighSounds_; std::vector precastHolyLowSounds_; std::vector precastHolyMediumSounds_; std::vector precastHolyHighSounds_; std::vector precastNatureLowSounds_; std::vector precastNatureMediumSounds_; std::vector precastNatureHighSounds_; std::vector precastShadowLowSounds_; std::vector precastShadowMediumSounds_; std::vector precastShadowHighSounds_; std::vector precastArcaneSounds_; // Cast sound libraries (spell release) std::vector castFireSounds_; std::vector castFrostSounds_; std::vector castHolySounds_; std::vector castNatureSounds_; std::vector castShadowSounds_; // Impact sound libraries (spell hits) std::vector impactFireballSounds_; std::vector impactBlizzardSounds_; std::vector impactHolySounds_; std::vector impactArcaneMissileSounds_; // State tracking float volumeScale_ = 1.0f; bool initialized_ = false; // Helper methods bool loadSound(const std::string& path, SpellSample& sample, pipeline::AssetManager* assets); void playSound(const std::vector& library, float volumeMultiplier = 1.0f); void playRandomSound(const std::vector& library, float volumeMultiplier = 1.0f); }; } // namespace audio } // namespace wowee