delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/06/22:10:45

From: "DeHackEd" <notgiven AT out DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <36435c09 DOT 5006295 AT news DOT algonet DOT se>
Subject: Re: Wait_retrace function?
Lines: 41
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <M_N02.524$q%3.524203@cabot.ops.attcanada.net>
Date: Sat, 07 Nov 1998 02:10:52 GMT
NNTP-Posting-Host: 142.194.222.12
NNTP-Posting-Date: Sat, 07 Nov 1998 02:10:52 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

#include <stdio.h>
#include <allegro.h>

volatile int retr=0;

void ret_proc()
{
   retr++;
}
END_OF_FUNCTION(ret_proc)


int main()
{
   allegro_init();
   install_timer();
   install_keyboard();
   LOCK_VARIABLE(retr);
   LOCK_FUNCTION(ret_proc);
   retrace_proc = ret_proc;
   set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
   while (!keypressed())
      textprintf(screen, font, 0, 0, 5, "%d", retr);
   allegro_exit();
   return 0;

}


// This should make a small number go in the corner of you screen.
// Any key makes it exit. Should work on any computer (did for mine).

--
"DeHackEd"

My Email address in the header is fake (spammers). Email me at this address:

http://www.geocities.com/cgi-bin/homestead/mail.pl?dehacked



- Raw text -


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