From 3890492a9bf9b88c3fce2900c59336ad14ddc8ce Mon Sep 17 00:00:00 2001 From: Greg King Date: Thu, 28 May 2020 09:59:21 -0400 Subject: [PATCH] Added a JOY_FIRE() macro to the Atmos and Telestrat C headers. --- include/atmos.h | 3 +++ include/telestrat.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/atmos.h b/include/atmos.h index d9f6d103b..227c387aa 100644 --- a/include/atmos.h +++ b/include/atmos.h @@ -120,6 +120,9 @@ #define JOY_RIGHT_MASK 0x02 #define JOY_BTN_1_MASK 0x20 +#define JOY_FIRE_MASK JOY_BTN_1_MASK +#define JOY_FIRE(v) ((v) & JOY_FIRE_MASK) + /* No support for dynamically loadable drivers */ diff --git a/include/telestrat.h b/include/telestrat.h index 38762be1d..524f7d39f 100644 --- a/include/telestrat.h +++ b/include/telestrat.h @@ -105,6 +105,10 @@ extern void telestrat_240_200_2_tgi[]; /* Referred to by tgi_static_stddrv[ #define JOY_RIGHT_MASK 0x02 #define JOY_BTN_1_MASK 0x04 +#define JOY_FIRE_MASK JOY_BTN_1_MASK +#define JOY_FIRE(v) ((v) & JOY_FIRE_MASK) + + /* The addresses of the static drivers */ extern void telestrat_joy[]; /* Referred to by joy_static_stddrv[] */