From: Duilio J. P. <dp...@fc...> - 2004-07-01 16:17:49
|
I suggest to change the _VisPalette structure from: struct _VisPalette { unsigned char r[256]; unsigned char g[256]; unsigned char b[256]; }; to struct _VisPalette { int ncolors; VisColor *colors; }; where _VisColor is: struct _VisColor { unsigned char r; unsigned char g; unsigned char b; unsigned char unused; }; This way the palette size is not fixed, the colors fit well in memory, and we have the same structure than SDL have, so we can copy palettes with just a memcpy(). Regards, Duilio. |