delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/27/20:56:35

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Troubles with Allegro 2.2
Date: Thu, 27 Mar 1997 19:11:01 +0000
Organization: None
Distribution: world
Message-ID: <FiCiPDAFZsOzEwmU@talula.demon.co.uk>
References: <01bc3a75$35ede8e0$cd483ac2 AT oleg DOT channel12 DOT ru>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 42
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Oleg Shamshura writes:
>The DAT-file grows when I change type of sprites from BITMAP to RLE-sprite.
>It looks strange, because I create these to be easy RLE-compressed.
>As I notice, good results are only for transparent areas, but what about
>large monochrome regions? Or am I wrong?

The RLE format only compresses runs of solid vs. masked pixels, not the
actual color values. My priority was speed of drawing (reducing the
number of comparisons) rather than saving space: the fact that RLE
sprites are usually smaller than regular bitmaps is just a nice side
benefit.

In a worst-case situation (alternating solid and zero pixels) the RLE
data will be about twice the size of a raw bitmap. If there are no zero
pixels in your data, it will be a few bytes larger, but if there are
large masked areas it will be a lot smaller. There really isn't any
point in using RLE sprites unless you have some zero pixels that need to
be masked off...

>play_fli() desn't update entire frame area for FLC files, so garbage
>of the previous frame is visible at the bottom.

I have one FLC that does that, but after spending a few hours
investigating and failing to find the problem, I gave up on it. When I
used DTA to split the animation up into frames and then recompose it,
the resulting file played fine, so you could always try that as a
workaround :-) If you send me some FLC's that demonstrate this trouble
it might help me locate it, but to be honest it is very low priority at
the moment. Also, if anyone has any good docs on the FLC format, I'd
love to see them! (the ones I have are very sketchy).

>Also, it refuses to deal with one-frame flics (shows nothing, returns
>FLI_ERROR).

Sounds very possible. I find it hard to be concered about this problem
(what is the point of a single frame animation?) but I will investigate
and see if I can find some easy fix...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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