[Scummvm-devel] setMouseCursor() keycolor

Johannes Schickel lordhoto at gmail.com
Fri Jan 8 20:58:28 CET 2010


>  That was to fix a bug which resulted in the Myst ME cursors having
>  white rather than transparent backgrounds, which occured around r833
>  i.e. 14th-16th Nov 2009.
>
>  This was traced to the keycolor, which failed to match the default
>  white due to the keycolor variable size differences between different
>  backends. Some used uint8 for keycolor, others uint32.

Which backends did you test? For example some backends don't support
the 16bpp extensions yet, thus they just ignore the format parameter
and just always treat the data as 8bpp indxed.

Anyway I guess this is not cleary documented... Actually no backend
not supporting RBG colors should use the "format" parameter when
setting up the cursor at all.

>  I corrected this and the extra 0xFF was to cover the case of the color
>  being represented with an alpha channel i.e. ARGB to stop the problem
>  reemerging if the color format had alpha added.

Actually the backend should match the keycolor value according to the
format you passed along on setting up the cursor. I.e. when you setup
it as 24bpp 0xFFFFFFFF is an invalid color.

// Johannes




More information about the Scummvm-devel mailing list