Closed JohnathonNow closed 4 years ago
can i take it?
Do you want to make a controls.h to define all the controls and controls.c to create a function for each control?
Just a header defining some constants is probably fine for now.
The movement keys are tricky because we have two sets of them, perhaps something like
const int MOVE_W = 'h';
and
const int MOVE_W_BABBY = 0xWhateverTheHexCodeForLeftArrowKeyIs;
Ok, understanded
This seems like it was solved.
Right now all of the keys are defined inside
main.c
. It is probably better to have a separate header that defines each of the controls.While doing so, the controls could be cleaned up a little. Namely, the debugging cheat key
'c'
should probably be removed, as well as the't'
command that is commented out. Additionally, I'm not sure the fallthrough attribute is necessary with the current warning flags, nor what the best practice is surrounding this.