Unified · Split
| @@ -1055,7 +1055,7 @@ staticni void apply_time_to_sustained_notes(Oosc_dev *oosc_dev, · 1054 unmodified lines | ||
| 1055 | 1055 | } |
| 1056 | 1056 | } |
| 1057 | 1057 | |
| 1058 | −void ged_stop_all_sustained_notes(Ged *a) { | |
| 1058 | +staticni void ged_stop_all_sustained_notes(Ged *a) { | |
| 1059 | 1059 | Susnote_list *sl = &a->susnote_list; |
| 1060 | 1060 | send_midi_note_offs(a->oosc_dev, &a->midi_mode, sl->buffer, |
| 1061 | 1061 | sl->buffer + sl->count); |
| @@ -1070,9 +1070,9 @@ void ged_stop_all_sustained_notes(Ged *a) { · 8 unmodified lines | ||
| 1070 | 1070 | // seems redundant/weird", that's because it is, not because there's a good |
| 1071 | 1071 | // reason. |
| 1072 | 1072 | |
| 1073 | −void send_output_events(Oosc_dev *oosc_dev, Midi_mode *midi_mode, Usz bpm, | |
| 1074 | − Susnote_list *susnote_list, Oevent const *events, | |
| 1075 | − Usz count) { | |
| 1073 | +staticni void send_output_events(Oosc_dev *oosc_dev, Midi_mode *midi_mode, | |
| 1074 | + Usz bpm, Susnote_list *susnote_list, | |
| 1075 | + Oevent const *events, Usz count) { | |
| 1076 | 1076 | enum { Midi_on_capacity = 512 }; |
| 1077 | 1077 | typedef struct { |
| 1078 | 1078 | U8 channel; |
| @@ -1213,7 +1213,7 @@ do_note_ons: · 134 unmodified lines | ||
| 1213 | 1213 | } |
| 1214 | 1214 | } |
| 1215 | 1215 | |
| 1216 | −void ged_clear_osc_udp(Ged *a) { | |
| 1216 | +staticni void ged_clear_osc_udp(Ged *a) { | |
| 1217 | 1217 | if (a->oosc_dev) { |
| 1218 | 1218 | if (a->midi_mode.any.type == Midi_mode_type_osc_bidule) { |
| 1219 | 1219 | ged_stop_all_sustained_notes(a); |
| @@ -1222,8 +1222,9 @@ void ged_clear_osc_udp(Ged *a) { · 2 unmodified lines | ||
| 1222 | 1222 | a->oosc_dev = NULL; |
| 1223 | 1223 | } |
| 1224 | 1224 | } |
| 1225 | −bool ged_is_using_osc_udp(Ged *a) { return (bool)a->oosc_dev; } | |
| 1226 | −bool ged_set_osc_udp(Ged *a, char const *dest_addr, char const *dest_port) { | |
| 1225 | +static bool ged_is_using_osc_udp(Ged *a) { return (bool)a->oosc_dev; } | |
| 1226 | +static bool ged_set_osc_udp(Ged *a, char const *dest_addr, | |
| 1227 | + char const *dest_port) { | |
| 1227 | 1228 | ged_clear_osc_udp(a); |
| 1228 | 1229 | if (dest_port) { |
| 1229 | 1230 | Oosc_udp_create_error err = |
| @@ -1256,17 +1257,15 @@ static double ged_secs_to_deadline(Ged const *a) { · 26 unmodified lines | ||
| 1256 | 1257 | return rem; |
| 1257 | 1258 | } |
| 1258 | 1259 | |
| 1259 | −void ged_reset_clock(Ged *a) { a->clock = stm_now(); } | |
| 1260 | − | |
| 1261 | −void clear_and_run_vm(Glyph *restrict gbuf, Mark *restrict mbuf, Usz height, | |
| 1262 | − Usz width, Usz tick_number, Oevent_list *oevent_list, | |
| 1263 | − Usz random_seed) { | |
| 1260 | +staticni void clear_and_run_vm(Glyph *restrict gbuf, Mark *restrict mbuf, | |
| 1261 | + Usz height, Usz width, Usz tick_number, | |
| 1262 | + Oevent_list *oevent_list, Usz random_seed) { | |
| 1264 | 1263 | mbuffer_clear(mbuf, height, width); |
| 1265 | 1264 | oevent_list_clear(oevent_list); |
| 1266 | 1265 | orca_run(gbuf, mbuf, height, width, tick_number, oevent_list, random_seed); |
| 1267 | 1266 | } |
| 1268 | 1267 | |
| 1269 | −void ged_do_stuff(Ged *a) { | |
| 1268 | +staticni void ged_do_stuff(Ged *a) { | |
| 1270 | 1269 | if (!a->is_playing) |
| 1271 | 1270 | return; |
| 1272 | 1271 | double secs_span = 60.0 / (double)a->bpm / 4.0; |
| @@ -1341,9 +1340,9 @@ static inline Isz isz_clamp(Isz x, Isz low, Isz high) { · 68 unmodified lines | ||
| 1341 | 1340 | } |
| 1342 | 1341 | |
| 1343 | 1342 | // todo cleanup to use proper unsigned/signed w/ overflow check |
| 1344 | −Isz scroll_offset_on_axis_for_cursor_pos(Isz win_len, Isz cont_len, | |
| 1345 | − Isz cursor_pos, Isz pad, | |
| 1346 | − Isz cur_scroll) { | |
| 1343 | +staticni Isz scroll_offset_on_axis_for_cursor_pos(Isz win_len, Isz cont_len, | |
| 1344 | + Isz cursor_pos, Isz pad, | |
| 1345 | + Isz cur_scroll) { | |
| 1347 | 1346 | if (win_len <= 0 || cont_len <= 0) |
| 1348 | 1347 | return 0; |
| 1349 | 1348 | if (cont_len <= win_len) |
| @@ -1363,7 +1362,7 @@ Isz scroll_offset_on_axis_for_cursor_pos(Isz win_len, Isz cont_len, · 13 unmodified lines | ||
| 1363 | 1362 | return isz_clamp(new_scroll, 0, cont_len - win_len); |
| 1364 | 1363 | } |
| 1365 | 1364 | |
| 1366 | −void ged_make_cursor_visible(Ged *a) { | |
| 1365 | +staticni void ged_make_cursor_visible(Ged *a) { | |
| 1367 | 1366 | int grid_h = a->grid_h; |
| 1368 | 1367 | int cur_scr_y = a->grid_scroll_y; |
| 1369 | 1368 | int cur_scr_x = a->grid_scroll_x; |
| @@ -1380,7 +1379,7 @@ void ged_make_cursor_visible(Ged *a) { · 10 unmodified lines | ||
| 1380 | 1379 | |
| 1381 | 1380 | enum { Hud_height = 2 }; |
| 1382 | 1381 | |
| 1383 | −void ged_update_internal_geometry(Ged *a) { | |
| 1382 | +staticni void ged_update_internal_geometry(Ged *a) { | |
| 1384 | 1383 | int win_h = a->win_h; |
| 1385 | 1384 | int softmargin_y = a->softmargin_y; |
| 1386 | 1385 | bool show_hud = win_h > Hud_height + 1; |