Changeset cc8f3af in thomson


Ignore:
Timestamp:
Mar 19, 2012, 7:46:08 AM (12 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
7cabd49
Parents:
e18627d
Message:

GFX2MO5

  • Allow picture to be less high than the screen and don't write the useless bytes
  • Don't set execution address to 3000, this makes no sense. Set it to 0, which makes no sense either.

git-svn-id: svn://localhost/thomson@23 85ae3b6b-dc8f-4344-a89d-598714f2e4e5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gfx2mo5/png2mo5.c

    re18627d rcc8f3af  
    4242
    4343  // End marker block : type=255, size and address=0
    44   const unsigned char end[]={255,0,0,0x30,0};
     44  const unsigned char end[]={255,0,0,0,0};
    4545
    4646  if(argc != 3)
     
    129129  outBuffer = raw2mo5(inBuffer);
    130130
     131  int pxsize = width * height / 8;
     132  thomheader[7] = pxsize >> 8;
     133  thomheader[8] = pxsize;
     134
    131135  outFile = fopen(argv[2], "wb");
    132136  fwrite(thomheader, 1, sizeof(thomheader), outFile);
    133137  //write forme data
    134   fwrite(outBuffer, 1, 0x1F40, outFile);
     138  fwrite(outBuffer, 1, pxsize, outFile);
    135139  thomheader[5] = 0x50;
    136140  fwrite(thomheader, 1, sizeof(thomheader), outFile);
    137141  // write color data
    138   fwrite(outBuffer+0x2000, 1, 0x1f40, outFile);
     142  fwrite(outBuffer+0x2000, 1, pxsize, outFile);
    139143  fwrite(end, 1, sizeof(end), outFile);
    140144
Note: See TracChangeset for help on using the changeset viewer.