Closed JeffAlyanak closed 3 years ago
Looks good to me, feel free to go ahead. Could you please move the config handling stuff to its own files (as you suggested yourself) so that possible new config parameters wouldn't clutter main.c. I wonder if it also would be a good idea to have the parameters inside a struct?
Looks good to me, feel free to go ahead. Could you please move the config handling stuff to its own files (as you suggested yourself) so that possible new config parameters wouldn't clutter main.c. I wonder if it also would be a good idea to have the parameters inside a struct?
Yeah, that's exactly what I was thinking! That'll ensure that it stays nice and clean even as new config params are added.
@laamaa
I've moved the code off into it's own files and turned the config into a struct as discussed.
I've also had to replace the case statements for the keyboard and gamepad inputs to allow for user configurable inputs.
Great job! Thank you :) This also fixes #1
Still work to do on this before it's really workable for all the settings required, but this at least gets things working.
It uses an MIT licensed library for simple INI reading and supports writing, so GUI options can later be added for writing the config.
Currently only supports the fullscreen option (see the included config.ini) which allows you to set the initial state of the application.
The config code should be pulled off into its own function for long-term cleanliness, but I wanted to get a pull request together and confer with @laamaa regarding whether this is the right type of config library for them before going past a prototype state.