- Add menu control fallbacks.
- If it could not find a bind using your existing keys, then it looks at default controls.
- If it could not find it then, and you're P1, then it looks through gamepads, and then lastly settles for keyboard.
- Changed around the order of operations on the character select menu, to accommodate for this change.
- Added initroutine to menu_t, which is called every time without question when going to a new menu. This solves many, many minor bugs you could experience in the character select menu when changing between menus, due to things only being properly reset when selecting the character select menu option.
For some reason gamepads have not been registering buttons for a while, which makes this pretty hard to continue. Not sure if it's to do with how the menu cmd is generated, or something deeper in the SDL code.
Ultra mega hacked in, by saving all "discarded" joysticks to an array so they don't get totally closed & we can still poll them. Events now properly send the device number instead of the player number, which means we can store all controllers pressing buttons, and thus, can detect when ANY controller is pressing anything, and THUS we can make the character select work like we wanted to :V
Did not bother fixing any of the bugs, however. First of all, the opening menus do not properly fallback to default controls. Yet again, we may need a more robust system -- storing all keys from gamekeydown separately? Additionally it seems like when I input gamepad it makes me use keyboard anyway, so I think something fishy is up.
Allows menu input delays to feel sorta similar to how they did before ... maybe could be adjusted further, since it feels just a tad bit touchy to me, but it's much better than before when it was a static value.
TODO:
- Menu delay shouldn't be a static value and work closer to how it did before (likely requires a more complicated system than just calling G_PlayerInputDown ... menu ticcmds? lol)
- Create a sdl function to determine if any of the possible joysticks' buttons are being pressed & return the joystick number & set usejoystick to that number ... for the PRESS START prompt.
Already tired of this code, I'm good
Suddenly stopped compiling as I was working on this, with the same error it gave when before james merged the makefile changes, even though it was fine a minute ago and those changes are distinctly in here, so I guess it ends here.