summaryrefslogtreecommitdiff
path: root/wasp/icons.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-28 12:01:15 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-28 12:01:15 (GMT)
commitaef6466550097669740fe0fa9cc9c2c29d37802d (patch)
treee95d98ee728acd79b8e9b19f0abf6733393dc4c5 /wasp/icons.py
parent8abb6f3f4ddf658c70788c028c6bde156bb018ea (diff)
icons, fonts.digits: Switch over to 2-bit RLE encoding
The 2-bit RLE encoding, in addition to supporting colour is also fully ROMable meaning we can save 32 bytes of RAM per image by switching to 2-bit encoding. Switch everything in icons and font.clock over to 2-bit encoding. Note: this requires all the clock PNG files to be reencoded (because they were originally in 1-bit grayscale format and this is no longer supported by the encoder). This reduces RAM overhead by 480 bytes and has only a negligable effect on FLASH usage (+4 bytes). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/icons.py')
-rw-r--r--wasp/icons.py130
1 files changed, 73 insertions, 57 deletions
diff --git a/wasp/icons.py b/wasp/icons.py
index 56e24d2..c6fc5ad 100644
--- a/wasp/icons.py
+++ b/wasp/icons.py
@@ -144,11 +144,19 @@ torch = (
b'\xff\x95'
)
-# 1-bit RLE, generated from res/up_arrow.png, 16 bytes
-up_arrow = (16, 9, b'\x07\x02\r\x04\x0b\x06\t\x08\x07\n\x05\x0c\x03\x0e\x01 ')
+# 2-bit RLE, generated from res/up_arrow.png, 19 bytes
+up_arrow = (
+ b'\x02'
+ b'\x10\t'
+ b'\x07\xc2\r\xc4\x0b\xc6\t\xc8\x07\xca\x05\xcc\x03\xce\x01\xe0'
+)
-# 1-bit RLE, generated from res/down_arrow.png, 17 bytes
-down_arrow = (16, 9, b'\x00 \x01\x0e\x03\x0c\x05\n\x07\x08\t\x06\x0b\x04\r\x02\x07')
+# 2-bit RLE, generated from res/down_arrow.png, 19 bytes
+down_arrow = (
+ b'\x02'
+ b'\x10\t'
+ b'\xe0\x01\xce\x03\xcc\x05\xca\x07\xc8\t\xc6\x0b\xc4\r\xc2\x07'
+)
# 2-bit RLE, generated from res/knob.png, 72 bytes
knob = (
@@ -258,61 +266,69 @@ pause = (
b'&\xe0)\xdd-\xda1\xd47\xce?\xff\x8f'
)
+# 2-bit RLE, generated from res/yes_button.png, 432 bytes
yes_button = (
- 96, 60,
- b'a]\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'\x08\x05\x0f\x05\x05\x14\n\x0f\x08\x01\x03\x01\x08\x05\x0f\x05'
- b'\x05\x14\n\x0f\x08\x01\x03\x01\x08\x05\x0f\x05\x05\x14\n\x0f'
- b'\x08\x01\x03\x01\x08\x05\x0f\x05\x05\x14\n\x0f\x08\x01\x03\x01'
- b'\x08\x05\x0f\x05\x05\x14\n\x0f\x08\x01\x03\x01\x08\x05\x0f\x05'
- b'\x05\x05\x14\x05\x17\x01\x03\x01\x08\x05\x0f\x05\x05\x05\x14\x05'
- b'\x17\x01\x03\x01\x08\x05\x0f\x05\x05\x05\x14\x05\x17\x01\x03\x01'
- b'\x08\x05\x0f\x05\x05\x05\x14\x05\x17\x01\x03\x01\x08\x05\x0f\x05'
- b'\x05\x05\x14\x05\x17\x01\x03\x01\r\x0f\n\x0f\x0f\n\r\x01'
- b'\x03\x01\r\x0f\n\x0f\x0f\n\r\x01\x03\x01\r\x0f\n\x0f'
- b'\x0f\n\r\x01\x03\x01\r\x0f\n\x0f\x0f\n\r\x01\x03\x01'
- b'\r\x0f\n\x0f\x0f\n\r\x01\x03\x01\x12\x05\x0f\x05#\x05'
- b'\x08\x01\x03\x01\x12\x05\x0f\x05#\x05\x08\x01\x03\x01\x12\x05'
- b'\x0f\x05#\x05\x08\x01\x03\x01\x12\x05\x0f\x05#\x05\x08\x01'
- b'\x03\x01\x12\x05\x0f\x05#\x05\x08\x01\x03\x01\x12\x05\x0f\x14'
- b'\x05\x0f\r\x01\x03\x01\x12\x05\x0f\x14\x05\x0f\r\x01\x03\x01'
- b'\x12\x05\x0f\x14\x05\x0f\r\x01\x03\x01\x12\x05\x0f\x14\x05\x0f'
- b'\r\x01\x03\x01\x12\x05\x0f\x14\x05\x0f\r\x01\x03\x01[\x01'
- b'\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01'
- b'\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01'
- b'\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01'
- b'\x03\x01[\x01\x03\x01[\x01\x03]\xc2'
+ b'\x02'
+ b'`<'
+ b'?"\xff\x1e\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1'
+ b'?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?'
+ b'\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c'
+ b'\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1'
+ b'\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03'
+ b'\xc1\x08\xc5\x0f\xc5\x05\xd4\n\xcf\x08\xc1\x03\xc1\x08\xc5\x0f'
+ b'\xc5\x05\xd4\n\xcf\x08\xc1\x03\xc1\x08\xc5\x0f\xc5\x05\xd4\n'
+ b'\xcf\x08\xc1\x03\xc1\x08\xc5\x0f\xc5\x05\xd4\n\xcf\x08\xc1\x03'
+ b'\xc1\x08\xc5\x0f\xc5\x05\xd4\n\xcf\x08\xc1\x03\xc1\x08\xc5\x0f'
+ b'\xc5\x05\xc5\x14\xc5\x17\xc1\x03\xc1\x08\xc5\x0f\xc5\x05\xc5\x14'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png, 442 bytes
no_button = (
- 96, 60,
- b'a]\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01\x16\x05\n\x05'
- b'\n\n\x1d\x01\x03\x01\x16\x05\n\x05\n\n\x1d\x01\x03\x01'
- b'\x16\x05\n\x05\n\n\x1d\x01\x03\x01\x16\x05\n\x05\n\n'
- b'\x1d\x01\x03\x01\x16\x05\n\x05\n\n\x1d\x01\x03\x01\x16\n'
- b'\x05\x05\x05\x05\n\x05\x18\x01\x03\x01\x16\n\x05\x05\x05\x05'
- b'\n\x05\x18\x01\x03\x01\x16\n\x05\x05\x05\x05\n\x05\x18\x01'
- b'\x03\x01\x16\n\x05\x05\x05\x05\n\x05\x18\x01\x03\x01\x16\n'
- b'\x05\x05\x05\x05\n\x05\x18\x01\x03\x01\x16\x05\x05\n\x05\x05'
- b'\n\x05\x18\x01\x03\x01\x16\x05\x05\n\x05\x05\n\x05\x18\x01'
- b'\x03\x01\x16\x05\x05\n\x05\x05\n\x05\x18\x01\x03\x01\x16\x05'
- b'\x05\n\x05\x05\n\x05\x18\x01\x03\x01\x16\x05\x05\n\x05\x05'
- b'\n\x05\x18\x01\x03\x01\x16\x05\n\x05\x05\x05\n\x05\x18\x01'
- b'\x03\x01\x16\x05\n\x05\x05\x05\n\x05\x18\x01\x03\x01\x16\x05'
- b'\n\x05\x05\x05\n\x05\x18\x01\x03\x01\x16\x05\n\x05\x05\x05'
- b'\n\x05\x18\x01\x03\x01\x16\x05\n\x05\x05\x05\n\x05\x18\x01'
- b'\x03\x01\x16\x05\n\x05\n\n\x1d\x01\x03\x01\x16\x05\n\x05'
- b'\n\n\x1d\x01\x03\x01\x16\x05\n\x05\n\n\x1d\x01\x03\x01'
- b'\x16\x05\n\x05\n\n\x1d\x01\x03\x01\x16\x05\n\x05\n\n'
- b'\x1d\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01[\x01\x03\x01'
- b'[\x01\x03]\xc2'
+ b'\x02'
+ b'`<'
+ b'?"\xff\x1e\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1'
+ b'?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?'
+ b'\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c'
+ b'\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1'
+ b'\x03\xc1?\x1c\xc1\x03\xc1?\x1c\xc1\x03\xc1\x16\xc5\n\xc5'
+ b'\n\xca\x1d\xc1\x03\xc1\x16\xc5\n\xc5\n\xca\x1d\xc1\x03\xc1'
+ b'\x16\xc5\n\xc5\n\xca\x1d\xc1\x03\xc1\x16\xc5\n\xc5\n\xca'
+ b'\x1d\xc1\x03\xc1\x16\xc5\n\xc5\n\xca\x1d\xc1\x03\xc1\x16\xca'
+ b'\x05\xc5\x05\xc5\n\xc5\x18\xc1\x03\xc1\x16\xca\x05\xc5\x05\xc5'
+ b'\n\xc5\x18\xc1\x03\xc1\x16\xca\x05\xc5\x05\xc5\n\xc5\x18\xc1'
+ b'\x03\xc1\x16\xca\x05\xc5\x05\xc5\n\xc5\x18\xc1\x03\xc1\x16\xca'
+ b'\x05\xc5\x05\xc5\n\xc5\x18\xc1\x03\xc1\x16\xc5\x05\xca\x05\xc5'
+ b'\n\xc5\x18\xc1\x03\xc1\x16\xc5\x05\xca\x05\xc5\n\xc5\x18\xc1'
+ b'\x03\xc1\x16\xc5\x05\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