ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 7ceae2f47d5213f7be09e60945e6a337fe159629
parent e48d88ddf5c0c38fd24167aba4e86e3acc1ab229
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Sun, 26 Jul 2015 22:29:31 +0200

Modifying functions prototypes to accept bits option as an integer value

Diffstat:
Msrc/ansilove.c | 8++++----
Msrc/ansilove.h | 8++++----
Msrc/main.c | 8++++----
3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/ansilove.c b/src/ansilove.c @@ -38,7 +38,7 @@ void alDrawChar(gdImagePtr im, const unsigned char *font_data, int32_t int_bits, } // ANSi -void alAnsiLoader(char *input, char *output, char *retinaout, char *font, char *bits, char *icecolors, char *fext, bool createRetinaRep) +void alAnsiLoader(char *input, char *output, char *retinaout, char *font, int32_t int_bits, char *mode, char *icecolors, char *fext, bool createRetinaRep) { const unsigned char *font_data; @@ -1012,7 +1012,7 @@ void alAnsiLoader(char *input, char *output, char *retinaout, char *font, char * } // PCB -void alPcBoardLoader(char *input, char *output, char *retinaout, char *font, char *bits, bool createRetinaRep) +void alPcBoardLoader(char *input, char *output, char *retinaout, char *font, int32_t int_bits, bool createRetinaRep) { // some type declarations int32_t font_size_x; @@ -1398,7 +1398,7 @@ void alPcBoardLoader(char *input, char *output, char *retinaout, char *font, cha } // BINARY -void alBinaryLoader(char *input, char *output, char *retinaout, char *columns, char *font, char *bits, char *icecolors, bool createRetinaRep) +void alBinaryLoader(char *input, char *output, char *retinaout, char *columns, char *font, int32_t int_bits, char *icecolors, bool createRetinaRep) { // some type declarations int32_t font_size_x; @@ -1988,7 +1988,7 @@ void alIcedrawLoader(char *input, char *output, char *retinaout, bool fileHasSAU } // TUNDRA -void alTundraLoader(char *input, char *output, char *retinaout, char *font, char *bits, bool fileHasSAUCE, bool createRetinaRep) +void alTundraLoader(char *input, char *output, char *retinaout, char *font, int32_t int_bits, bool fileHasSAUCE, bool createRetinaRep) { int32_t columns = 80; int32_t font_size_x; diff --git a/src/ansilove.h b/src/ansilove.h @@ -30,12 +30,12 @@ void alDrawChar(gdImagePtr im, const unsigned char *font_data, int32_t int_bits, int32_t font_size_x, int32_t font_size_y, int32_t position_x, int32_t position_y, int32_t color_background, int32_t color_foreground, unsigned char character); -void alAnsiLoader(char *input, char *output, char *retinaout, char *font, char *bits, char *icecolors, char *fext, bool createRetinaRep); -void alPcBoardLoader(char *input, char *output, char *retinaout, char *font, char *bits, bool createRetinaRep); -void alBinaryLoader(char *input, char *output, char *retinaout, char *columns, char *font, char *bits, char *icecolors, bool createRetinaRep); +void alAnsiLoader(char *input, char *output, char *retinaout, char *font, int32_t int_bits, char *mode, char *icecolors, char *fext, bool createRetinaRep); +void alPcBoardLoader(char *input, char *output, char *retinaout, char *font, int32_t int_bits, bool createRetinaRep); +void alBinaryLoader(char *input, char *output, char *retinaout, char *columns, char *font, int32_t int_bits, char *icecolors, bool createRetinaRep); void alArtworxLoader(char *input, char *output, char *retinaout, bool createRetinaRep); void alIcedrawLoader(char *input, char *output, char *retinaout, bool fileHasSAUCE, bool createRetinaRep); -void alTundraLoader(char *input, char *output, char *retinaout, char *font, char *bits, bool fileHasSAUCE, bool createRetinaRep); +void alTundraLoader(char *input, char *output, char *retinaout, char *font, int32_t int_bits, bool fileHasSAUCE, bool createRetinaRep); void alXbinLoader(char *input, char *output, char *retinaout, bool createRetinaRep); // helper functions diff --git a/src/main.c b/src/main.c @@ -231,12 +231,12 @@ int main(int argc, char *argv[]) // create the output file by invoking the appropiate function if (strcmp(fext, ".pcb") == 0) { // params: input, output, font, bits, icecolors - alPcBoardLoader(input, output, retinaout, font, bits, createRetinaRep); + alPcBoardLoader(input, output, retinaout, font, int_bits, createRetinaRep); fileIsPCBoard = true; } else if (strcmp(fext, ".bin") == 0) { // params: input, output, columns, font, bits, icecolors - alBinaryLoader(input, output, retinaout, columns, font, bits, icecolors, createRetinaRep); + alBinaryLoader(input, output, retinaout, columns, font, int_bits, icecolors, createRetinaRep); fileIsBinary = true; } else if (strcmp(fext, ".adf") == 0) { @@ -248,7 +248,7 @@ int main(int argc, char *argv[]) alIcedrawLoader(input, output, retinaout, fileHasSAUCE, createRetinaRep); } else if (strcmp(fext, ".tnd") == 0) { - alTundraLoader(input, output, retinaout, font, bits, fileHasSAUCE, createRetinaRep); + alTundraLoader(input, output, retinaout, font, int_bits, fileHasSAUCE, createRetinaRep); fileIsTundra = true; } else if (strcmp(fext, ".xb") == 0) { @@ -257,7 +257,7 @@ int main(int argc, char *argv[]) } else { // params: input, output, font, bits, icecolors, fext - alAnsiLoader(input, output, retinaout, font, bits, icecolors, fext, createRetinaRep); + alAnsiLoader(input, output, retinaout, font, int_bits, mode, icecolors, fext, createRetinaRep); fileIsANSi = true; }