From: "Johan Venter" Newsgroups: comp.os.msdos.djgpp References: <380EF520 DOT C2FAE759 AT connect DOT ab DOT ca> <3811084C DOT 7874BA49 AT connect DOT ab DOT ca> Subject: Re: Plague of the slow 'blit' routine :) Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Sun, 24 Oct 1999 14:40:55 +1000 NNTP-Posting-Host: 203.40.87.190 X-Trace: newsfeeds.bigpond.com 940748230 203.40.87.190 (Sun, 24 Oct 1999 16:57:10 EST) NNTP-Posting-Date: Sun, 24 Oct 1999 16:57:10 EST Organization: Telstra BigPond Internet Services (http://www.bigpond.com) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Tom Fjellstrom wrote in message news:3811084C DOT 7874BA49 AT connect DOT ab DOT ca... > > if ((dest->dat >= screen->dat) && (dest->dat <= endofvideomem)) { > /* DO A FAR POINTER BLIT TO SCREEN */ > } else { /* memcpy */ } > > If I'm wrong then let me know, and if I'm not then I should have thought of this > sooner. That looks like the way to do it. Calculate end of video memory as width*height*bpp+base (although I'm sure you've already figured that out). -- Johan Venter ICQ 3643877 - jventer AT writeme DOT com The TPU DJGPP Interest Group - http://surf.to/djgppig The RSXNTDJ 1.5 HOWTO - http://surf.to/rsxntdj