Re: [AD] Allegro5 and colors |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Javier Gonzalez wrote:
What about using a double (8 bytes) and typecasting it
Yuck :-)Besides, ANSI says nothing about the size of a double versus the size of other types. Some platform may have sizeof(double)<8.
Also, IMHO whatever type we are using, it should be straightforward to extract r,g,b components from it, without typecasting.
I also think that an optimizing compiler might get confused and put it in a floating point register, making it much slower.
I think that the best way to pass big size parameters is by a pointer to a struct.
Sven
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |