mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Implemented complete UI sound system with 32+ interface sounds: Window sounds (10 types): - Bag open/close (backpack, containers) - Quest log open/close - Character sheet open/close - Auction house open/close - Guild bank open/close Button sounds (2 types): - Interface button clicks - Main menu button clicks Quest sounds (4 types): - Quest activate (new quest accepted) - Quest complete (quest turned in) - Quest failed - Quest update (progress notification) Loot sounds (3 types): - Coin pickup (small/large amounts) - Item loot from creatures Item sounds (6 types): - Drop item on ground - Pickup sounds by item type: bags, books, cloth, food, gems Eating/Drinking (2 types): - Eating food sound - Drinking potion/water sound Special sounds: - Level up fanfare - Error/invalid action feedback - Target select/deselect Technical details: - Loads 32 sound files from Sound\Interface directory - Volume at 0.7 with global scale control - Simple API: playBagOpen(), playQuestComplete(), etc. - Ready for integration with UI systems and game events - Can be hooked to ImGui windows, inventory actions, quest system
131 lines
3.3 KiB
C++
131 lines
3.3 KiB
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <cstdint>
|
|
|
|
namespace wowee {
|
|
namespace pipeline {
|
|
class AssetManager;
|
|
}
|
|
|
|
namespace audio {
|
|
|
|
class UISoundManager {
|
|
public:
|
|
UISoundManager() = default;
|
|
~UISoundManager() = default;
|
|
|
|
// Initialization
|
|
bool initialize(pipeline::AssetManager* assets);
|
|
void shutdown();
|
|
|
|
// Volume control
|
|
void setVolumeScale(float scale);
|
|
|
|
// Window sounds
|
|
void playBagOpen();
|
|
void playBagClose();
|
|
void playQuestLogOpen();
|
|
void playQuestLogClose();
|
|
void playCharacterSheetOpen();
|
|
void playCharacterSheetClose();
|
|
void playAuctionHouseOpen();
|
|
void playAuctionHouseClose();
|
|
void playGuildBankOpen();
|
|
void playGuildBankClose();
|
|
|
|
// Button sounds
|
|
void playButtonClick();
|
|
void playMenuButtonClick();
|
|
|
|
// Quest sounds
|
|
void playQuestActivate();
|
|
void playQuestComplete();
|
|
void playQuestFailed();
|
|
void playQuestUpdate();
|
|
|
|
// Loot sounds
|
|
void playLootCoinSmall();
|
|
void playLootCoinLarge();
|
|
void playLootItem();
|
|
|
|
// Item sounds
|
|
void playDropOnGround();
|
|
void playPickupBag();
|
|
void playPickupBook();
|
|
void playPickupCloth();
|
|
void playPickupFood();
|
|
void playPickupGem();
|
|
|
|
// Eating/drinking
|
|
void playEating();
|
|
void playDrinking();
|
|
|
|
// Level up
|
|
void playLevelUp();
|
|
|
|
// Error/feedback
|
|
void playError();
|
|
void playTargetSelect();
|
|
void playTargetDeselect();
|
|
|
|
private:
|
|
struct UISample {
|
|
std::string path;
|
|
std::vector<uint8_t> data;
|
|
bool loaded;
|
|
};
|
|
|
|
// Sound libraries
|
|
std::vector<UISample> bagOpenSounds_;
|
|
std::vector<UISample> bagCloseSounds_;
|
|
std::vector<UISample> questLogOpenSounds_;
|
|
std::vector<UISample> questLogCloseSounds_;
|
|
std::vector<UISample> characterSheetOpenSounds_;
|
|
std::vector<UISample> characterSheetCloseSounds_;
|
|
std::vector<UISample> auctionOpenSounds_;
|
|
std::vector<UISample> auctionCloseSounds_;
|
|
std::vector<UISample> guildBankOpenSounds_;
|
|
std::vector<UISample> guildBankCloseSounds_;
|
|
|
|
std::vector<UISample> buttonClickSounds_;
|
|
std::vector<UISample> menuButtonSounds_;
|
|
|
|
std::vector<UISample> questActivateSounds_;
|
|
std::vector<UISample> questCompleteSounds_;
|
|
std::vector<UISample> questFailedSounds_;
|
|
std::vector<UISample> questUpdateSounds_;
|
|
|
|
std::vector<UISample> lootCoinSmallSounds_;
|
|
std::vector<UISample> lootCoinLargeSounds_;
|
|
std::vector<UISample> lootItemSounds_;
|
|
|
|
std::vector<UISample> dropSounds_;
|
|
std::vector<UISample> pickupBagSounds_;
|
|
std::vector<UISample> pickupBookSounds_;
|
|
std::vector<UISample> pickupClothSounds_;
|
|
std::vector<UISample> pickupFoodSounds_;
|
|
std::vector<UISample> pickupGemSounds_;
|
|
|
|
std::vector<UISample> eatingSounds_;
|
|
std::vector<UISample> drinkingSounds_;
|
|
|
|
std::vector<UISample> levelUpSounds_;
|
|
|
|
std::vector<UISample> errorSounds_;
|
|
std::vector<UISample> selectTargetSounds_;
|
|
std::vector<UISample> deselectTargetSounds_;
|
|
|
|
// State tracking
|
|
float volumeScale_ = 1.0f;
|
|
bool initialized_ = false;
|
|
|
|
// Helper methods
|
|
bool loadSound(const std::string& path, UISample& sample, pipeline::AssetManager* assets);
|
|
void playSound(const std::vector<UISample>& library);
|
|
};
|
|
|
|
} // namespace audio
|
|
} // namespace wowee
|