Mail Archives: djgpp/1999/03/23/07:36:09
Et1850 wrote in message <19990322163156 DOT 10646 DOT 00000122 AT ng-fb1 DOT aol DOT com>...
>Some Questions
>
>1. how do i get and r,g,b, into a one diget color. rgb needs three numbers
but
> the command in allegro want one number.
>
> RGB mycolor = {43,56,123}; *rgb colors here are ex.
>
> set_color = (0,mycolor); *Wrong, mycolor is not const
> (0,&mycolor) *Wrong, mycolor is not int
You could just use
makecol(mycolor.r,mycolor.g,mycolor.b)
or you could try and convert it yourself using bitshifts, but then you could
make a
mistake if you use another color depth.
I hope this helps.
Obsidian
- Raw text -