I think it would be something like this no?
dword keys[array of all your key constants];
Then you can later do things like keys[up]=VK_UP;
Or am i way off track here?
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
I think it would be something like this no?
dword keys[array of all your key constants];
Then you can later do things like keys[up]=VK_UP;
Or am i way off track here?
Once you have that, you can use the keymap variable in an array, like this:
if(keyword[DIK_ESCAPE] & 0x80)
{
// escape is pressed, do something!
}
The DIK_* constants are DirectInput specific, they're not the win32 ones, and are probably explained in the SDK.
I hope this has helped. It is possible that some of the things I said don't make sense, I'm in the middle of my exams and haven't touched my compiler for 2 weeks or so.
------------------
/Alexander Deruwe