mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
refactor: decouple Application singleton by extracting core subsystems and updating interfaces
- Add `audio::AudioCoordinator` interface and implementation - Modify `Application` to reduce singleton usage and move controller responsibilities: - application.hpp - application.cpp - Update UI and audio headers/sources: - game_screen.hpp - game_screen.cpp - ui_manager.hpp - audio_coordinator.hpp - audio_coordinator.cpp - Project config touched: - CMakeLists.txt
This commit is contained in:
parent
9b38e64f84
commit
d43397163e
8 changed files with 179 additions and 3 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include <unordered_map>
|
||||
|
||||
namespace wowee {
|
||||
namespace core { class AppearanceComposer; }
|
||||
namespace pipeline { class AssetManager; }
|
||||
namespace rendering { class Renderer; }
|
||||
namespace ui {
|
||||
|
|
@ -50,7 +51,12 @@ public:
|
|||
void saveSettings();
|
||||
void loadSettings();
|
||||
|
||||
// Dependency injection for extracted classes (Phase A singleton breaking)
|
||||
void setAppearanceComposer(core::AppearanceComposer* ac) { appearanceComposer_ = ac; }
|
||||
|
||||
private:
|
||||
// Injected dependencies (replaces getInstance() calls)
|
||||
core::AppearanceComposer* appearanceComposer_ = nullptr;
|
||||
// Chat panel (extracted from GameScreen — owns all chat state and rendering)
|
||||
ChatPanel chatPanel_;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue