ansilove

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

commit a027a293bc0f2c9dac11a0d676d6b08c8c005627
parent cdf16924a27c3216fa579cf75ea6a817e52a74da
Author: ByteProject <stefan.vogt@byteproject.net>
Date:   Fri, 17 Feb 2012 22:18:45 +0100

wiping @bricas bad english :-P

Diffstat:
Mansilove/ansilove.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/ansilove/ansilove.c b/ansilove/ansilove.c @@ -1657,20 +1657,18 @@ void alIcedrawLoader(char *input, char output[], char bits[]) rewind(input_file); - sauce *saucerec = sauceReadFile( input_file ); + sauce *saucerec = sauceReadFile(input_file); // close input file, we don't need it anymore rewind(input_file); fclose(input_file); - // ajust filesize if sauce red + // in case the file contains a Sauce record, we need to adjust the file size if( saucerec != NULL ) { - input_file_size = saucerec->fileSize; + input_file_size -= 128 - ( saucerec->comments > 0 ? 5 + 64 * saucerec->comments : 0); } - // extract IDF header - // skip the ID part, generally "\x041.4" - // four 16-bit little endian unsigned shorts + // extract IDF header, four 16-bit little endian unsigned shorts int32_t x1 = (input_file_buffer[5] << 8) + input_file_buffer[4]; int32_t y1 = (input_file_buffer[7] << 8) + input_file_buffer[6]; int32_t x2 = (input_file_buffer[9] << 8) + input_file_buffer[8];