MATRIX RAIN: 2025 REFACTOR
21 DECEMBER 2025
Unicode support added. ASCII + Katakana working:
Algorithm notes: mat.col[] = shuffled column indices, mat.row[] = last row per
column. shuffle() sets working set, main loop draws columns via index i (line
333), swap() rotates set.
Phosphor decay moved to LSB of RGB union. Should have done this originally.
RGB/PD union stays. Little-endian machine, portability not a concern.
Charset via UNICODE(min, max) macro - packs range into uint64, insert_code()
unpacks and selects random char.
Half-width Katakana (U+FF61-U+FF9F) for column alignment.
Removed license, automake files. Build: cc -O3 main.c -o matrix
Performance: 2% CPU, OpenBSD, T490.
Commit:
03f8d87
Unicode support added. ASCII + Katakana working:
Algorithm notes: mat.col[] = shuffled column indices, mat.row[] = last row per column. shuffle() sets working set, main loop draws columns via index i (line 333), swap() rotates set.
Phosphor decay moved to LSB of RGB union. Should have done this originally.
RGB/PD union stays. Little-endian machine, portability not a concern.
Charset via UNICODE(min, max) macro - packs range into uint64, insert_code() unpacks and selects random char.
Half-width Katakana (U+FF61-U+FF9F) for column alignment.
Removed license, automake files. Build: cc -O3 main.c -o matrix
Performance: 2% CPU, OpenBSD, T490.
Commit: 03f8d87