From: Matthew S. <ma...@th...> - 2000-11-19 19:51:15
|
----- Original Message ----- From: Santiago Romero <com...@es...> > > BUT when I use the following, the colors are wrong and only the left > half of the screen is used (getting 105 fps, this is the reason I > want to use the precalculated tables instead of letting allegro to do > color conversion): > > > #define PutPixel(dst,x,y,color) dst->line[y][x]=colors[color] The problem here is that the line [y][x] is in bytes I think this will work, but i am not an expert at casting #define PutPixel(dst,x,y,color) (short) (dst->line) [y] [x*2] = colors[color]; |