#ifndef FACTORIO_MAP_HEADER_BRIDGE_H #define FACTORIO_MAP_HEADER_BRIDGE_H #include "version_bridge.h" /* Three serialized MapTick fields; their individual meanings are not recovered. */ typedef struct { FactorioMapVersion version; uint64_t tick_fields[3]; } FactorioMapHeader; /* Input starts at the constructor's stream position, NOT at the ZIP or map start. * 0 success, 1 short stream, 2 invalid argument/address, 3 execution budget. * Only success modifies out. This is not a complete save/world parser. */ int factorio_map_header_parse(const uint8_t *payload, size_t length, FactorioMapVersion version, FactorioMapHeader *out); #endif