summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-06-11 17:25:11 +0200
committerBad Diode <bd@badd10de.dev>2021-06-11 17:25:11 +0200
commit4f1971b8365e05c86f71cebe9eb6f5c0c217a088 (patch)
tree733e2f8f333f5436468d68d33bfdac30286bef71
parent562f435116748b259ef5cd97d36e6049c1d9fbc7 (diff)
downloadgba-sequencer-4f1971b8365e05c86f71cebe9eb6f5c0c217a088.tar.gz
gba-sequencer-4f1971b8365e05c86f71cebe9eb6f5c0c217a088.zip
Add back wave adjustment on ch3
-rw-r--r--src/sequencer.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/sequencer.c b/src/sequencer.c
index fae4ce3..399a016 100644
--- a/src/sequencer.c
+++ b/src/sequencer.c
@@ -1165,23 +1165,23 @@ handle_param_selection_ch3(void) {
1165 // |`- odd 1165 // |`- odd
1166 // `-- even 1166 // `-- even
1167 if (param_selection_loc < 32) { 1167 if (param_selection_loc < 32) {
1168 // u8 byte_number = param_selection_loc >> 1; 1168 u8 byte_number = param_selection_loc / 2;
1169 // u8 byte = sequences[2][trig_selection_loc].wave_a[byte_number]; 1169 u8 *byte = &ch3.params[trig_selection_loc].wave_a;
1170 // if (odd) { 1170 byte += byte_number;
1171 // byte = (~0xF & byte) | ((byte + inc) & 0xF); 1171 if (odd) {
1172 // } else { 1172 *byte = (~0xF & *byte) | ((*byte + inc) & 0xF);
1173 // byte = (0xF & byte) | (((byte >> 4) + inc) & 0xF) << 4; 1173 } else {
1174 // } 1174 *byte = (0xF & *byte) | (((*byte >> 4) + inc) & 0xF) << 4;
1175 // sequences[2][trig_selection_loc].wave_a[byte_number] = byte; 1175 }
1176 } else if (param_selection_loc < 64){ 1176 } else if (param_selection_loc < 64){
1177 // u8 byte_number = (param_selection_loc - 32) >> 1; 1177 u8 byte_number = param_selection_loc / 2;
1178 // u8 byte = sequences[2][trig_selection_loc].wave_b[byte_number]; 1178 u8 *byte = &ch3.params[trig_selection_loc].wave_b;
1179 // if (odd) { 1179 byte += byte_number;
1180 // byte = (~0xF & byte) | (byte + inc); 1180 if (odd) {
1181 // } else { 1181 *byte = (~0xF & *byte) | ((*byte + inc) & 0xF);
1182 // byte = (0xF & byte) | ((byte >> 4) + inc) << 4; 1182 } else {
1183 // } 1183 *byte = (0xF & *byte) | (((*byte >> 4) + inc) & 0xF) << 4;
1184 // sequences[2][trig_selection_loc].wave_b[byte_number] = byte; 1184 }
1185 } else { 1185 } else {
1186 u32 *wave_a = &ch3.params[trig_selection_loc].wave_a; 1186 u32 *wave_a = &ch3.params[trig_selection_loc].wave_a;
1187 u32 *wave_b = &ch3.params[trig_selection_loc].wave_b; 1187 u32 *wave_b = &ch3.params[trig_selection_loc].wave_b;
@@ -1217,8 +1217,9 @@ handle_param_selection_ch3(void) {
1217 memcpy32(wave_b, rand_wave, 16); 1217 memcpy32(wave_b, rand_wave, 16);
1218 } break; 1218 } break;
1219 } 1219 }
1220 draw_parameters();
1221 } 1220 }
1221 draw_parameters();
1222 draw_parameters_cursor(param_selection_loc, COL_BLUE);
1222 } 1223 }
1223} 1224}
1224 1225