From b42a4fa16f7a75e2a96a7c107e6359c80b685863 Mon Sep 17 00:00:00 2001 From: Jeod <47716344+JeodC@users.noreply.github.com> Date: Mon, 22 Jun 2026 07:28:04 -0400 Subject: BK64: Add BB romhack support --- src/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 030eb42..0beffa5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,9 @@ #include #include "CLI11.hpp" #include "Companion.h" +#ifdef BK64_SUPPORT +#include "factories/bk64/ConfigFactory.h" +#endif Companion* Companion::Instance; @@ -140,6 +143,21 @@ int main(int argc, char* argv[]) { } }); +#ifdef BK64_SUPPORT + /* Emit per-slot SHA-1s of the BK64 asset table */ + std::string hashesOut; + const auto hashes = app.add_subcommand( + "hashes", "Hashes - Emit per-slot SHA-1 of BK64 asset table for v1.0 baseline\n"); + + hashes->add_option("", filename, "")->required()->check(CLI::ExistingFile); + hashes->add_option("-o,--output", hashesOut, "Output yaml path (default: hashes.yaml in cwd)"); + + hashes->parse_complete_callback([&] { + const std::filesystem::path outPath = hashesOut.empty() ? "hashes.yaml" : hashesOut; + BK64::EmitAssetHashes(filename, outPath); + }); +#endif + /* Generate modding files */ const auto modding_root = app.add_subcommand("modding", "Modding - Generates modding files like png\n"); const auto modding_import = -- cgit v1.2.3