www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/13/23:52:00

From: aho450s AT nic DOT smsu DOT edu (Tony O'Bryan)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: A couple of Qs:
Date: Thu, 13 Feb 1997 23:12:25 GMT
Organization: Southwest Missouri State University
Lines: 20
Message-ID: <33039da8.5190747@ursa.smsu.edu>
References: <33011c81 DOT 0 AT ntnews DOT compusmart DOT ab DOT ca>
NNTP-Posting-Host: forseti.i70.smsu.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Wed, 12 Feb 1997 01:26:17 GMT, demandrd AT compusmart DOT ab DOT ca (Demandred) wrote:

>2.  When using Allegro's draw_rle_sprite() can one pass in negative
>BITMAP coordinates, that is, does it clip the sprite for you if it's
>upper left-hand corner is at, say (-5,-27)?

No.  The only thing to be done with an RLE sprite is to quickly place it onto a
bitmap.  No special processing (clipping, stretching, rotating, etc) can be
performed on them.  From the documentation:

Every silver lining has a cloud, though, and in the case of RLE sprites it 
is a lack of flexibility. You can't draw onto them, and you can't flip them, 
rotate them, or stretch them. In fact the only thing you can do with them is 
to blast them onto a bitmap with the draw_rle_sprite() function

There is a trick, though, to simulate clipping with RLE sprites.  Create a
hidden background screen that is larger than your display area.   If you're
using tiles, one extra tile width to the left and right and one extra tile
height at the top and bottom of your hidden background screen will suffice.  

- Raw text -


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