I have this code:
However I cannot figure out how colors work. Can anyone give me a table?
Code:
void drawPixel(int x, int y, u16 color, u8* screen)
{
int height=240;
u32 v=((239-y)+x*height) *2;
screen[v]=color;
screen[v+1]=color;
screen[v+2]=color;
}
void drawPixel(int x, int y, u16 r, u16 g, u16 b, u8* screen)
{
int height=240;
u32 v=((239-y)+x*height) *2;
screen[v]=r;
screen[v+1]=g;
screen[v+2]=b;
}
However I cannot figure out how colors work. Can anyone give me a table?
Last edited by Moocow9m,






