]> _ Git - termbox2.git/commit
restore `TB_DEFAULT==0` in all modes (#51)
authorAdam Saponara <as@php.net>
Sun, 2 Apr 2023 22:10:10 +0000 (18:10 -0400)
committerAdam Saponara <as@php.net>
Sun, 2 Apr 2023 22:10:10 +0000 (18:10 -0400)
commit1eaa24be68b432fd54f587c6ef365562abaac99f
treeb983656180c1491108f8192ffd80316303cb7d72
parent3aa5a27a788f4e67bfa26a119d715317e7ba8a93
restore `TB_DEFAULT==0` in all modes (#51)

this removes `TB_TRUECOLOR_DEFAULT` added in 846bba4b and goes back to
`TB_DEFAULT==0` in all modes. instead, hi-bit macros `TB_256_BLACK`
and `TB_TRUECOLOR_BLACK` are added which provide a way to emit black
in those modes.

turns out there were some subtle bugs associated with `TB_DEFAULT!=0`
(in addition to the bug identified in #51). the bugs were fixable but
required uglying up some code. zero as default in all modes is more
intuitive and easier to reason about (e.g., `memset(..., 0, ...)`).
termbox2.h
tests/test_color_8bit/expected.ansi
tests/test_color_8bit/test.php
tests/test_color_true/expected.ansi
tests/test_color_true/test.php