feat(main): activa SDL_MAIN_USE_CALLBACKS

main.cpp queda amb les 4 callbacks de SDL3: AppInit construeix el
Director, AppEvent enruta cada event a handleEvent(), AppIterate crida
iterate(), AppQuit reabsorbeix la propietat amb unique_ptr.
El Director::run() i el bucle while interns desapareixen; el bootstrap
de SDLManager/Audio/Context/DebugOverlay/Notifier viu ara al final del
constructor. SDL_Quit() ja no es crida explícitament — SDL ho fa
després de SDL_AppQuit.
This commit is contained in:
2026-05-22 12:45:12 +02:00
parent 6b8f6a267d
commit be3d696f60
3 changed files with 81 additions and 98 deletions
-3
View File
@@ -23,9 +23,6 @@ class Director {
Director(int argc, char* argv[]);
~Director();
// Bucle principal del juego.
auto run() -> int;
// Una iteració del bucle: pivot d'escena si cal, delta time, update i
// render. Retorna SDL_APP_CONTINUE per seguir, SDL_APP_SUCCESS si vol
// sortir net, SDL_APP_FAILURE si no es pot recuperar.