Changeset 37 in Thomson


Ignore:
Timestamp:
03/04/13 22:24:01 (8 years ago)
Author:
pulkomandy
Message:

Allow to use the glitched mode, sometimes it's useful.

Location:
tools/gfx2mo5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tools/gfx2mo5/libraw2mo5.c

    r35 r37  
    1111#include <string.h>
    1212
    13 unsigned char *raw2mo5(unsigned char *input)
     13unsigned char *raw2mo5(unsigned char *input, bool fixup)
    1414{
    1515  unsigned char *tmpBuffer;
     
    5858                }
    5959
     60                if (fore == 255) fore = 7;
    6061                if (fore != 255) {
    6162                        previous &= 0xF;
     
    7071                // are both FORME or both FOND, else we get an ugly glitch on the
    7172                // EFGJ033 Gate Array MO5!
    72                 if(oldlfo == !(tmpBuffer[(y*320+x)/8] & 0x80))
     73                if(fixup && oldlfo == !(tmpBuffer[(y*320+x)/8] & 0x80))
    7374                {
    7475                        previous = (previous >> 4) | (previous << 4);
  • tools/gfx2mo5/libraw2mo5.h

    r20 r37  
    22 * CloudStrife - 20080921
    33 * Diffusé sous licence libre CeCILL v2
    4  * Voire LICENCE
     4 * Voir LICENCE
    55 */
     6
     7#include <stdbool.h>
    68
    79#ifndef LIBRAW2mo5_H
    810#define LIBRAW2mo5_H 1
    911
    10 unsigned char * raw2mo5(unsigned char *input);
     12unsigned char * raw2mo5(unsigned char *input, bool fixup);
    1113
    1214#endif
  • tools/gfx2mo5/png2mo5.c

    r23 r37  
    4444  const unsigned char end[]={255,0,0,0,0};
    4545
    46   if(argc != 3)
     46  if(argc < 3)
    4747  {
    48     printf("Utilisation : %s input_filename output_filename\n",argv[0]);
     48    printf("Utilisation : %s input_filename output_filename options\n",argv[0]);
    4949    exit(0);
    5050  }
     
    127127  png_read_image(png_ptr, ptrRow);
    128128
    129   outBuffer = raw2mo5(inBuffer);
     129  outBuffer = raw2mo5(inBuffer, argc > 3);
    130130
    131131  int pxsize = width * height / 8;
Note: See TracChangeset for help on using the changeset viewer.