/*
 * Copyright 2016 - 2022 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#include <nostalgia/core/core.hpp>

#include "app.hpp"

static ox::Error run(int argc, const char **argv) noexcept {
	ox::trace::init();
	if (argc < 2) {
		oxErr("Please provide path to project directory or OxFS file.\n");
		return OxError(1);
	}
	const auto path = argv[1];
	oxRequireM(fs, nostalgia::core::loadRomFs(path));
	return run(std::move(fs));
}

int main(int argc, const char **argv) {
	const auto err = run(argc, argv);
	oxAssert(err, "Something went wrong...");
	return static_cast<int>(err);
}
