Rework input buffer to match HDR closer (#79)
CI / build-and-test (push) Successful in 1m24s
CI / production-build (push) Successful in 11m47s

## Summary

- Preserve distinct same-action bindings in rollback input frames.
- Add independent command lifetimes with tap and state-scoped hold buffering.
- Detect second shield bindings and consume shield commands for air dodge.
- Fix duplicate keyboard mappings being overwritten.

Reviewed-on: #79
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #79.
This commit is contained in:
2026-10-03 09:20:56 +00:00
committed by EIREXE
parent 47f7ae1e69
commit aca3886113
11 changed files with 711 additions and 165 deletions
+13
View File
@@ -19,6 +19,17 @@ pub enum InputMapAction {
Attack,
}
impl InputMapAction {
pub const fn digital_action(&self) -> Option<crate::input::DigitalAction> {
match self {
Self::Jump => Some(crate::input::DigitalAction::Jump),
Self::Shield => Some(crate::input::DigitalAction::Shield),
Self::Attack => Some(crate::input::DigitalAction::Attack),
Self::MovementXDir(_) | Self::MovementYDir(_) => None,
}
}
}
#[derive(Debug)]
pub enum MenuInputMapAction {
MovementXDir(i32),
@@ -32,6 +43,7 @@ pub enum MenuInputMapAction {
pub struct KeyboardInputMapElement {
pub key: KeyCode,
pub action: InputMapAction,
pub binding_slot: u8,
}
#[derive(Debug)]
@@ -44,6 +56,7 @@ pub enum GamepadBinding {
pub struct GamepadInputMapElement {
pub binding: GamepadBinding,
pub action: InputMapAction,
pub binding_slot: u8,
}
#[derive(Debug)]