How to draw pixel at specific location on the buffer?

Why not

for (int y = 0; y < 24; y++ ) { 
    if(BMP[y] != 0xF0) pi.pixels[y] = color(white);
    else pi.pixels[y] = color(black);
 }
1 Like