refactor: pass structs as pointers except for background things

This commit is contained in:
2025-11-08 19:24:14 +01:00
parent 92f010ca70
commit 3b7a550b6a
23 changed files with 418 additions and 450 deletions
+7 -7
View File
@@ -3,22 +3,22 @@
#ifndef STATE_H
#define STATE_H
StateConfig state_parse_config(ConfigFile config);
void state_parse_config(StateConfig *state_config, ConfigFile *config);
void state_apply_event(SharedContext *context, StateConfig state_config,
MidiDevice midi, unsigned char code, unsigned char value,
bool trace_midi);
void state_apply_event(SharedContext *context, StateConfig *state_config,
MidiDevice *midi, unsigned char code,
unsigned char value, bool trace_midi);
bool state_background_write(SharedContext *context, StateConfig state_config,
MidiDevice midi);
void state_init(SharedContext *context, StateConfig state_config, bool demo,
void state_init(SharedContext *context, StateConfig *state_config, bool demo,
bool auto_random, unsigned int base_tempo, char *state_file,
bool load_state);
void state_randomize(SharedContext *context, StateConfig state_config);
void state_randomize(SharedContext *context, StateConfig *state_config);
void state_save(SharedContext *context, StateConfig state_config,
void state_save(SharedContext *context, StateConfig *state_config,
char *state_file);
#endif /* STATE_H */