Input interface is (last update 04/17/2004):
// must call at least once, when you start the client
// InputDeviceType - What device you want active
// iniFileName - How to do key mapping
// hwnd - To bind the device
// non negative number -> success, negative number -> failure
int nsInputHandler::Initialize( nsInputHandler::InputDeviceType, char* iniFileName,
HWND hwnd);
// can be used within the game loop get what action is being taken
// a device failure returns NULL
InputDeviceState* nsInputHandler::pollDevice( void );
// must call at least once, at the end of the game
// deallocates memeory, and stuff
void nsInputHandler::Cleanup( void );
// when called, it traverses through the input device (keyboard)
// and checks whether a key is currently being pressed
// if so, returns the key value (in hex) -> always positive
// if not, returns NULL
int nsInputHandler::isAnyKeyPressed (void);
// called when you want to map an input key to a specified
// action.
// the method will suspend and wait till a key is pressed,
// in which case it will bind it with the action (specified
// in the parameter), and updates the .INI file associated
// with InputHandler
int nsInputHandler::mapInputKey (nsInputHandler::InputActions);
enum nsInputHandler::InputDeviceType { KEYBOARD, JOYSTICK, GAMEPAD };
enum nsInputHandler::InputActions{LEFT=0, RIGHT, UP, DOWN, FIRE1, FIRE2, SHIELDS,
MENU, VIEW};
struct nsInputHandler::InputDeviceState {
bool LEFT;
bool RIGHT;
bool UP;
bool DOWN;
bool FIRE1;
bool FIRE2;
bool MENU;
bool VIEW;
};