diff options
Diffstat (limited to '_log')
| -rw-r--r-- | _log/matrix-digital-rain.md | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/_log/matrix-digital-rain.md b/_log/matrix-digital-rain.md index e495445..b97bb7a 100644 --- a/_log/matrix-digital-rain.md +++ b/_log/matrix-digital-rain.md @@ -13,10 +13,10 @@ stored in a dedicated array--still don't understand why I did that when I had already used bit-packing for the RGB channels; The algorithm was difficult to decipher. The 2022 version worked, but that’s not the same thing as correct. -I began by placing the decay factor in the LSB of the 4-byte RGB value. Let's -call that RGB-PD. PD plays a somewhat analogous role to an alpha channel in -that both influence transparency. However, they work very differently. So, I -avoided labelling it A so as not to cause confusion: +I began by placing the decay factor in the LSB of the 4-byte RGB value. The PD +value plays a somewhat analogous role to an alpha channel in that both +influence transparency. However, they work very differently. So, I avoided +labelling it A so as not to cause confusion: ``` enum { @@ -94,8 +94,7 @@ The Unicode blocks are stored in 8-byte containers: the low four bytes form the first codepoint and the high four bytes the last. Here, I chose bitwise operations over unions because, first and foremost, the operations themselves are trivial and idiomatic, and the UNICODE() macro simplifies the management of -charsets. The insert_code() function is now ready to take its rightful place -next to blend(). +charsets. The init_term() function is the arbiter of this zero-dependency software. It prepares the graphical environment so that I can interact with it via ANSI @@ -124,10 +123,6 @@ static inline int init_term(const struct winsize *ws) } ``` -All credit for the terminal control function belongs to Domsson, whose <a -href="https://github.com/domsson/fakesteak" class="external" target="_blank" -rel="noopener noreferrer">Fakesteak</a> inspired my own three years ago. - insert_code() seeds the Matrix, blend() creates the old monochrome CRT display nostalgia, and ANSI control sequences paint the screen. The result is a digital rain that captures the original Matrix aesthetic with high visual fidelity: |
