libansilove

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

config.h (2430B)


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