diff options
Diffstat (limited to 'src/globals.c')
-rw-r--r-- | src/globals.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/globals.c b/src/globals.c index 05c964a..5063d69 100644 --- a/src/globals.c +++ b/src/globals.c | |||
@@ -1,3 +1,15 @@ | |||
1 | enum WAVES { | ||
2 | WAVE_SIN, | ||
3 | WAVE_SAW, | ||
4 | WAVE_SQUARE, | ||
5 | WAVE_MAX, | ||
6 | }; | ||
7 | |||
8 | #define WAVE_SIZE 4 | ||
9 | #define WAVE_VARS 4 | ||
10 | |||
11 | typedef u32 Wave[WAVE_SIZE]; | ||
12 | |||
1 | // | 13 | // |
2 | // Globals. | 14 | // Globals. |
3 | // | 15 | // |
@@ -209,3 +221,9 @@ bool redraw_scale = true; | |||
209 | bool update_bpm = false; | 221 | bool update_bpm = false; |
210 | u8 bar_counter = 0; | 222 | u8 bar_counter = 0; |
211 | 223 | ||
224 | static Wave wave_active = {0}; | ||
225 | // static Wave wave_target = {0}; | ||
226 | // TODO: wave env status: OFF, ATTACK, DECAY | ||
227 | static int wave_env_ticks = 0; | ||
228 | static int wave_env_attack = 8; | ||
229 | static int wave_env_decay = 8; | ||