Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
295 B
2
Indexable
Never
void GeneratePalette(void)
{
    int i;
    byte pal[768];

    for (i=0; i<768; i++) pal[i] = 0;
    
    for (i=0; i<16; i++) {        // a small grayscale palette
        pal[i * 3 + 0] = i * 4;
        pal[i * 3 + 1] = i * 4;
        pal[i * 3 + 1] = i * 4;
    }

    VGA_SetPalette(pal);
}
Leave a Comment