On Sat, 2004-01-31 at 06:28, Leopold Toetsch wrote:

> /Me thinks, that setting colors with the struct doesn't work. I've
> change your sample to:
> 
>       # blue_color = _new_SDL_Color( 255, 255, 255 )
>       .local int blue
>       .local int red
>       .local int green
>       blue = 255 << 0
>       red = 255 << 16
>       green = 255 << 8
> 
> Passing one of these colors works fine (SDL_FillRect takes an UInt32
> color value, not a pointer to a struct). But it probably should use
> SDL_MapRGB() to be endian safe.

Oh right, that was from my previous attempt.  I've fixed _new_SDL_Color
to handle this appropriately.

> Below is the diff of the sample code (should that get checked in?)

How about examples/pni/sdl_blue_rectangle.imc?  I'm about five minutes
from having animated rectangles.  Then it's on to keypresses.

-- c

Reply via email to