Files
planar-EL512.256-H/tools/steins_sprites.py
T

167 lines
4.8 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
"""Pixel art for the Steins;Gate pages (components/el512/steins.cpp).
Original 1-bit fan art: '#' is a lit pixel. Writes
components/el512/steins_sprites.h and, with --preview, a magnified PNG.
python tools/steins_sprites.py
python tools/steins_sprites.py --preview sprites.png
"""
from konosuba_sprites import main, padded
SPRITES = {
# Okabe in his lab coat, and with the coat flaring out.
"OKABE_A": [
"......#######.........",
"....##########.#......",
"...############.......",
"..#############.#.....",
"..##.#.#.##.####......",
"..#.........###.......",
"..#..##..##..#........",
"..#...........#.......",
"..#.....#.....#.......",
"...#..#####..#........",
"....#.......#.........",
".....#######..........",
"...###.....###........",
"..##..#...#..##.......",
".##....#.#....##......",
".#.#....#....#.#......",
".#.#....#....#.#......",
".#..#...#...#..#......",
"#...#...#...#...#.....",
"#...#...#...#...#.....",
"#..#....#....#..#.....",
"#..#....#....#..#.....",
"##.#....#....#.##.....",
"##.#....#....#.##.....",
"...#....#....#........",
"...#...###...#........",
"...#...#.#...#........",
"..#....#.#....#.......",
"..#....#.#....#.......",
".#.....#.#.....#......",
".#.....#.#.....#......",
"#......#.#......#.....",
"########.########.....",
".......#.#............",
".......#.#............",
"......##.##...........",
],
"OKABE_B": [
"......#######.........",
"....##########.#......",
"...############.......",
"..#############.#.....",
"..##.#.#.##.####......",
"..#.........###.......",
"..#..##..##..#........",
"..#...........#.......",
"..#.....#.....#.......",
"...#..#####..#........",
"....#.......#.........",
".....#######..........",
"...###.....###........",
"..##..#...#..##.......",
".##....#.#....##......",
".#.#....#....#.##.....",
".#.#....#....#.#.#....",
".#..#...#...#..#..#...",
"#...#...#...#...#..#..",
"#...#...#...#...#...#.",
"#..#....#....#..#....#",
"#..#....#....#..#....#",
"##.#....#....#.##....#",
"##.#....#....#......#.",
"...#....#....#......#.",
"...#...###...#.....#..",
"...#...#.#...#.....#..",
"..#....#.#....#...#...",
"..#....#.#....#...#...",
".#.....#.#.....#.#....",
".#.....#.#.....##.....",
"#......#.#......#.....",
"########.########.....",
".......#.#............",
".......#.#............",
"......##.##...........",
],
# Kurisu: long hair, shirt and tie, belt.
"KURISU": [
".....######.......",
"...##########.....",
"..############....",
"..##.#.##.#.##....",
"..#..........#....",
"..#..##..##..#....",
"..#..........#....",
"..#....#.....#....",
"..##..###...##....",
"..###......###....",
"..#.##....##.#....",
"..#..######..#....",
"..#.#..#..#..#....",
"..##..###..#.#....",
"..#....#....##....",
".##...###...###...",
".#.#...#...#..#...",
".#.#.......#..#...",
".#..#.....#...#...",
".#..#######...#...",
"....#.....#.......",
"....#.....#.......",
"....##...##.......",
".....#...#........",
".....#...#........",
".....#...#........",
".....#...#........",
"....##...##.......",
],
# Upa, upright and squashed mid-bounce.
"UPA_A": [
"..#........#..",
"..##......##..",
"..#.######.#..",
".#..........#.",
"#...#....#...#",
"#............#",
"#.....##.....#",
".#..........#.",
"..##########..",
],
"UPA_B": [
"..............",
"...#......#...",
"..##.####.##..",
".#..........#.",
"#...#....#...#",
"#.....##.....#",
"##..........##",
".############.",
"..............",
],
# The lab's favourite fizzy drink.
"CAN": [
"..######..",
".#......#.",
"##########",
"#........#",
"#.######.#",
"#.#....#.#",
"#.#.##.#.#",
"#.#....#.#",
"#.######.#",
"#........#",
"#........#",
"##########",
".########.",
],
}
for _name in SPRITES:
SPRITES[_name] = padded(SPRITES[_name])
if __name__ == "__main__":
main(SPRITES, "Steins;Gate", "steins_sprites.py", "steins", __doc__)