upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/gameinput.md
diff options
context:
space:
mode:
authorubiquitarianism <283527159+ubiquitarianism@users.noreply.github.com>2026-11-29 22:24:55 -0500
committerubiquitarianism <283527159+ubiquitarianism@users.noreply.github.com>2026-11-29 22:24:55 -0500
commit54374cf53e0f66d2d5c744e8dd7b678d96cb141e (patch)
tree23168564cd5c009787e52dd0dfa9851b62fb919b /docs/gameinput.md
parent95bc33f6e2da3e751658f4a5317fd53def030f4a (diff)
Button prompts that follow a device switch during play
tools/live_prompt_glyphs.py builds ps_live_prompt_glyphs.gfx over the title's glyph movie on the player's PC: each Main_Button_N sprite holds the PlayStation and the keyboard picture (the first keyboard piece named k), and the title's ActionScript block gets three static Number slots on Main (lnLo, lnFamily, lnHi, the outer two sentinels), four static methods that show the pad or the keyboard pieces when a prompt is made and on each frame while it is on the stage, and a call from SpriteAsset's constructor, the base of exactly the 38 symbol classes. Everything added is in try blocks. tools/abc_file.py reads and writes ABC byte for byte. Both sets and the code fit the 28,148 bytes with 1,057 to spare on the user's movie. leonida-hle serves the live movie for a PlayStation pad or the keyboard (unless LEONIDA_PROMPTS forces a family; LEONIDA_PROMPTS_LIVE=0 restores one family's movie, LEONIDA_PROMPTS_PAD=xbox keeps a keyboard start on the keyboard movie), with lnFamily's default set to the family in use, then a below-normal thread finds the slots by their sentinels through ReadProcessMemory and writes each change of the active family. prompt_glyph_movies.py builds the live movie too (only over the title's). Tested: the added code checked path by path and run in an interpreter over fake display objects, the sentinel scan and writes on a fake heap. Not yet run in the title.
Diffstat (limited to 'docs/gameinput.md')
-rw-r--r--docs/gameinput.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/gameinput.md b/docs/gameinput.md
index 1819f0543..968e4bb07 100644
--- a/docs/gameinput.md
+++ b/docs/gameinput.md
@@ -532,6 +532,8 @@ line is logged when it takes effect); tracking goes on underneath, so clearing i
532| `LEONIDA_RUMBLE` | `1` | `0` turns all rumble, trigger and force-feedback output off | 532| `LEONIDA_RUMBLE` | `1` | `0` turns all rumble, trigger and force-feedback output off |
533| `LEONIDA_PROMPTS` | `auto` | forces the [active input](#active-input) family: `xbox`, `playstation` (or `ps5`), `ps4`, `ps3`, `nintendo` or `keyboard`; `auto` follows the devices | 533| `LEONIDA_PROMPTS` | `auto` | forces the [active input](#active-input) family: `xbox`, `playstation` (or `ps5`), `ps4`, `ps3`, `nintendo` or `keyboard`; `auto` follows the devices |
534| `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms | 534| `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms |
535| `LEONIDA_PROMPTS_LIVE` | `1` | `0` (or `off`) serves one family's glyph movie at the title's read instead of the live one that follows a switch during play ([prompt_glyphs.md](prompt_glyphs.md#following-a-device-switch-during-play)) |
536| `LEONIDA_PROMPTS_PAD` | `playstation` | the pad half of the live movie when the keyboard is in use at the title's read: `xbox` serves the keyboard movie alone, as before |
535| `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) | 537| `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) |
536| `LEONIDA_KEYBOARD_PAD` | `1` | the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus; `off` removes it | 538| `LEONIDA_KEYBOARD_PAD` | `1` | the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus; `off` removes it |
537| `LEONIDA_INPUT_SCRIPT` | unset | Comma-separated `button@seconds` entries, e.g. `a@2,a@4,start@6`. With SDL3 they drive the keyboard pad (on unless `LEONIDA_KEYBOARD_PAD=off`); without SDL3 they drive [one scripted pad](#scripted-input-without-sdl3), the only device. The first pad update (without SDL3, the first `GameInputCreate`) reads the script once at startup and starts the clock. `reload_config()` does not reread it. Each press lasts 300 ms, or `hold` seconds when the entry is `button@seconds:hold` (more than 0, at most 600). With SDL3 a press then stays down until the title has read the pads six times since it began, but never past 5 s from its start (or its hold, if longer). A title reads its pad once a frame, so at a few seconds a frame a 300 ms press can fall between two reads and never arrive: on the retail title's "Couldn't autosave" prompt, three 300 ms `b` presses did nothing, while 120 presses 0.5 s apart got through; one `b@1100:3` replaces them. Buttons are `a b x y start back lb rb up down left right`. Spaces around entries are allowed. Empty entries, unknown buttons, invalid times (including negative or non-finite values) and invalid holds (0 or less, more than 600, not a number) are counted and ignored. | 539| `LEONIDA_INPUT_SCRIPT` | unset | Comma-separated `button@seconds` entries, e.g. `a@2,a@4,start@6`. With SDL3 they drive the keyboard pad (on unless `LEONIDA_KEYBOARD_PAD=off`); without SDL3 they drive [one scripted pad](#scripted-input-without-sdl3), the only device. The first pad update (without SDL3, the first `GameInputCreate`) reads the script once at startup and starts the clock. `reload_config()` does not reread it. Each press lasts 300 ms, or `hold` seconds when the entry is `button@seconds:hold` (more than 0, at most 600). With SDL3 a press then stays down until the title has read the pads six times since it began, but never past 5 s from its start (or its hold, if longer). A title reads its pad once a frame, so at a few seconds a frame a 300 ms press can fall between two reads and never arrive: on the retail title's "Couldn't autosave" prompt, three 300 ms `b` presses did nothing, while 120 presses 0.5 s apart got through; one `b@1100:3` replaces them. Buttons are `a b x y start back lb rb up down left right`. Spaces around entries are allowed. Empty entries, unknown buttons, invalid times (including negative or non-finite values) and invalid holds (0 or less, more than 600, not a number) are counted and ignored. |