Changeset 9fb0db9 in thomson for tools/gfx2mo5/libraw2mo5.c


Ignore:
Timestamp:
Mar 7, 2013, 10:29:47 PM (11 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
6b23e9a
Parents:
62e3665
Message:

Allow gfx with less than 200px height.
Allow to set the color for unused cells.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gfx2mo5/libraw2mo5.c

    r62e3665 r9fb0db9  
    1111#include <string.h>
    1212
    13 unsigned char *raw2mo5(unsigned char *input, bool fixup)
     13unsigned char *raw2mo5(unsigned char *input, int height, int fixup)
    1414{
    1515  unsigned char *tmpBuffer;
     
    2626
    2727  bool lfo = false;
    28   for (y = 0; y < 200; y++)
     28  for (y = 0; y < height; y++)
    2929        for (x = 0; x < 320; x+=8) {
    3030                int fore = 255;
     
    5858                }
    5959
    60                 if (fore == 255) fore = 7;
     60                if (fore == 255) fore = fixup;
    6161                if (fore != 255) {
    6262                        previous &= 0xF;
     
    7171                // are both FORME or both FOND, else we get an ugly glitch on the
    7272                // EFGJ033 Gate Array MO5!
    73                 if(fixup && oldlfo == !(tmpBuffer[(y*320+x)/8] & 0x80))
     73                if(fixup > 0 && oldlfo == !(tmpBuffer[(y*320+x)/8] & 0x80))
    7474                {
    7575                        previous = (previous >> 4) | (previous << 4);
Note: See TracChangeset for help on using the changeset viewer.