[Scummvm-devel] setMouseCursor() keycolor

Johannes Schickel lordhoto at scummvm.org
Wed Jan 6 22:21:17 CET 2010


Marcus Comstedt wrote:
> Hm, seems nobody cares about the semantics of the keycolor argument
> to setMouseCursor()?
>
> I examined the problem a little further, and found that the breakage
> actually was caused by the gsoc2009-16bit merge, which changed the
> default value of the keycolor parameter in the CursorMan methods
> from 255 to 0xFFFFFFFF.  Changing the default value of a parameter is
> an incompatible API change; I say we should either change it back, or
> remove the default altogether.  Comments?
>   

I guess (albeit undocumented, or I missed something...) the backends 
should do clipping to the parameter, that it fits the setup bit depth. 
At least the reference implementation (in this case of the 16bpp merge 
the SDL implementation) does so... probably that fact was missed when 
writing the documentation.

It's arguable whether that's preferable though...

Actually I'm in favor in removing the default parameter and changing the 
documentation, so it is known that the value shouldn't exceed the 
maximum value for the set up bit depth. Of course in this case we should 
adept SDL to comply to this too and of course change all engines relying 
on a default value to use 255 :-). Should be at least the solution with 
the least surprises for both backend authors and engine authors.

// Johannes




More information about the Scummvm-devel mailing list