?/TD> |
Microsoft DirectX 9.0 |
The MultiMapper sample program shows how to set up, apply, and retrieve data using the Action Mapping functionality. It also demonstrates remapping through the user interface.
Source: (SDK root )\Samples\C++\DirectInput\MultiMapper
Executable: (SDK root )\Samples\C++\DirectInput\MultiMapper.exe
First, assign a number of players. The MultiMapper sample program accepts up to four. There must be one device, including the keyboard and the mouse, for each player. If more players are chosen than there are devices available, the program automatically scales back to the maximum number of players based on the devices attached.
The MultiMapper sample program is designed as though it were a space combat application. Each player is assigned a basic set of actions such as turning, firing, and activating thrusters. These actions are then mapped to device controls. Activation of those controls is then reflected by data in the display window.
To activate the action mapping user interface, press D. Each device has a separate tab for mapping that particular device. Double-clicking a device object label activates the list of possible actions to be assigned to that device object. Make a selection from the action list to map that action to the selected device object. You can also reassign devices among players.
If a controller such as a joystick or a wheel is attached to the system, it displays a graphic of the device with actions as callouts to each device object. The display of this graphic depends on the presence of a provided bitmap for that device.