www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/26/11:07:47

From: Tom St Denis <stdenis AT compmore DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Blitting & Sprites
Date: Fri, 26 Jan 2001 15:47:39 GMT
Organization: Deja.com
Lines: 25
Message-ID: <94s66o$s0j$1@nnrp1.deja.com>
References: <t72tlvcnn1ce6c AT corp DOT supernews DOT co DOT uk>
NNTP-Posting-Host: 24.112.8.23
X-Article-Creation-Date: Fri Jan 26 15:47:39 2001 GMT
X-Http-User-Agent: Mozilla/5.0 (Windows 98; U) Opera 5.01 [en]
X-Http-Proxy: 1.1 x62.deja.com:80 (Squid/1.1.22) for client 24.112.8.23
X-MyDeja-Info: XMYDJUIDtomstdenis
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <t72tlvcnn1ce6c AT corp DOT supernews DOT co DOT uk>,
  "Jimbo" <rpgfreak AT lineone DOT net> wrote:
> Hi,
>
> I am writing a game in DJGPP with Allegro and I was wondering if, within all
> the sprite functions that are there, there are any that allow you to move
> sprites around that don't actually print themselves onto the background
> (i.e. the background is replaced). I know that I could do this using
> blitting, but isn't there an easier way? Isn't blitting slow? And what are
> the differences between sprite objects and bitmap objects?

Sprite objects are transparent if the color is 0 (8bpp) or hot pink (not
8bpp).	They are used for pictures that will overlay the backdrop.

And you have to redraw the background to erase sprites, there is no easier
way.  You could do this via

1) double buffering, just blit the entire backdrop over it
2) dirty rectangles, replace portions used.

Tom


Sent via Deja.com
http://www.deja.com/

- Raw text -


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