libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

config.h (2386B)


      1 /*
      2  * config.h
      3  * libansilove 1.2.7
      4  * https://www.ansilove.org
      5  *
      6  * Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
      7  * All rights reserved.
      8  *
      9  * libansilove is licensed under the BSD 2-Clause License.
     10  * See LICENSE file for details.
     11  */
     12 
     13 #ifndef CONFIG_H
     14 #define CONFIG_H
     15 
     16 #include <stdint.h>
     17 
     18 #define LF	'\n'
     19 #define CR	'\r'
     20 #define TAB	'\t'
     21 #define SUB	26
     22 #define ESC	27
     23 
     24 #define PCB_COLORS	71
     25 
     26 static const uint8_t ansi_palette_red[] = {
     27 	0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa,
     28 	0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff
     29 };
     30 
     31 static const uint8_t ansi_palette_green[] = {
     32 	0x00, 0x00, 0xaa, 0x55, 0x00, 0x00, 0xaa, 0xaa,
     33 	0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff
     34 };
     35 
     36 static const uint8_t ansi_palette_blue[] = {
     37 	0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa,
     38 	0x55, 0x55, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff
     39 };
     40 
     41 static const uint8_t workbench_palette_red[] = {
     42 	0xaa, 0x00, 0xff, 0x66, 0x00, 0xff, 0x00, 0xff,
     43 	0xaa, 0x00, 0xff, 0x66, 0x00, 0xff, 0x00, 0xff
     44 };
     45 
     46 static const uint8_t workbench_palette_green[] = {
     47 	0xaa, 0x00, 0xff, 0x88, 0x00, 0x00, 0xff, 0xff,
     48 	0xaa, 0x00, 0xff, 0x88, 0x00, 0x00, 0xff, 0xff
     49 };
     50 
     51 static const uint8_t workbench_palette_blue[] = {
     52 	0xaa, 0x00, 0xff, 0xbb, 0xff, 0xff, 0xff, 0xff,
     53 	0xaa, 0x00, 0xff, 0xbb, 0xff, 0xff, 0xff, 0xff
     54 };
     55 
     56 static const uint8_t vga_palette_red[] = {
     57 	0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa,
     58 	0x55, 0x55, 0x55, 0x55, 0xff, 0xff, 0xff, 0xff
     59 };
     60 
     61 static const uint8_t vga_palette_green[] = {
     62 	0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x55, 0xaa,
     63 	0x55, 0x55, 0xff, 0xff, 0x55, 0x55, 0xff, 0xff
     64 };
     65 
     66 static const uint8_t vga_palette_blue[] = {
     67 	0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa,
     68 	0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff
     69 };
     70 
     71 /* ADF color mapping array */
     72 static const uint8_t adf_colors[16] = { 0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63 };
     73 
     74 static const uint8_t pcb_colors[PCB_COLORS] = {
     75 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     76 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     77 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     78 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     79 	0x00, 0x04, 0x02, 0x06, 0x01, 0x05, 0x03, 0x07, 0x08, 0x0c, 0x00, 0x00,
     80 	0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0e, 0x09, 0x0d, 0x0b, 0x0f
     81 };
     82 
     83 #endif /* CONFIG_H */