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

@ -13,7 +13,7 @@ union SDL_Event;
namespace wowee {
// Forward declarations
namespace core { class Window; enum class AppState; }
namespace core { class Window; class AppearanceComposer; enum class AppState; }
namespace auth { class AuthHandler; }
namespace game { class GameHandler; }
@ -69,6 +69,11 @@ public:
CharacterScreen& getCharacterScreen() { return *characterScreen; }
GameScreen& getGameScreen() { return *gameScreen; }
// Dependency injection forwarding (Phase A singleton breaking)
void setAppearanceComposer(core::AppearanceComposer* ac) {
if (gameScreen) gameScreen->setAppearanceComposer(ac);
}
private:
core::Window* window = nullptr;