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:
Paul 2026-04-01 20:38:37 +03:00
parent 9b38e64f84
commit d43397163e
8 changed files with 179 additions and 3 deletions

View file

@ -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_;