[keel,nostalgia,turbine] Cleanup
This commit is contained in:
@@ -4,7 +4,6 @@ target_link_libraries(
|
||||
nost-pack
|
||||
OxClArgs
|
||||
OxLogConn
|
||||
Keel
|
||||
NostalgiaKeelModules
|
||||
)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <ox/clargs/clargs.hpp>
|
||||
#include <ox/fs/fs.hpp>
|
||||
#include <ox/logconn/def.hpp>
|
||||
#include <ox/logconn/logconn.hpp>
|
||||
|
||||
#include <keel/keel.hpp>
|
||||
@@ -50,7 +51,6 @@ static ox::Error generateTypes(ox::TypeStore *ts) noexcept {
|
||||
}
|
||||
|
||||
static ox::Error run(const ox::ClArgs &args) noexcept {
|
||||
nostalgia::registerKeelModules();
|
||||
const auto argSrc = args.getString("src", "");
|
||||
const auto argRomBin = args.getString("rom-bin", "");
|
||||
if (argSrc == "") {
|
||||
@@ -63,7 +63,7 @@ static ox::Error run(const ox::ClArgs &args) noexcept {
|
||||
}
|
||||
ox::Buffer dstBuff(32 * ox::units::MB);
|
||||
oxReturnError(ox::FileSystem32::format(dstBuff.data(), dstBuff.size()));
|
||||
ox::FileSystem32 dst(ox::FileStore32(dstBuff.data(), dstBuff.size()));
|
||||
ox::FileSystem32 dst(dstBuff);
|
||||
oxRequire(ctx, keel::init(ox::make_unique<ox::PassThroughFS>(argSrc), "nost-pack"));
|
||||
keel::TypeStore ts(ctx->rom.get(), "/.nostalgia/type_descriptors");
|
||||
oxReturnError(generateTypes(&ts));
|
||||
@@ -87,16 +87,8 @@ static ox::Error run(const ox::ClArgs &args) noexcept {
|
||||
}
|
||||
|
||||
int main(int argc, const char **args) {
|
||||
ox::trace::init();
|
||||
#ifdef DEBUG
|
||||
ox::LoggerConn loggerConn;
|
||||
const auto loggerErr = loggerConn.initConn("nost-pack");
|
||||
if (loggerErr) {
|
||||
oxErrf("Could not connect to logger: {} ({}:{})\n", toStr(loggerErr), loggerErr.file, loggerErr.line);
|
||||
} else {
|
||||
ox::trace::setLogger(&loggerConn);
|
||||
}
|
||||
#endif
|
||||
OX_INIT_DEBUG_LOGGER(loggerConn, "nost-pack")
|
||||
nostalgia::registerKeelModules();
|
||||
const auto err = run(ox::ClArgs(argc, args));
|
||||
oxAssert(err, "pack failed");
|
||||
return static_cast<int>(err);
|
||||
|
||||
Reference in New Issue
Block a user