From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp References: <80k5uc$40u3 AT imsp212 DOT netvigator DOT com> Subject: Re: Allegro-accelerating Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: X-Trace: /Kp2lo4RoZStO6JP6zMHplOgby5Klmc4ID96zjiAzZVa4fbG90rFCLFrmmpwQwCMjU0k946LMo+c!am5BMnXNenJQmBAWHLi6rWIcyPuq0wc1CmwEY9TkpaZqvc/L0rEGPoW8sORhyF8JqV+7Vnw= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sun, 21 Nov 1999 07:00:05 GMT Distribution: world Date: Sun, 21 Nov 1999 07:00:05 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "finding" wrote in message news:80k5uc$40u3 AT imsp212 DOT netvigator DOT com... > I would like to increase a value of a variable when the key is pressing. > decrease the value while the key is not pressing. > > Could anyone tell me how to do it in Allegro. > thx! install_keyboard(); /* should be called before doing this */ while(!done) { if(key[KEY_RIGHT]) x++; else x--; }