- createSystemFolder() adaptat per Emscripten (MEMFS, sense pwd.h/unistd.h)
- initOptions() amb windowSize=1 i videoMode=0 per Emscripten
- CMakeLists.txt: SDL3 via FetchContent per Emscripten, --preload-file data
- Makefile: target wasm amb Docker (emscripten/emsdk)
- Build de Linux verificat, segueix funcionant correctament
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Demo ja no entra en pausa ni game over (redirigeix a instruccions)
- Perdre el focus de la finestra només pausa durant el joc actiu (no en demo, game over ni pausa)
- Demo gestionat amb save/restore de section->name per evitar transició del Director
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- main.cpp reescrit amb SDL_MAIN_USE_CALLBACKS
- Director convertit a màquina d'estats amb iterate() i handleEvent()
- Seccions (Logo, Intro, Title, Game) amb iterate() i handleEvent()
- Events SDL enrutats via SDL_AppEvent → Director → secció activa
- Eliminat SDL_PollEvent de iterate(), events via handleEvent()
- Transicions entre seccions gestionades per handleSectionTransition()
- Instructions i Game (demo) delegats frame a frame des de Title
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Game::runPausedGame() convertit a enterPausedGame() + despatx directe en run()
- Game::runGameOverScreen() convertit a enterGameOverScreen() + despatx directe
- Eliminada variable static postFade, convertida a membre gameOverPostFade
- Extret SDL_PollEvent de updateGameOverScreen() a checkGameOverEvents()
- Game::run() refactoritzat amb iterate() + hasFinished() per preparar callbacks
- Title::runInstructions() i runDemoGame() convertits a no-bloquejants
- Instructions ara usa finished/quitRequested en lloc de modificar section directament
- Instructions exposa start(), update(), checkEvents(), render(), hasFinished()
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- shakeScreen() convertit a màquina d'estats amb SDL_GetTicks (50ms per pas)
- killPlayer() convertit a seqüència de fases (Shaking → Waiting → Done)
- Fade FADE_FULLSCREEN convertit a per-frame amb alpha incremental
- Fade FADE_RANDOM_SQUARE convertit a per-frame (un quadrat cada 100ms)
- Title SUBSECTION_TITLE_2 convertit a no-bloquejant, variables static eliminades
- Corregit so duplicat del crashSound al títol
- Congelat input del jugador durant la seqüència de mort
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>