//////////////////////////////////////////////////////////////////////////////// // Input.h // // Input-handling code #ifndef __INPUT_H__ #define __INPUT_H__ // Tables and data in main source file extern HWND hWndMain; extern GUID g_guidApp; extern DWORD g_dwGenre; extern LPCTSTR g_tszActionMapName; extern DIACTION g_rgActions[]; extern DWORD g_nActions; // Application-specific function void HandleAction(UINT nAction, DWORD dwData); // Functions declared in input.cpp //Initialise DirectInput BOOL InitDirectInput(); //Shut down DirectInput void ExitDirectInput(); //Acquire (obtain control of) the devices void AcquireDevices(); //Unacquire (release control of) the devices void UnacquireDevices(); //Check each device for actions void CheckInput(); //Display the input configuration, without allowing the user to change it. BOOL DisplayInput(); //Display the input configuration box BOOL ConfigureInput(); //Main DirectInput object extern IDirectInput8 *g_pDI; //Array of devices that we will be using extern LPDIRECTINPUTDEVICE8 *g_pDeviceArray; //Number of devices to handle extern int g_nDevices; #endif