summary refs log tree commit diff
path: root/bin/fbclock.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-10-02 14:19:54 -0400
committerJune McEnroe <june@causal.agency>2018-10-02 14:23:47 -0400
commit252d3724c4d44892e73d7013f9a0ef3951d2d211 (patch)
treeec51d9b0506ed4ad97c148a80d7cde2f5f9bf7cc /bin/fbclock.c
parentAllow setting colors in psf2png (diff)
downloadsrc-252d3724c4d44892e73d7013f9a0ef3951d2d211.tar.gz
src-252d3724c4d44892e73d7013f9a0ef3951d2d211.zip
Rewrite scheme
Diffstat (limited to 'bin/fbclock.c')
-rw-r--r--bin/fbclock.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/fbclock.c b/bin/fbclock.c
index bc44cc72..dcc42b3e 100644
--- a/bin/fbclock.c
+++ b/bin/fbclock.c
@@ -42,9 +42,6 @@ struct PSF2Header {
 	uint32_t glyphWidth;
 };
 
-static const uint32_t BG = Scheme.darkBlack;
-static const uint32_t FG = Scheme.darkWhite;
-
 int main() {
 	size_t len;
 
@@ -110,10 +107,10 @@ int main() {
 			uint32_t bottom = header.glyphHeight;
 
 			for (uint32_t y = 0; y < bottom; ++y) {
-				buf[y * info.xres + left - 1] = FG;
+				buf[y * info.xres + left - 1] = DarkWhite;
 			}
 			for (uint32_t x = left - 1; x < info.xres; ++x) {
-				buf[bottom * info.xres + x] = FG;
+				buf[bottom * info.xres + x] = DarkWhite;
 			}
 
 			for (const char *s = str; *s; ++s) {
@@ -123,7 +120,9 @@ int main() {
 					for (uint32_t x = 0; x < header.glyphWidth; ++x) {
 						uint8_t bits = glyph[y * stride + x / 8];
 						uint8_t bit = bits >> (7 - x % 8) & 1;
-						buf[y * info.xres + left + x] = bit ? FG : BG;
+						buf[y * info.xres + left + x] = bit
+							? DarkWhite
+							: DarkBlack;
 					}
 				}
 				left += header.glyphWidth;