ansilove

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

commit e6236e08e2e2cc636986b0daa1171028f1a42a3b
parent 1689a947a7530847d1fc0a9abcca220c211c1ab4
Author: Brian Cassidy <bricas@cpan.org>
Date:   Thu, 16 Feb 2012 13:56:24 -0400

remove pow, use bitshift

Diffstat:
Mansilove/ansilove.c | 2+-
Mansilove/ansilove.h | 1-
Mshbuild/build_ubuntu.sh | 2+-
3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ansilove/ansilove.c b/ansilove/ansilove.c @@ -1556,7 +1556,7 @@ void alArtworxLoader(char *input, char output[], char bits[]) for (loop_column = 0; loop_column < 8; loop_column++) { - adf_character_column = 128 / pow(2, loop_column); + adf_character_column = 0x80 >> loop_column; if ((adf_character_line & adf_character_column) != adf_character_column) { diff --git a/ansilove/ansilove.h b/ansilove/ansilove.h @@ -21,7 +21,6 @@ #include <stdio.h> #include <stdlib.h> #include <gd.h> -#include <math.h> #include "alconfig.h" #include "strtolower.h" #include "substr.h" diff --git a/shbuild/build_ubuntu.sh b/shbuild/build_ubuntu.sh @@ -12,7 +12,7 @@ echo "=========================================" echo "AnsiLove/C build script --> Ubuntu Linux " echo "=========================================" echo "... building" -gcc -Wall -I../lib/MacOSX/libgd/include/ ../ansilove/main.c ../ansilove/alconfig.h ../ansilove/ansilove.h ../ansilove/ansilove.c ../ansilove/substr.h ../ansilove/substr.c ../ansilove/strtolower.h ../ansilove/strtolower.c ../ansilove/explode.h ../ansilove/explode.c ../ansilove/filesize.h ../ansilove/filesize.c /usr/lib/libgd.so.2 -lm -o ansilove +gcc -Wall -I../lib/MacOSX/libgd/include/ ../ansilove/main.c ../ansilove/alconfig.h ../ansilove/ansilove.h ../ansilove/ansilove.c ../ansilove/substr.h ../ansilove/substr.c ../ansilove/strtolower.h ../ansilove/strtolower.c ../ansilove/explode.h ../ansilove/explode.c ../ansilove/filesize.h ../ansilove/filesize.c /usr/lib/libgd.so.2 -o ansilove echo "... done." exit