apps: play2048: Optimized the icon a little
wasp-os uses a rather eccentric "2-bit" RLE encoding which works best when there are only three colors (and black) in a single line. Modify the screenshot slightly to allow it to be encoded with fewer palette updated.
This commit is contained in:
parent
ffff5ae52b
commit
79db167ed9
2 changed files with 31 additions and 44 deletions
Binary file not shown.
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 8 KiB |
|
@ -30,59 +30,46 @@ CELL_BACKGROUND = [0x9CB1, 0xEF3B, 0xEF19, 0xF58F, 0xF4AC, 0xF3EB, 0xF2E7, 0xEE6
|
|||
CELL_FOREGROUND = [0x9CB1, 0x736C, 0x736C, 0xFFBE, 0xFFBE, 0xFFBE, 0xFFBE, 0xFFBE, 0xFFBE, 0xFFBE, 0xFFBE, 0xFFBE]
|
||||
CELL_LABEL = ['','2','4','8','16','32','64','128','256','512','1K','2K'] # TODO: Display 1024 and 2048 (text-wrapping)
|
||||
|
||||
# 2-bit RLE, generated from res/2048_icon.png, 785 bytes
|
||||
# 2-bit RLE, generated from res/2048_icon.png, 578 bytes
|
||||
icon = (
|
||||
b'\x02'
|
||||
b'`@'
|
||||
b'\x10\xbf\x01 \xbf\x01 \xbf\x01 \x83@\x81M\x82M'
|
||||
b'\x82M\x82M\x83 \x83M\x82M\x82M\x82M\x83 '
|
||||
b'\x83M\x82M\x82M\x82M\x83 \x83M\x82M\x82M'
|
||||
b'\x82M\x83 \x83M\x82M\x82M\x82M\x83 \x83M'
|
||||
b'\x82M\x82M\x82M\x83 \x83M\x82M\x82M\x82M'
|
||||
b'\x83 \x83M\x82M\x82M\x82M\x83 \x83M\x82M'
|
||||
b'\x82M\x82M\x83 \x83M\x82M\x82M\x82M\x83 '
|
||||
b'\x83M\x82M\x82M\x82M\x83 \x83M\x82M\x82M'
|
||||
b'\x82M\x83 \x83M\x82M\x82M\x82M\x83 \xbf\x01'
|
||||
b' \xbf\x01 \x83M\x82M\x82M\x82\x80\xfb\x8d\xc0\xdb'
|
||||
b'\x82M\x82\x80\xc8\x8d\x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B\x80\xfa\x8dC'
|
||||
b' C\xc6\x81\xc1\xc5B\xc0\x81\xcdB\xcdB\x8dC '
|
||||
b'C@\xfbE\x81AF\x80\xdb\x82\xcd\x82\xcd\x82\xc0\xfa'
|
||||
b'\xcd\x83 \x83DA\xc4AC\x82@\x81M\x82M\x82'
|
||||
b'\xcd\x83 \x83\x80\xfb\x8d\xc0\xdb\xc2M\xc2M\xc2@\xfa'
|
||||
b'M\xc3 \xff\x01 \xff\x01 \xc3\x80\x81\x8d\xc2\xc0\xfb'
|
||||
b'\xcd@\xdbB\x80\xf6\x8dB\xc0\xc8\xcdC C@\x81'
|
||||
b'M\x80\xdb\x82\xc0\xfb\xcd\x82@\xf6M\x82\x80\xc8\x8d\xc0'
|
||||
b'\xdb\xc3 \xc3@\x81M\xc2\x80\xfb\x8d\xc2\xc0\xf6\xcd@'
|
||||
b'\xdbB\x80\xc8\x8dC C\xc0\x81\xcdB@\xfbM\x80'
|
||||
b'\xdb\x82\xc0\xf6\xcd\x82@\xc8M\x83 \x83\x80\x81\x8d\xc0'
|
||||
b'\xdb\xc2@\xfbM\xc2\x80\xf6\x8d\xc2\xc0\xc8\xcd@\xdbC'
|
||||
b' C\x80\x81\x8dB\xc0\xfb\xcdB@\xf6M\x80\xdb\x82'
|
||||
b'\xc0\xc8\xcd\x83 \x83@\x81M\x82\x80\xfb\x8d\xc0\xdb\xc2'
|
||||
b'@\xf6M\xc2\x80\xc8\x8d\xc3 \xc3\xc0\x81\xcd@\xdbB'
|
||||
b'\x80\xfb\x8dB\xc0\xf6\xcdB@\xc8M\x80\xdb\x83 \x83'
|
||||
b'\xc0\x81\xcd\x82@\xfbM\x82\x80\xf6\x8d\xc0\xdb\xc2@\xc8'
|
||||
b'M\xc3 \xc3\x80\x81\x8d\xc2\xc0\xfb\xcd@\xdbB\x80\xf6'
|
||||
b'\x8dB\xc0\xc8\xcdC C@\x81M\x80\xdb\x82\xc0\xfb'
|
||||
b'\xcd\x82@\xf6M\x82\x80\xc8\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cdC C\xcdB\x8d'
|
||||
b'B\x8dB\xcdC C\xcdB\x8dB\x8dB\xcdC '
|
||||
b'C\xcdB\x8dB\x8dB\xcdC \x7f\x01 \x7f\x01 '
|
||||
b'C\x8dB\x8dB\x80\xf6\x8dB\x8dC C\xc0\x81\xcd'
|
||||
b'B\xcdB\x8dB\x8dC C\xcdB\xcdB\x8dB\x8d'
|
||||
b'C C\xcdB\xcdB\x8dB\x8dC C\xcdB\xcd'
|
||||
b'B\x8dB\x8dC C\xcdB\xcdB\x8dB\x8dC '
|
||||
b'C\xcdB\xcdB\x8dB\x8dC C\xcdB\xcdB\x8d'
|
||||
b'B\x8dC C\xcdB\xcdB\x8dB\x8dC C\xcd'
|
||||
b'B\xcdB\x8dB\x8dC C\xcdB\xcdB\x8dB\x8d'
|
||||
b'C C\xcdB\xcdB\x8dB\x8dC C\xcdB\xcd'
|
||||
b'B\x8dB\x8dC \x7f\x01 \x7f\x01 \x7f\x01\x10'
|
||||
)
|
||||
|
||||
class Play2048App():
|
||||
|
|
Loading…
Reference in a new issue