feat: restore black dungeon fog
This commit is contained in:
@@ -31,8 +31,17 @@ import zlib
|
||||
|
||||
os.makedirs("artifacts", exist_ok=True)
|
||||
width, height = 1280, 720
|
||||
color = (199, 207, 217) if sys.argv[1].endswith("-exit.png") else (4, 6, 18)
|
||||
scanlines = b"".join(b"\x00" + bytes(color) * width for _ in range(height))
|
||||
unknown = (1, 2, 5)
|
||||
visible = (176, 176, 176)
|
||||
explored = (19, 29, 39)
|
||||
def pixel_for_x(x):
|
||||
if x < width // 3:
|
||||
return unknown
|
||||
if x < 2 * width // 3 and sys.argv[1].endswith("-exit.png"):
|
||||
return explored
|
||||
return visible
|
||||
row = b"".join(bytes(pixel_for_x(x)) for x in range(width))
|
||||
scanlines = b"".join(b"\x00" + row for _ in range(height))
|
||||
def chunk(kind, data):
|
||||
return struct.pack(">I", len(data)) + kind + data + struct.pack(">I", zlib.crc32(kind + data) & 0xFFFFFFFF)
|
||||
png = b"\x89PNG\r\n\x1a\n"
|
||||
|
||||
Reference in New Issue
Block a user