pokemon/tools/generate/connections.py
Zack Buhman da49dbeb2b Makefile: improve build rules slightly
I'm still not satisfied with the Makefile, but this at least makes it
converge in a single make invocation again.

This also removes the enum value arrays.
2023-07-26 18:17:45 +00:00

33 lines
640 B
Python

from itertools import chain
from generate.maps import sorted_map_headers
def includes_header():
yield "#pragma once"
yield ""
yield '#include "maps.hpp"'
yield ""
def directions():
return set(
# fixme: improve the connection parser
# add dataclass fields
connection[0]
for map_header in sorted_map_headers()
for connection in map_header.connections
)
def struct_connection_t():
struct connection_t {
enum direction {
# directions for lulz
};
enum direction direction;
map_t::map map;
uint8_t offset;
};
def ():