#pragma once #include #include #include #include namespace wowee { namespace pipeline { class AssetManager; } namespace audio { class CombatSoundManager { public: CombatSoundManager() = default; ~CombatSoundManager() = default; // Initialization bool initialize(pipeline::AssetManager* assets); void shutdown(); // Volume control void setVolumeScale(float scale); float getVolumeScale() const { return volumeScale_; } // Weapon swing sounds (whoosh sounds before impact) enum class WeaponSize { SMALL, // 1H weapons (daggers, swords, maces) MEDIUM, // 2H weapons (2H swords, axes) LARGE // 2H heavy weapons (polearms, staves) }; void playWeaponSwing(WeaponSize size, bool isCrit = false); void playWeaponMiss(bool twoHanded = false); // Impact sounds (when weapon hits target) enum class ImpactType { FLESH, // Hit unarmored/cloth CHAIN, // Hit chain armor PLATE, // Hit plate armor SHIELD, // Hit shield METAL_WEAPON, // Parry/weapon clash WOOD, // Hit wooden objects STONE // Hit stone/rock }; void playImpact(WeaponSize weaponSize, ImpactType impactType, bool isCrit = false); // Emote sounds void playClap(); // Player character vocals enum class PlayerRace { BLOOD_ELF_MALE, BLOOD_ELF_FEMALE, DRAENEI_MALE, DRAENEI_FEMALE }; void playPlayerAttackGrunt(PlayerRace race); void playPlayerWound(PlayerRace race, bool isCrit = false); void playPlayerDeath(PlayerRace race); private: struct CombatSample { std::string path; std::vector data; bool loaded; }; // Weapon swing sound libraries std::vector swingSmallSounds_; std::vector swingMediumSounds_; std::vector swingLargeSounds_; std::vector swingSmallCritSounds_; std::vector swingMediumCritSounds_; std::vector swingLargeCritSounds_; std::vector missWhoosh1HSounds_; std::vector missWhoosh2HSounds_; // Impact sound libraries (using 1H axe as base - similar across weapon types) std::vector hitFleshSounds_; std::vector hitChainSounds_; std::vector hitPlateSounds_; std::vector hitShieldSounds_; std::vector hitMetalWeaponSounds_; std::vector hitWoodSounds_; std::vector hitStoneSounds_; std::vector hitFleshCritSounds_; std::vector hitChainCritSounds_; std::vector hitPlateCritSounds_; std::vector hitShieldCritSounds_; // Emote sounds std::vector clapSounds_; // Player character vocal libraries std::vector bloodElfMaleAttackSounds_; std::vector bloodElfMaleWoundSounds_; std::vector bloodElfMaleWoundCritSounds_; std::vector bloodElfMaleDeathSounds_; std::vector bloodElfFemaleAttackSounds_; std::vector bloodElfFemaleWoundSounds_; std::vector bloodElfFemaleDeathSounds_; std::vector draeneiMaleAttackSounds_; std::vector draeneiMaleWoundSounds_; std::vector draeneiMaleWoundCritSounds_; std::vector draeneiMaleDeathSounds_; std::vector draeneiFemaleAttackSounds_; std::vector draeneiFemaleWoundSounds_; std::vector draeneiFemaleWoundCritSounds_; std::vector draeneiFemaleDeathSounds_; // State tracking float volumeScale_ = 1.0f; bool initialized_ = false; // Helper methods bool loadSound(const std::string& path, CombatSample& 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