Mail Archives: djgpp/1997/09/10/16:06:23
On Tue, 09 Sep 1997 22:13:01 -0500, "J.E." <cellis AT voyageur DOT ca> wrote:
>I am writing a game with Allegro, but I'm having some problems. I want
>there to be a loop that checks, each time through the loop, for a key
>press, and continues if there is none. I tried using kbhit() to check
>the key buffer, but it would still just sit there waiting with getch().
>I am assuming that kbhit() is working fine, but I need an alternative to
>getch(). I need a function, similar to getch(), that reads a key from
>the buffer WITHOUT pausing.
Allegro's equivalent of getch() is readkey() [approx equivalent,
anyway] and its equivalent of kbhit() is keypressed(). These work
after calling install_keyboard(), and getch and kbhit do not work
after calling install_keyboard().
>Also, I've been having some problems linking Allegro. About 50% of the
>time it links fine, but sometimes Rhide says this:
>
>no errors
>The Error was: PERMISSION DENIED (EACCESS)
A wild stab in the dark: Are you running under Win95, with several DOS
boxes open, one running the program and the other running RHIDE? If
this is the case, make sure you quit your program in its DOS box
before recompiling from RHIDE.
--
george DOT foot AT merton DOT oxford DOT ac DOT uk
- Raw text -