delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/21/03:10:51

From: "Damian Yerrick" <NOSP AT Musenet@pineight.8m.com>
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: <VLMZ3.1736$VO5.44400@dfiatx1-snr1.gtei.net>
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" <finding AT bigfoot DOT com> 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--;
}




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019