Skip to content

Commit 852867c

Browse files
cwaltherdeshipu
authored andcommitted
Make the generated pixels a little bit more nice-looking.
- Same width for horizontal and vertical grid lines. - Rounded corners. - Colors adjusted to better match the brightness relations of an LED display.
1 parent 9596a59 commit 852867c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pewpew_m4/pew.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121
_SALT = const(132)
2222

23-
_PALETTE = array.array('H', (0x0, 0x4a29, 0xc032, 0x98, 0xa0fc, 0xf42, 0x825b,
23+
_PALETTE = array.array('H', (0x0, 0x4a29, 0x6004, 0xf8, 0xfd, 0xf42, 0x825b,
2424
0xf8, 0xfe, 0x125b, 0xcffb, 0xe0cf, 0xffff,
2525
0x1ff8, 0xdbff, 0xffff))
2626

@@ -191,6 +191,11 @@ def init():
191191
for y in range(0, 15):
192192
for x in range(0, 7):
193193
_bank[c * 128 + y * 8 + x] = c | c << 4
194+
_bank[c * 128 + y * 8 + 7] = c << 4
195+
_bank[c * 128] = c
196+
_bank[c * 128 + 7] = 0
197+
_bank[c * 128 + 14 * 8] = c
198+
_bank[c * 128 + 14 * 8 + 7] = 0
194199
tiles = stage.Bank(_bank, _PALETTE)
195200
_grid = stage.Grid(tiles, 10, 8)
196201
_grid.move(0, 0)

0 commit comments

Comments
 (0)