VBGamer |
|
RE: Key Binding in directx Adam Hoult (0 replies, 0 views) (2000-May-8) It's fairly simple to do, basically you have a variable for each key which you need (i.e Fire, TurnLeft, TurnRight etc), which just stores a DX key code (which is stored earlier in your options when they press a key, and then saved to a cfg file or registry (and then loaded at startup, back into the variables).) i.e DIK_LEFT for example. Then when you poll for your keypresses, all you would do would be to check if the keycode (which is stored in your variable) is currently pressed.
i.e KeyboardState(VarTurnLeft)=128 etc etc
If you need more detail let me know.
Thanks
Adam |