[Scummvm-devel] setMouseCursor() keycolor

D G Turner d.g.turner at ntlworld.com
Fri Jan 8 20:52:10 CET 2010


Johannes Schickel wrote:
> Marcus Comstedt wrote:
>> Here's a patch for review which removes the default value for the
>> keycolor parameter.
>>   
> 
> Looks nice. We might want to do that on OSystem::setMouseCursor too. And 
> of course add a note about the range of the keycolor parameter in both 
> documentations :-).
> 
> Apart feel free to commit it.
> 
>> While I was doing inventory of all calls to CursorMan, I found one
>> rather peculiar thing:  The mohawk engine does provide the keycolor
>> explicitly, but in one case the color that it explicitly provides
>> is 0xFFFFFFFF!  The comment a few lines up says
>>
>>         // Myst ME stores some cursors as 24bpp images instead of 8bpp
>>
>> but if _pixelFormat is really a 24bpp format, and the engine really
>> wants white as the keycolor (unlikely as that seems), that would be
>> 0xFFFFFF, not 0xFFFFFFFF.  I'm guessing this code is simply in an
>> unfinished state and isn't really supposed to work yet, but just in
>> case there is a rationale for using this value, i'd like to hear it.
>>   
> 
> Matthew any idea about this?
> 
> // Johannes
> 

Marcus / Johnannes,

  Mea Culpa.

  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.

  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.

  I'm happy with whatever you do with this, as long as the Myst ME
  cursors still get a transparent background  :-)

-- 
Thanks,
David Turner

When people you greatly admire appear to be thinking
deep thoughts, they probably are thinking about lunch.
________________________________________________________________
This communication is intended solely for the addressee(s) and
is confidential. If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted
to be taken in reliance on it, is prohibited and is unlawful.
________________________________________________________________





More information about the Scummvm-devel mailing list