Changeset 9fb0db9 in thomson
- Timestamp:
- Mar 7, 2013, 10:29:47 PM (11 years ago)
- Branches:
- main
- Children:
- 6b23e9a
- Parents:
- 62e3665
- Location:
- tools/gfx2mo5
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gfx2mo5/libraw2mo5.c
r62e3665 r9fb0db9 11 11 #include <string.h> 12 12 13 unsigned char *raw2mo5(unsigned char *input, boolfixup)13 unsigned char *raw2mo5(unsigned char *input, int height, int fixup) 14 14 { 15 15 unsigned char *tmpBuffer; … … 26 26 27 27 bool lfo = false; 28 for (y = 0; y < 200; y++)28 for (y = 0; y < height; y++) 29 29 for (x = 0; x < 320; x+=8) { 30 30 int fore = 255; … … 58 58 } 59 59 60 if (fore == 255) fore = 7;60 if (fore == 255) fore = fixup; 61 61 if (fore != 255) { 62 62 previous &= 0xF; … … 71 71 // are both FORME or both FOND, else we get an ugly glitch on the 72 72 // 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)) 74 74 { 75 75 previous = (previous >> 4) | (previous << 4); -
tools/gfx2mo5/libraw2mo5.h
r62e3665 r9fb0db9 10 10 #define LIBRAW2mo5_H 1 11 11 12 unsigned char * raw2mo5(unsigned char *input, boolfixup);12 unsigned char * raw2mo5(unsigned char *input, int height, int fixup); 13 13 14 14 #endif -
tools/gfx2mo5/png2mo5.c
r62e3665 r9fb0db9 127 127 png_read_image(png_ptr, ptrRow); 128 128 129 outBuffer = raw2mo5(inBuffer, argc > 3);129 outBuffer = raw2mo5(inBuffer, height, argc > 3 ? atoi(argv[3]):-1); 130 130 131 131 int pxsize = width * height / 8;
Note:
See TracChangeset
for help on using the changeset viewer.