diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/Makefile.am | 2 | ||||
-rw-r--r-- | src/libs/ascii/Makefile.am | 3 | ||||
-rw-r--r-- | src/libs/ascii/ascii.c | 1227 | ||||
-rw-r--r-- | src/libs/ascii/ascii.h | 9 |
4 files changed, 1240 insertions, 1 deletions
diff --git a/src/libs/Makefile.am b/src/libs/Makefile.am index 266fcf0..48fb649 100644 --- a/src/libs/Makefile.am +++ b/src/libs/Makefile.am @@ -1 +1 @@ -SUBDIRS = grid ray +SUBDIRS = ascii grid ray diff --git a/src/libs/ascii/Makefile.am b/src/libs/ascii/Makefile.am new file mode 100644 index 0000000..41476bb --- /dev/null +++ b/src/libs/ascii/Makefile.am @@ -0,0 +1,3 @@ +noinst_LIBRARIES = libascii.a +libascii_a_SOURCES = ascii.c ascii.h +libascii_a_CPPFLAGS = -I@top_srcdir@/src diff --git a/src/libs/ascii/ascii.c b/src/libs/ascii/ascii.c new file mode 100644 index 0000000..ee3bd0c --- /dev/null +++ b/src/libs/ascii/ascii.c @@ -0,0 +1,1227 @@ +#include "ascii.h" + +const char ascii_chars[256][ASCII_WIDTH * ASCII_HEIGHT] = { + ['!'] = { + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, + ['"'] = { + 0, 1, 0, 1, 0, + 0, 1, 0, 1, 0, + 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, + ['#'] = { + 0, 0, 0, 0, 0, + 0, 1, 0, 1, 0, + 0, 1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, 0, + }, + ['{'] = { + 0, 0, 0, 1, 1, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 1, 1, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 1, 1, + }, + ['|'] = { + 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, + }, + ['}'] = { + 1, 1, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 1, 1, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, + 1, 1, 0, 0, 0, + }, + ['~'] = { + 0, 1, 0, 0, 1, + 1, 0, 1, 0, 1, + 1, 0, 0, 1, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + }, +}; diff --git a/src/libs/ascii/ascii.h b/src/libs/ascii/ascii.h new file mode 100644 index 0000000..6c86898 --- /dev/null +++ b/src/libs/ascii/ascii.h @@ -0,0 +1,9 @@ +#ifndef _ASCII_H +#define _ASCII_H + +#define ASCII_WIDTH 5 +#define ASCII_HEIGHT 11 + +extern const char ascii_chars[256][ASCII_WIDTH * ASCII_HEIGHT]; + +#endif |