Files
Quadrapassel/src/game/input.h
T
Brian Holman 2e163049d1 Fix joystick fire ghost keys and independent axis arming
Filter keyboard rows grounded by joystick buttons before processing actions,
preventing right fire from acting as A/D/E and undoing its release rotation.
Arm X and Y independently so an uncentered vertical axis cannot block steering.

Reproduce both defects in host regressions, retain ordinary CMOC input APIs,
and update official project membership. Compact unchanged display data and make
render profiling optional to preserve the original memory and stack bounds.

Deliver QUADPSL02.DSK with fresh scores. Retire the old artifact from tracking
while leaving the loaded local disk untouched. Host suites, official Release
build and MC6809/512 KB keyboard/audio smoke checks pass. Actual joystick-port
confirmation and the reported normal-window buzz remain pending.
2026-11-11 13:27:18 -07:00

27 lines
776 B
C

/* SPDX-License-Identifier: GPL-3.0-or-later */
#ifndef QUAD_INPUT_H
#define QUAD_INPUT_H
#include "rules.h"
#define Q_LEFT 1
#define Q_RIGHT 2
#define Q_UP 4
#define Q_DOWN 8
#define Q_CCW 16
#define Q_CW 32
#define Q_HARD 64
#define Q_HOLD 128
#define Q_PAUSE 256
#define Q_CONFIRM 512
#define Q_BACK 1024
typedef struct {
Q16 previous,repeat_ms,button_ms;
signed char direction,axis_x,axis_y;
Q8 guard,button_before,button_used,up_armed;
Q8 stick_armed; /* bit 0: X has centered; bit 1: Y has centered */
} QInput;
typedef struct { Q16 held,pressed; signed char move; Q8 repeats; } QActions;
void q_input_reset(QInput *state);
QActions q_input_step(QInput *state,Q16 keys,Q8 button,Q8 x,Q8 y,Q8 cx,Q8 cy,Q8 joystick,Q16 ms,Q8 playing,Q8 clockwise);
#endif