[Scummvm-devel] cost of palette changes

Matthew Hoops clone2727 at gmail.com
Tue Jun 29 01:01:23 CEST 2010


On Mon, Jun 28, 2010 at 5:00 PM, Lars Skovlund <lskovlun at image.dk> wrote:
> I am intrigued by this, because we are going to need partial palette
> updates for SCI32 video playing, i.e., palette operations on a subset
> of the system palette. My first instinct was to add a method to
> Graphics::VideoPlayer to support this (as an alternative to
> ::setSystemPalette()), but is it cheaper to keep a complete 256-color
> palette structure in the engine and ship that to the OSystem, or will
> some/all OSystem implementations benefit from only receiving the
> partial updates? The excluded colors are for stuff like UI elements
> etc.
setSystemPalette() is just a quick wrapper to apply the full palette
from Graphics::VideoDecoder::getPalette() to the backend's palette.
getPalette() should be used in all other cases.

-Matt




More information about the Scummvm-devel mailing list