Advertisement

What key is pressed? DirectInput 8

Started by October 04, 2001 04:36 PM
2 comments, last by Running_Wolf 23 years, 4 months ago
Okay, I''m just full of questions recently. I have been looking over the Game Programming Tutorials and I like the way the DirectInput stuff was done. Just one problem. When a user is, say, entering their game name then programmer has no idea what key will be pressed. The DirectInput tutorial is done in Immediate Mode. Is there a way for me to simply check that a key was pressed and then what key it was without writing a if(KEY_DOWN(DIK)) for each letter?
L.I.G. == Life Is Good
I''m still having problems with this. I can''t seem to fix it. Any suggestions would be nice.
L.I.G. == Life Is Good
Advertisement
It is much easier to use the buffered mode of DirectInput for these situations... then you can just empty the buffer =)

ICQ: 130925152
Email: e.j.folkertsma@student.utwente.nl
ICQ: 130925152Email: e.j.folkertsma@student.utwente.nl
Okay...That makes sense but I think I am still confused. Wouldn''t I still have to check every single letter for as being pressed for each instance in the buffer? Or wouldn''t I need to compare each instance in the buffer to every letter to see if it was true? I hope that made sense...I confused myself writing it.
L.I.G. == Life Is Good

This topic is closed to new replies.

Advertisement