Files

109 lines
3.3 KiB
Python
Raw Permalink Normal View History

#!/usr/bin/env python3
"""Pixel art for the Star Trek / Lower Decks pages (components/el512/trek.cpp).
Original 1-bit fan art: '#' is a lit pixel. Writes
components/el512/trek_sprites.h and, with --preview, a magnified PNG.
python tools/trek_sprites.py
python tools/trek_sprites.py --preview sprites.png
"""
from konosuba_sprites import main, padded
# Starfleet uniform shared by the ensigns: lit shoulders, combadge on the chest.
BODY = [
"....#######.....",
"..###########...",
".#############..",
".##.###.#####...",
".##.##...###.#..",
".##.#######.##..",
".##.#.....#.##..",
".#..#.....#..#..",
"....#######.....",
"....##...##.....",
"....##...##.....",
"....##...##.....",
"...###...###....",
]
SPRITES = {
# Mariner: hair up in a bun, a smirk.
"MARINER": [
".......##.......",
"......####......",
"....########....",
"...##########...",
"...#.#....#.#...",
"...#........#...",
"...#.##..##.#...",
"...#........#...",
"...#......#.#...",
"....#..###.#....",
".....######.....",
] + BODY,
# Boimler: neat side part, worried open mouth.
"BOIMLER": [
"....#######.....",
"...#########....",
"...######...#...",
"...#........#...",
"...#.##..##.#...",
"...#........#...",
"...#...##...#...",
"...#..####..#...",
"...#..#..#..#...",
"....#.####.#....",
".....######.....",
] + BODY,
# Tendi: long hair down both sides, big smile.
"TENDI": [
".....######.....",
"...##########...",
"..############..",
"..##........##..",
"..#..##..##..#..",
"..#..........#..",
"..#.#......#.#..",
"..#..######..#..",
"..##........##..",
"..###......###..",
"..###.####.###..",
] + BODY,
# Rutherford: cybernetic implant over his left eye and temple.
"RUTHERFORD": [
"....########....",
"...##########...",
"...#.#.#.#.##...",
"..####......#...",
"..#..#.##...#...",
"..####......#...",
"..####......#...",
"...##...##..#...",
"...#..#####.#...",
"....#......#....",
".....######.....",
] + BODY,
# A Starfleet ship in profile, heading right: nacelle, pylons, engineering
# hull and saucer.
"SHIP": [
"######################..........................",
"#....................###........................",
"######################..........................",
".....#.......#..................................",
"......#.......#...................#############.",
".......#.......#...............##################",
"........###########......#######################.",
"........#.........######.........##############..",
"........#.....................#..................",
"........#######################..................",
".........#.....#####.........#...................",
"..........######...##########....................",
],
}
for _name in SPRITES:
SPRITES[_name] = padded(SPRITES[_name])
if __name__ == "__main__":
main(SPRITES, "Star Trek", "trek_sprites.py", "trek", __doc__)