Re:Show HN: Tinytetris – 80 x 23 Terminal Tetris
by the_pwner224 on Sunday March 31, 2019 @10:31AM
(#19535758)
You are correct; the code to print the blocks is on lines 35-37 of tinytetris-commented.c.
But the large comment at the top of the tinytetris.c file is made of the block drawing characters :)
The attron sets terminal attributes which presumably cause it to flip the " " into a solid block. I haven't decoded what exactly the number it's feeding in represents, but 262176 is 0b1000000000000100000, and the attributes are defined around line 1100 of curses.h on my system (/A_NORMAL will find it).
But the large comment at the top of the tinytetris.c file is made of the block drawing characters :)
The attron sets terminal attributes which presumably cause it to flip the " " into a solid block. I haven't decoded what exactly the number it's feeding in represents, but 262176 is 0b1000000000000100000, and the attributes are defined around line 1100 of curses.h on my system (/A_NORMAL will find it).