delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/22/12:54:31

From: Peter Danielsson <e96pd AT efd DOT lth DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Plague of the slow 'blit' routine :)
Date: Fri, 22 Oct 1999 16:22:28 +0200
Organization: Student
Lines: 45
Message-ID: <38107324.BDD62A45@efd.lth.se>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991021191954 DOT 4851E-100000 AT is> <380F58BD DOT 9FDDC7CF AT connect DOT ab DOT ca>
NNTP-Posting-Host: dialin-45-38.student.lu.se
Mime-Version: 1.0
X-Mailer: Mozilla 4.6 [en] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


Tom Fjellstrom wrote:

> Eli Zaretskii wrote:
>
> > On Thu, 21 Oct 1999, Tom Fjellstrom wrote:
> >
> > > But I can't be completely sure if the 'bitmap' i'm blitting
> > > to or from is in video memory. If I could then it would make sense
> > > to call the dosmemput or farptr functions only for those 'bitmaps'.
> > > I may be wrong but I don't think 'regular' memory can (or should?) be
> > > accessed with dosmemput or those farptr functions.
> >
> > For ``normal'' memory, simply use memcpy or whatever C functions are
> > appropriate.  There's no need neither for farptr nor for
> > __djgpp_nearptr_enable stuff.
>
> yes I understand this part.
>
> >
> > > The only way I have thought of determining that a bitmap is in video memory
> > > is too add a variable to the bitmap struct when creating it to indicate
> > > whether or not it is in video memory.
> >
> > I'm not sure I follow.  How come you don't know where's the bitmap in a
> > program that you yourself wrote?
>
> Because I want to call the same routine on any bitmap whether or not
> it's a regular bitmap, the screen, or a sub bitmap of the screen.

Then send an extra argument to your blit function.


>
>
> --
>
> "An Optimist will say the glass is half full,
>  A Pessimist will say the glass is half empty,
>  A Canadian will say Waiter!"
>
> Tom Fjellstrom
> tomcf AT connect DOT ab DOT ca

- Raw text -


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