diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f226f..9b8b9d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ Versió que fa coincidir la numeració amb la del joc original del 2000. - Eixida neta quan la pausa estava activa (`00f8d6d`) - Eliminats warnings del codi original tocant el mínim possible (`d598d4f`) - Eliminats warnings addicionals (pragmas clang+gcc) (`9f37518`) +- El fitxer `gamecontrollerdb.txt` es copiava al release però no es carregava: ara `Gamepad::init()` crida `SDL_AddGamepadMappingsFromFile` per estendre la base de dades de mandos de SDL --- diff --git a/CLAUDE.md b/CLAUDE.md index 0c78fe1..bb214ca 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -67,7 +67,7 @@ Flat C-style APIs (no classes), prefixed by subsystem. **Do not touch gameplay l - **GlobalInputs** (`global_inputs.hpp/cpp`) — Maps configurable function keys to presentation actions. Uses debounce. Returns whether a key was consumed (to suppress from game layer) - **Mouse** (`mouse.hpp/cpp`) — Auto-hides cursor after 3 seconds of inactivity -- **Gamepad** (`gamepad.hpp/cpp`) — First-gamepad support with hot-plug. Poll-based each frame: D-pad/left stick (deadzone 12000) → virtual arrow keys for game movement; A/B buttons, Start, Back translate to synthetic SDL key events (F12/ESC/Enter/Backspace) when menu is open, so Director handles them exactly like keyboard +- **Gamepad** (`gamepad.hpp/cpp`) — First-gamepad support with hot-plug. Poll-based each frame: D-pad/left stick (deadzone 12000) → virtual arrow keys for game movement; A/B buttons, Start, Back translate to synthetic SDL key events (F12/ESC/Enter/Backspace) when menu is open, so Director handles them exactly like keyboard. Loads extra mappings from `gamecontrollerdb.txt` (next to the executable) at init via `SDL_AddGamepadMappingsFromFile`, extending SDL's built-in controller database - **KeyRemap** (`key_remap.hpp/cpp`) — Each frame, reads `Options::keys_game.*` and mirrors physical keyboard state to virtual standard scancodes (`SDL_SCANCODE_UP`/DOWN/LEFT/RIGHT). Allows full movement key remapping without touching hardcoded game code in `prota.cpp`/`mapa.cpp` ### Locale Layer (`source/core/locale/`)