[v0.99] Add color manually to ascii with replace=true and change the printing algorithm to support this new format

This commit is contained in:
Dr-Noob
2021-08-10 10:32:08 +02:00
parent 6a67b87abc
commit 7cd578b889
2 changed files with 108 additions and 78 deletions

View File

@@ -36,12 +36,20 @@ struct ascii_logo {
* the color in ascii_logo->color_ascii[N]
* CR: Color reset, gets replaced by the reset
* color by printer.c
* Logos with replace_blocks are replaced by character
*
* Logos with replace_blocks=true are replaced by character
* blocks (actually, spaces with background color), so
* the color in the structure must be COLOR_BG_XXX. When
* replace_blocks is true, the characters '#' are replaced
* by spaces printed with color_ascii[0], and '@' are
* printed with color_ascii[1]
* printed with color_ascii[1]. If replace_blocks=true,
* color format specified in ASCIIs ($C1, $C2) are ignored.
*
* In any case, '$' is a illegal character to be used in
* the ascii logos because it is used to parse colors
*
* LONG_LOGOS will be printed only if the fit in the screen,
* otherwise SHORT_LOGOS will be used
*/
// SHORT LOGOS //
@@ -162,87 +170,87 @@ $C1 ###### ## ### ### ## ### "
// jp2a --height=17 ibm.jpg
#define ASCII_IBM \
"######### ################ ######### ######### \
\
######### ################## ########## ########## \
\
##### ###### ###### #################### \
\
##### ############## #################### \
\
##### ###### ###### ##### ###### ##### \
\
######### ################## ######## #### ######## \
\
######### ################ ######## ## ######## "
"$C1######### ################ ######### ######### \
$C1 \
$C1######### ################## ########## ########## \
$C1 \
$C1 ##### ###### ###### #################### \
$C1 \
$C1 ##### ############## #################### \
$C1 \
$C1 ##### ###### ###### ##### ###### ##### \
$C1 \
$C1######### ################## ######## #### ######## \
$C1 \
$C1######### ################ ######## ## ######## "
// --------------------- LONG LOGOS ------------------------- //
#define ASCII_AMD_L \
" \
\
\
\
\
\
@@@@ @@@ @@@ @@@@@@@@ ############ \
@@@@@@ @@@@@ @@@@@ @@@ @@@ ########## \
@@@ @@@ @@@@@@@@@@@@@ @@@ @@ # ##### \
@@@ @@@ @@@ @@@ @@@ @@@ @@ ### ##### \
@@@@@@@@@@@@ @@@ @@@ @@@ @@@ ######### ### \
@@@ @@@ @@@ @@@ @@@@@@@@@ ######## ## \
\
\
\
\
\
\
"
"$C1 \
$C1 \
$C1 \
$C1 \
$C1 \
$C1 \
$C1 @@@@ @@@ @@@ @@@@@@@@ $C2 ############ \
$C1 @@@@@@ @@@@@ @@@@@ @@@ @@@ $C2 ########## \
$C1 @@@ @@@ @@@@@@@@@@@@@ @@@ @@ $C2 # ##### \
$C1 @@@ @@@ @@@ @@@ @@@ @@@ @@ $C2 ### ##### \
$C1 @@@@@@@@@@@@ @@@ @@@ @@@ @@@ $C2######### ### \
$C1 @@@ @@@ @@@ @@@ @@@@@@@@@ $C2######## ## \
$C1 \
$C1 \
$C1 \
$C1 \
$C1 \
$C1 \
$C1 "
#define ASCII_INTEL_L \
" ###############@ \
######@ ######@ \
###@ ###@ \
##@ ###@ \
##@ ##@ \
##@ ##@ \
@ ##@ ##@ ##@ \
#@ ##@ ########@ #####@ #####@ ##@ ##@ \
#@ ##@ ##@ ##@ ##@ ###@ ###@ ##@ ##@ \
#@ ##@ ##@ ##@ ##@ ##@ ##@ ##@ ##@ \
#@ ##@ ##@ ##@ ##@ #########@ ##@ ###@ \
#@ ##@ ##@ ##@ ##@ ##@ ##@ ####@ \
#@ #@ ##@ ##@ ####@ ########@ #@ ##@ \
##@ \
##@ \
###@ ###@ \
####@ #########@ \
#########@ ###############@ \
##############################@ "
"$C1 ###############@ \
$C1 ######@ ######@ \
$C1 ###@ ###@ \
$C1 ##@ ###@ \
$C1 ##@ ##@ \
$C1 ##@ ##@ \
$C1 @ ##@ ##@ ##@ \
$C1 #@ ##@ ########@ #####@ #####@ ##@ ##@ \
$C1 #@ ##@ ##@ ##@ ##@ ###@ ###@ ##@ ##@ \
$C1 #@ ##@ ##@ ##@ ##@ ##@ ##@ ##@ ##@ \
$C1 #@ ##@ ##@ ##@ ##@ #########@ ##@ ###@ \
$C1 #@ ##@ ##@ ##@ ##@ ##@ ##@ ####@ \
$C1 #@ #@ ##@ ##@ ####@ ########@ #@ ##@ \
$C1 ##@ \
$C1 ##@ \
$C1 ###@ ###@ \
$C1 ####@ #########@ \
$C1 #########@ ###############@ \
$C1 ##############################@ "
#define ASCII_ARM_L \
" ############ ########## #### ###### ######## \
############### ######### ####################### \
#### #### #### ##### ####### ##### \
#### #### #### #### ##### #### \
#### #### #### #### #### #### \
#### ##### #### #### #### #### \
############### #### #### #### #### \
######## #### #### #### #### #### "
"$C1 ############ ########## #### ###### ######## \
$C1 ############### ######### ####################### \
$C1 #### #### #### ##### ####### ##### \
$C1#### #### #### #### ##### #### \
$C1#### #### #### #### #### #### \
$C1 #### ##### #### #### #### #### \
$C1 ############### #### #### #### #### \
$C1 ######## #### #### #### #### #### "
#define ASCII_IBM_L \
" ############ ################ ########## ########## \
\
############ ################## ############ ############ \
\
###### ###### ###### #################### \
\
###### ############## #################### \
\
###### ###### ###### ##### ###### ##### \
\
############ ################## ######### #### ######### \
\
############ ################ ######### ## ######### "
"$C1 ############ ################ ########## ########## \
$C1 \
$C1 ############ ################## ############ ############ \
$C1 \
$C1 ###### ###### ###### #################### \
$C1 \
$C1 ###### ############## #################### \
$C1 \
$C1 ###### ###### ###### ##### ###### ##### \
$C1 \
$C1 ############ ################## ######### #### ######### \
$C1 \
$C1 ############ ################ ######### ## ######### "
typedef struct ascii_logo asciiL;