Abstract Input so that game code checks a State struct set by Keyboard/Mouse/Joysticks/scripts/headsets....
This is a two stage implementation:
Get magic carpet 2 to read from a State structure (see below) rather than checking itself for key presses. I have attached my first draft at this structure based on the game manual and all actions
Move the current the SDL keyboard/mouse/joypad detection code to its own input class to set this struct
Why do this?
It will allow for any input in the future, included even scripting
It will be easier to implement button combinations for Game Pads etc...
Abstract Input so that game code checks a State struct set by Keyboard/Mouse/Joysticks/scripts/headsets....
This is a two stage implementation:
Why do this? It will allow for any input in the future, included even scripting It will be easier to implement button combinations for Game Pads etc...