#ifndef __RECOMP_PORT__ #define __RECOMP_PORT__ #include #include #include #include #include #ifdef _MSC_VER inline uint32_t byteswap(uint32_t val) { return _byteswap_ulong(val); } #else constexpr uint32_t byteswap(uint32_t val) { return __builtin_bswap32(val); } #endif namespace RecompPort { struct Function { uint32_t vram; uint32_t rom; const std::span words; std::string name; }; struct Context { std::vector functions; std::unordered_map> functions_by_vram; }; bool recompile_function(const Context& context, const Function& func, std::string_view output_path); } #endif