bullshit commit, sync for travel (to zn00H!) :)
[my-code/arm.git] / betty / bmp2b.c
index b61ac49..0010f15 100644 (file)
@@ -92,14 +92,15 @@ int main(int argc,char **argv) {
        }
 
        if(stat==CHAR)
-               dprintf(fd,"unsigned char default_logo[%d]={\n",DX*PM*2);
+               dprintf(fd,"const unsigned char default_logo[%d]={\n",DX*PM*2);
 
        for(page=0;page<PM;page++) {
                for(col=0;col<DX;col++) {
                        buf[0]=0;
                        buf[1]=0;
                        for(i=0;i<8;i++) {
-                               pix=((page*8+i)*DX)+col;
+                               // bmp: bottom rows first ... (i forgot that!)
+                               pix=((DY-1-(page*8+i))*DX)+col;
                                b=src.map[pix].r+src.map[pix].g+src.map[pix].b;
                                b/=3;
                                if(b<=(0.25*255)) {