While I'm doing that, I decided to get other bits of programming done. First, I want to get Gamepad configuration working. Basically, the player should be able to configure their gamepad controls for the game, no matter what gamepad they are using. This configuration will be saved in a text file after setup, and recalled whenever the player uses that gamepad.
This is difficult to program, as I need to find a way to make gamepad input the same, no matter how the player configured it. My first idea was to have a class with function pointers representing commands such as Up, Down, Jump, Start, etc. This way, no matter what the player set as the Jump button, I would just call the Jump boolean function pointer to see if it was input. This sounded great, but when I sat down to code it, I realized that I would have to write a different function for each possible number of gamepad sticks, hats, and buttons, so that the function pointers could have something to point to. So I had to come up with a different method, and sadly, I did not fulfill my lifelong dream of actually using a function pointer in my game code[sad]
The other, and much simpler method, is to have each of the commands represented as an abstract class PadCommand, with derived classes JoystickCommand, HatCommand, and ButtonCommand. This way I can cover any amount of sticks, hats, and buttons a gamepad could have.
One reason I wrote this is that I'm going to code this tomorrow, and I don't want to forget what I was going to do[grin]