Changeset 732c820 in thomson
- Timestamp:
- Mar 4, 2013, 10:24:01 PM (11 years ago)
- Branches:
- main
- Children:
- 3b64f76
- Parents:
- b9b1bde
- Location:
- tools/gfx2mo5
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gfx2mo5/libraw2mo5.c
rb9b1bde r732c820 11 11 #include <string.h> 12 12 13 unsigned char *raw2mo5(unsigned char *input )13 unsigned char *raw2mo5(unsigned char *input, bool fixup) 14 14 { 15 15 unsigned char *tmpBuffer; … … 58 58 } 59 59 60 if (fore == 255) fore = 7; 60 61 if (fore != 255) { 61 62 previous &= 0xF; … … 70 71 // are both FORME or both FOND, else we get an ugly glitch on the 71 72 // EFGJ033 Gate Array MO5! 72 if( oldlfo == !(tmpBuffer[(y*320+x)/8] & 0x80))73 if(fixup && oldlfo == !(tmpBuffer[(y*320+x)/8] & 0x80)) 73 74 { 74 75 previous = (previous >> 4) | (previous << 4); -
tools/gfx2mo5/libraw2mo5.h
rb9b1bde r732c820 2 2 * CloudStrife - 20080921 3 3 * Diffusé sous licence libre CeCILL v2 4 * Voir eLICENCE4 * Voir LICENCE 5 5 */ 6 7 #include <stdbool.h> 6 8 7 9 #ifndef LIBRAW2mo5_H 8 10 #define LIBRAW2mo5_H 1 9 11 10 unsigned char * raw2mo5(unsigned char *input );12 unsigned char * raw2mo5(unsigned char *input, bool fixup); 11 13 12 14 #endif -
tools/gfx2mo5/png2mo5.c
rb9b1bde r732c820 44 44 const unsigned char end[]={255,0,0,0,0}; 45 45 46 if(argc !=3)46 if(argc < 3) 47 47 { 48 printf("Utilisation : %s input_filename output_filename \n",argv[0]);48 printf("Utilisation : %s input_filename output_filename options\n",argv[0]); 49 49 exit(0); 50 50 } … … 127 127 png_read_image(png_ptr, ptrRow); 128 128 129 outBuffer = raw2mo5(inBuffer );129 outBuffer = raw2mo5(inBuffer, argc > 3); 130 130 131 131 int pxsize = width * height / 8;
Note:
See TracChangeset
for help on using the changeset viewer.