| delorie.com/archives/browse.cgi | search |
| From: | Martin Steuer <ms172554 AT mail DOT inf DOT tu-dresden DOT de> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Pausing the game loop/RPG character conversations |
| Date: | Tue, 29 Oct 2002 11:22:49 +0100 |
| Lines: | 14 |
| Message-ID: | <3DBE6179.7000603@mail.inf.tu-dresden.de> |
| References: | <ff72e526 DOT 0210280903 DOT 52edb3d4 AT posting DOT google DOT com> |
| NNTP-Posting-Host: | irz8047.inf.tu-dresden.de (141.76.8.47) |
| Mime-Version: | 1.0 |
| X-Trace: | fu-berlin.de 1035886998 2898637 141.76.8.47 (16 [142788]) |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 |
| X-Accept-Language: | de-DE |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
I'm not using Allegro, but I looked up the docu of it's keyboard
routines. I think you can utilize keypressed() and readkey() functions
in your mail loop like so:
if (keypressed())
if ((readkey() & 0xff) == 'g')
{
draw_rectangle_and_text();
while (!keypressed()) ;
}
This will do the trick, _IF_ your character animation and drawing takes
place in that main-loop and is not driven asynchonous by some timer...
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |