aboutsummaryrefslogtreecommitdiffstats
path: root/src/globals.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2023-07-13 10:21:12 +0200
committerBad Diode <bd@badd10de.dev>2023-07-13 10:21:12 +0200
commitd1c68125b6825f0327a4089aa8ddca5105e78ec1 (patch)
treeed0b902221c42a534b594be9891f3c5688cabb4e /src/globals.c
parent8fa42f9f9107f460b49fa7ab171529942e66e7ea (diff)
downloadstepper-d1c68125b6825f0327a4089aa8ddca5105e78ec1.tar.gz
stepper-d1c68125b6825f0327a4089aa8ddca5105e78ec1.zip
Add initial pattern chain UI
Diffstat (limited to 'src/globals.c')
-rw-r--r--src/globals.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/globals.c b/src/globals.c
index c2e2ee2..3a70005 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -80,6 +80,13 @@ bool clear_screen = true;
80#define BANK_START_X (R_SIDEBAR_X + 5) 80#define BANK_START_X (R_SIDEBAR_X + 5)
81#define BANK_START_Y (PAT_START_Y) 81#define BANK_START_Y (PAT_START_Y)
82 82
83#define PAT_TRIG_W 14
84#define PAT_TRIG_H 14
85#define PAT_TRIG_START_X 35
86#define PAT_TRIG_START_Y 29
87#define PAT_TRIG_OFFSET_X (PAT_TRIG_W + 7)
88#define PAT_TRIG_OFFSET_Y (PAT_TRIG_H + 8)
89
83#define SEQ_N_CHANNELS 4 90#define SEQ_N_CHANNELS 4
84 91
85enum RIGHT_COL_LOC { 92enum RIGHT_COL_LOC {
@@ -131,3 +138,14 @@ typedef struct Notification {
131static Notification notif = {0}; 138static Notification notif = {0};
132 139
133#define NOTIF_TIME (80 + 32) 140#define NOTIF_TIME (80 + 32)
141
142#define MAX_CHAIN 16
143typedef struct Chain {
144 u8 chain[MAX_CHAIN];
145 u8 active[MAX_CHAIN];
146 u8 len;
147 u8 loop;
148 u8 current;
149} Chain;
150
151static Chain chain = {0};