summary refs log tree commit diff
path: root/bin/fbatt.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/fbatt.c
parentAllow setting colors in psf2png (diff)
downloadsrc-252d3724c4d44892e73d7013f9a0ef3951d2d211.tar.gz
src-252d3724c4d44892e73d7013f9a0ef3951d2d211.zip
Rewrite scheme
Diffstat (limited to 'bin/fbatt.c')
-rw-r--r--bin/fbatt.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/bin/fbatt.c b/bin/fbatt.c
index dd23cc22..1a7fab6d 100644
--- a/bin/fbatt.c
+++ b/bin/fbatt.c
@@ -35,12 +35,6 @@ static const uint32_t Right  = 5 * 8 + 1; // fbclock width.
 static const uint32_t Width  = 8;
 static const uint32_t Height = 16;
 
-static const uint32_t BG     = Scheme.darkBlack;
-static const uint32_t Border = Scheme.darkWhite;
-static const uint32_t Gray   = Scheme.lightBlack;
-static const uint32_t Yellow = Scheme.darkYellow;
-static const uint32_t Red    = Scheme.darkRed;
-
 int main() {
 	int error;
 
@@ -108,20 +102,20 @@ int main() {
 			uint32_t left = info.xres - Right - Width;
 
 			for (uint32_t y = 0; y <= Height; ++y) {
-				buf[y * info.xres + left - 1] = Border;
-				buf[y * info.xres + left + Width] = Border;
+				buf[y * info.xres + left - 1] = DarkWhite;
+				buf[y * info.xres + left + Width] = DarkWhite;
 			}
 			for (uint32_t x = left; x < left + Width; ++x) {
-				buf[Height * info.xres + x] = Border;
+				buf[Height * info.xres + x] = DarkWhite;
 			}
 
 			for (uint32_t y = 0; y < Height; ++y) {
 				for (uint32_t x = left; x < left + Width; ++x) {
 					buf[y * info.xres + x] =
-						(Height - 1 - y > height) ? BG
-						: (percent <= 10) ? Red
-						: (percent <= 30) ? Yellow
-						: Gray;
+						(Height - 1 - y > height) ? DarkBlack
+						: (percent <= 10) ? DarkRed
+						: (percent <= 30) ? DarkYellow
+						: LightBlack;
 				}
 			}
 		}