Files
Archived/terrarium_bk/terrarium/ascii_plant_data.c
2025-02-24 15:18:44 -05:00

582 lines
16 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/******************************************************************************
* ascii_plant_data.c
*
* Defines 40 unique ASCII plants, each 10 lines of up to 20 chars.
*
* For demonstration, theyll all be similar in shape, but each one will have
* some small text or symbol changes so that no two are exactly alike.
* You can replace these with more distinct art as desired.
******************************************************************************/
#include "ascii_plant_data.h"
/*
* We store all 40 plants ASCII lines in a 2D array of strings:
* PLANTS[40][10]
* where each string is up to 20 chars + null terminator.
*
* Each plant: 10 lines. Each line up to 20 chars wide.
*/
/*
Template shape (10 lines, 20 chars each):
" . "
" .. # "
" . ==+*- . - "
" :++*====.# "
" ==++-=#*+ "
" -%*=-#+#. "
" .-+**#. "
" .**+#. "
" .:=*++ "
" :--=. "
Well introduce slight variations for each plant to ensure uniqueness.
*/
static const char PLANT_ART[40][10][21] = {
/* 0: Snake Plant */
{
" . ",
" .. # ",
" . ==+*- . - ",
" :++*====.# ",
" S==++-=#*+ ",
" -%*=-#+#. ",
" .-+**#. S ",
" .**+#. ",
" .:=*++ S ",
" :--=. "
},
/* 1: Aloe Vera */
{
" . ",
" .. A ",
" . ==+*- . - ",
" :++*====.# A ",
" ==++-=#*+ ",
" A -%*=-#+#. ",
" .-+**#. ",
" .**+#. A ",
" .:=*++ ",
" :--=. "
},
/* 2: Rubber fig */
{
" (Rubber) ",
" .. # ",
" R . ==+*- . - ",
" :++*====.# ",
" ==++-=#*+ R ",
" -%*=-#+#. ",
" R .-+**#. ",
" .**+#. R ",
" .:=*++ ",
" :--=. R "
},
/* 3: Maidenhair fern */
{
" M ",
" fern .. # ",
" . ==+*- . - ",
" :++*====.# M ",
" ==++-=#*+ f ",
" -%*=-#+#. ",
" .-+**#. ",
" .**+#. fern ",
" .:=*++ M ",
" :--=. "
},
/* 4: Zebra Plant */
{
" Z e b r a ",
" .. Z ",
" . ==+*- . - ",
" :++*====.# Z ",
" Z ==++-=#*+ ",
" -%*=-#+#.Z ",
" .-+**#. ",
" .**+#. ",
" Z .:=*++ ",
" :--=. Z "
},
/* 5: Jade plant */
{
" J ",
" .. # ",
" . ==+*- . - ",
" :++*====.# J ",
" ==++-=#*+ ",
" -%*=-#+#. ",
" Jade.-+**#. ",
" .**+#. ",
" pl. :=*++ ",
" :--=. Jade "
},
/* 6: Yucca */
{
" Yucca ",
" .. Y ",
" . ==+*- . - Y ",
" :++*====.# ",
" ==++-=#*+ Y ",
" -%*=-#+#. ",
" .-+**#. Y ",
" .**+#. ",
" .:=*++ Y ",
" :--=. "
},
/* 7: Chain of Hearts */
{
" Chain <3 Hearts ",
" .. # ",
" . ==+*- . - <3 ",
" :++*====.# ",
" ==++-=#*+ <3 ",
" <3 -%*=-#+#. ",
" .-+**#. ",
" .**+#. <3 ",
" Chain.:=*++ ",
" :--=. Hearts"
},
/* 8: ZZ plant */
{
" ZZZ ",
" .. # Z ",
" . ==+*- . - ",
" Z :++*====.# ",
" ==++-=#*+ ",
" Z -%*=-#+#. ",
" .-+**#. Z ",
" ZZ .**+#. ",
" .:=*++ ",
" :--=. ZZ "
},
/* 9: Moonstones */
{
" (Moon) ",
" .. # ",
" . ==+*- . - ",
" :++*====.# M ",
" ==++-=#*+ ",
" oo -%*=-#+#. ",
" .-+**#. oo ",
" .**+#. ",
" stones:=*++ ",
" :--=. "
},
/* 10: Chinese Money plant */
{
" Chinese Money ",
" .. # $ ",
" . ==+*- . - ",
" :++*====.# $ ",
" ==++-=#*+ $$ ",
" $$ -%*=-#+#. ",
" .-+**#. ",
" $$ .**+#. ",
" .:=*++ $$ ",
" :--=. "
},
/* 11: String of pearls */
{
" String pearls ",
" ... # o o ",
" . ==+*- . - o ",
" :++*====.# o ",
" ==++-=#*+ o ",
" -%*=-#+#. o ",
" .-+**#. o ",
" .**+#. o ",
" .:=*++ o ",
" :--=. "
},
/* 12: Air plant */
{
" Air plant ",
" .. # ~ ",
" . ==+*- . - ~ ",
" :++*====.# ",
" A ==++-=#*+ ~ ",
" -%*=-#+#. ",
" .-+**#. ~ ",
" ~ .**+#. ",
" .:=*++ ",
" :--=. "
},
/* 13: African milk tree */
{
" African milk tree ",
" AMT .. # ",
" . ==+*- . - AMT ",
" :++*====.# ",
" ==++-=#*+ AMT ",
" -%*=-#+#. ",
" .-+**#. AMT ",
" .**+#. ",
" .:=*++ ",
" :--=. "
},
/* 14: pine bonsai */
{
" pine bonsai ",
" .. # ^ ",
" . ==+*- . - ^ ",
" :++*====.# ",
" ==++-=#*+ ^ ",
" -%*=-#+#. ",
" ^ .-+**#. ",
" .**+#. ^ ",
" ^ .:=*++ ",
" :--=. "
},
/* 15: Lotus */
{
" Lotus ",
" .. # * ",
" . ==+*- . - * ",
" :++*====.# ",
" ==++-=#*+ * ",
" -%*=-#+#. ",
" .-+**#. ",
" * .**+#. ",
" .:=*++ * ",
" :--=. "
},
/* 16: Heart fern */
{
" Heart fern <3 ",
" .. # ",
" . ==+*- . - <3 ",
" :++*====.# <3 ",
" ==++-=#*+ ",
" <3 -%*=-#+#. ",
" .-+**#. <3 ",
" .**+#. ",
" <3 .:=*++ ",
" :--=. "
},
/* 17: Corkscrew rush */
{
" Corkscrew rush ~@ ",
" .. # ~@ ",
" . ==+*- . - ~@ ",
" :++*====.# ",
" ~@==++-=#*+ ",
" -%*=-#+#. ~@ ",
" .-+**#. ",
" .**+#. ~@ ",
" .:=*++ ",
" :--=. ~@ "
},
/* 18: Weeping fig */
{
" Weeping fig ~ ",
" .. # ~ ",
" . ==+*- . - ",
" ~ :++*====.# ",
" ==++-=#*+ ~ ",
" -%*=-#+#. ",
" .-+**#. ~ ",
" .**+#. ",
" ~ .:=*++ ",
" :--=. "
},
/* 19: Corkscrew albuca */
{
" Corkscrew albuca ",
" Cka .. # ~@ ",
" . ==+*- . - ~@ ",
" :++*====.# ",
" ~@==++-=#*+ ",
" -%*=-#+#. ~@ ",
" .-+**#. ",
" ~@ .**+#. ",
" .:=*++ ",
" :--=. ~@ "
},
/* 20: Fiddle leaf fig */
{
" Fiddle leaf fig F ",
" .. # (leaf) ",
" ==+*- . - F ",
" :++*====.# ",
" ==++-=#*+ (leaf) ",
" -%*=-#+#. ",
" .-+**#. F ",
" .**+#. ",
" .:=*++ (leaf) ",
" :--=. "
},
/* 21: Mikado */
{
" Mikado | ",
" .. # | ",
" . ==+*- . - | ",
" :++*====.# ",
" ==++-=#*+ | ",
" -%*=-#+#. ",
" .-+**#. ",
" .**+#. | ",
" .:=*++ ",
" :--=. | "
},
/* 22: Kebab bush */
{
" Kebab bush ~o ",
" .. # o ",
" . ==+*- . - o ",
" :++*====.# ~ ",
" ~ ==++-=#*+ o ",
" -%*=-#+#. ",
" .-+**#. ~ o ",
" .**+#. ",
" o .:=*++ ~ ",
" :--=. o "
},
/* 23: Dwarf Papyrus */
{
" Dwarf Papyrus ^ ",
" .. # ^ ",
" . ==+*- . - ^ ",
" :++*====.# ",
" ==++-=#*+ ^ ",
" ^ -%*=-#+#. ",
" .-+**#. ^ ",
" .**+#. ",
" ^ .:=*++ ",
" :--=. "
},
/* 24: Hobbit Crassula */
{
" Hobbit Crassula (H) ",
" .. # ",
" . ==+*- . - (H) ",
" :++*====.# ",
" ==++-=#*+ ",
" -%*=-#+#. (H) ",
" .-+**#. ",
" (H) .**+#. ",
" .:=*++ ",
" :--=. (H) "
},
/* 25: Bunny ear cactus */
{
" Bunny ear cactus * ",
" .. # (ears) ",
" . ==+*- . - * ",
" :++*====.# (ears) ",
" ==++-=#*+ * ",
" -%*=-#+#. ",
" .-+**#. (ears) ",
" .**+#. * ",
" .:=*++ ",
" :--=. * "
},
/* 26: ghost echoversia */
{
" ghost echoversia # ",
" g.. # # ",
" . ==+*- . - # ",
" :++*====.# ",
" ==++-=#*+ # ",
" -%*=-#+#. # ",
" .-+**#. # ",
" .**+#. # ",
" .:=*++ # ",
" :--=. "
},
/* 27: chinese lantern */
{
" chinese lantern ",
" .. # (lantern) ",
" . ==+*- . - ",
" :++*====.# (lamp) ",
" ==++-=#*+ ",
" -%*=-#+#. (lamp) ",
" .-+**#. ",
" .**+#. (lantern) ",
" .:=*++ ",
" :--=. "
},
/* 28: ginseng ficus */
{
" ginseng ficus Gf ",
" .. # Gf ",
" . ==+*- . - Gf ",
" :++*====.# ",
" ==++-=#*+ ",
" -%*=-#+#. Gf ",
" .-+**#. ",
" .**+#. Gf ",
" .:=*++ ",
" :--=. "
},
/* 29: venus flytrap */
{
" venus flytrap V ",
" .. # x ",
" . ==+*- . - x ",
" :++*====.# ",
" V ==++-=#*+ x ",
" -%*=-#+#. ",
" .-+**#. x ",
" V .**+#. ",
" .:=*++ ",
" :--=. x "
},
/* 30: Flamingo flower */
{
" Flamingo flower F ",
" .. # (fl) ",
" . ==+*- . - F ",
" :++*====.# ",
" (fl)==++-=#*+ F ",
" -%*=-#+#. ",
" .-+**#. (fl) ",
" .**+#. ",
" F .:=*++ ",
" :--=. (fl) "
},
/* 31: Japanese maple bonsai */
{
" Japanese maple bns ",
" .. # Jmb ",
" . ==+*- . - ",
" :++*====.# Jmb ",
" ==++-=#*+ ",
" -%*=-#+#. ",
" Jmb .-+**#. ",
" .**+#. ",
" .:=*++ Jmb ",
" :--=. "
},
/* 32: Fshbone cactus */
{
" Fshbone cactus ~^ ",
" .. # ~^ ",
" . ==+*- . - ~^ ",
" :++*====.# ",
" ==++-=#*+ ~^ ",
" -%*=-#+#. ",
" .-+**#. ~^ ",
" .**+#. ",
" .:=*++ ~^ ",
" :--=. "
},
/* 33: Paddle plant */
{
" Paddle plant ",
" .. # == ",
" . ==+*- . - == ",
" :++*====.# ",
" ==++-=#*+ == ",
" -%*=-#+#. ",
" .-+**#. ",
" == .**+#. ",
" .:=*++ == ",
" :--=. "
},
/* 34: Donkey's tail */
{
" Donkey's tail ~ ",
" .. # ~ ",
" . ==+*- . - ~ ",
" :++*====.# ",
" ~ ==++-=#*+ ",
" -%*=-#+#. ~ ",
" .-+**#. ",
" ~ .**+#. ",
" .:=*++ ",
" :--=. ~ "
},
/* 35: Common ivy */
{
" Common ivy ivy ",
" .. # iv ",
" . ==+*- . - iv ",
" iv:++*====.# ",
" ==++-=#*+ ",
" -%*=-#+#. iv ",
" .-+**#. ",
" .**+#. ",
" iv .:=*++ ",
" :--=. ivy "
},
/* 36: Chinese Crassula */
{
" Chinese Crassula C ",
" .. # (Cr) ",
" . ==+*- . - (Cr) ",
" :++*====.# ",
" ==++-=#*+ ",
" -%*=-#+#. (Cr) ",
" .-+**#. ",
" .**+#. (Cr) ",
" .:=*++ ",
" :--=. (Cr) "
},
/* 37: Blue Chalksticks */
{
" Blue Chalksticks B ",
" .. # Bc ",
" . ==+*- . - Bc ",
" :++*====.# ",
" ==++-=#*+ Bc ",
" -%*=-#+#. ",
" .-+**#. Bc ",
" .**+#. ",
" .:=*++ Bc ",
" :--=. "
},
/* 38: Angel's tears */
{
" Angel's tears @A ",
" .. # tears ",
" . ==+*- . - @A ",
" :++*====.# ",
" ==++-=#*+ ",
" -%*=-#+#. @A ",
" .-+**#. ",
" .**+#. tears ",
" .:=*++ @A ",
" :--=. "
},
/* 39: White clover */
{
" White clover (wc) ",
" .. # (wc) ",
" . ==+*- . - ",
" :++*====.# (wc) ",
" ==++-=#*+ ",
" -%*=-#+#. ",
" .-+**#. (wc) ",
" .**+#. ",
" .:=*++ (wc)",
" :--=. "
}
};
/******************************************************************************
* getPlantArt
*
* Returns the (line)-th line of ASCII art for plantIndex
******************************************************************************/
const char* getPlantArt(int plantIndex, int line) {
if(plantIndex < 0 || plantIndex >= 40) {
/* Safety: return empty string if out of range */
return " ";
}
if(line < 0 || line >= 10) {
return " ";
}
return PLANT_ART[plantIndex][line];
}