| delorie.com/archives/browse.cgi | search |
| From: | morganp AT indy DOT net |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Timimg. |
| Date: | Tue, 17 Sep 1996 19:58:21 GMT |
| Organization: | IndyNet - Indys Internet Gateway (info AT indy DOT net) |
| Lines: | 21 |
| Message-ID: | <51o2mk$1rb@news.indy.net> |
| NNTP-Posting-Host: | 199.3.70.176 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Hey guys!
This is some code I used on an 16 bit microsoft compiler. It allowed
to use a clock to slow a few things down properly in my game.
void Delay(int clicks)
{
unsigned int *clock = (unsigned int *)0x0000046CL;
unsigned int now;
now = *clock;
while(abs(*clock - now) < clicks){}
}
I am currently re-compiling some code to DJGPP.
This code however. isn't working. I know it's easy but I'm lost. I
would appreciate any help.
Thanks in advance.
Patrick MAnderson
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |