Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Muzlack

scanf command

This topic is 5808 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Could someone post some code they used to make their own "scanf" command using directinput? this proves to be very hard.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
You could just collect the inputted characters into a buffer and use sscanf

Share this post


Link to post
Share on other sites
Well, is there a way to change the DIK_WHATEVER into ascii? I would very much hate doing if(keydown(DIK_A)) etc..

Share this post


Link to post
Share on other sites
Well, what do I use for the scancode argument? I''m using a UCHAR array to store the characters..

Share this post


Link to post
Share on other sites
well, if I''m going to do it that way, its useless. because I would have to do one call for each letter... and I could do the same thing by writing my own code to handle each letter. Isn''t there something I could pass the character array to and it would search through it and see which ones are pressed and at it to a character array? thats all I really need..

Share this post


Link to post
Share on other sites
but I don''t know what DIK_WHATEVER is. I want to be able to do it without having to write a big switch command.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!