[Scummvm-devel] cost of palette changes

Johannes Schickel lordhoto at scummvm.org
Mon Jun 28 22:48:12 CEST 2010


On 06/28/2010 10:32 PM, Robert Špalek wrote:
> yesterday I implemented palette fading when entering and leaving a 
> location in Dragon History, because that's what the original player 
> does.  it runs nicely on my desktop, but I'm not sure how expensive it 
> is on pocket devices.  with 8-bit colors the palette change is cheap, 
> but with True-Color everything needs to be recomputed.  can anyone 
> tell me what the rule of thumb is?  I'm fading the palette in 15 
> phases in less than a second, but I can decrease the number of phases.

All I know is that it is indeed expensive and thus should be only done 
when needed. I think our MADE engine once was affected by too many 
palette operations and thus bad performance. I guess testing the engine 
on some small devices would be best to determine whether it works fine 
or not, at least I'm not sure whether we have any real rule on how often 
one can call it per second without worrying too much....

>
> btw, I've started working on compressing the original dubbing into 
> MP3's et al., and it looks pretty simple.  I like Common::Archiver and 
> its ability to parse ZIP files and that's what I will use.

It might be noteworthy that the ZIP support is only available when zlib 
is available. I think some of our ports did not feature zlib support 
(not sure right now which ones though). Also when reading files from the 
zip archive, they will be first decompressed and read completely into 
the memory.

// Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20100628/4501ffc5/attachment.html>


More information about the Scummvm-devel mailing list