Path: chuka.playstation.co.uk!news From: pal Newsgroups: scee.yaroze.profile Subject: Re: scanf Date: Mon, 27 Jul 1998 02:03:16 +0200 Organization: PlayStation Net Yaroze (SCEE) Lines: 34 Message-ID: <35BBC3C4.2BD8BF75@hotmail.com> References: <01bdb81b$881be840$b7e2abc3@default> Reply-To: palpalpalpal@hotmail.com NNTP-Posting-Host: marseille1-133.club-internet.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) T Khan wrote: > I've looked through some 'C' books and notice they all teach you the > 'scanf' function which does not seem to work on the Yaroze. Why is this and > what can be done about it? Are there other functions which don't work on > the Yaroze? If so what can be done instead. What a strange place to post this message... As I haven"t seen it crossposted elsewhere, I'll answer here. The scanf(char*, ...) function doesn't appear to be defined in stdio.h. But what would you expect scanf to do, if it worked ? There is no keyboard on your Yaroze... and the way you get user input in a videogame is very different than the way scanf works. Scanf waits until it gets the input it's expecting. That means, nothing happens until the user has typed in something. In a game, you'd rather look from time to time (once each frame) which keys are on, whithout stopping the action. Unless you're coding a text adventure game, that is. So if you want to get input from the controllers, scanf, even if it was implemented, wouldn't be useful. Now, what can you do ? Well, have a look at the tutorials, or any source code that makes use of the controller ; you'll quickly isolate the code that reads the controller keys (see on the Yaroze disc : psx\quick\pad.c). As there are not many ways of doing this, the best thing for you to do is to copy/paste it into your program. Alternatively, look for controller libraries in members' pages. Hope this helps, pal. Quotation of the day : "If you want to be the best Email me and be with the best Developing company."