[nostalgia/tools/pack] Fix nost-pack to pass in proper Context
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <nostalgia/appmodules/appmodules.hpp>
|
||||
#include <nostalgia/core/typestore.hpp>
|
||||
#include <nostalgia/foundation/foundation.hpp>
|
||||
|
||||
#include "pack/pack.hpp"
|
||||
|
||||
@@ -57,10 +58,11 @@ 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::PassThroughFS src(argSrc);
|
||||
auto src = ox::make_unique<ox::PassThroughFS>(argSrc);
|
||||
ox::FileSystem32 dst(ox::FileStore32(dstBuff.data(), dstBuff.size()));
|
||||
core::TypeStore ts(&src);
|
||||
oxReturnError(pack(&ts, &src, &dst));
|
||||
core::TypeStore ts(src.get());
|
||||
auto ctx = foundation::init(std::move(src), "nost-pack");
|
||||
oxReturnError(pack(ctx.get(), &ts, ctx->rom.get(), &dst));
|
||||
oxRequireM(pl, GbaPreloader::make());
|
||||
oxReturnError(preload(&ts, &dst, pl.get()));
|
||||
oxReturnError(dst.resize());
|
||||
|
||||
Reference in New Issue
Block a user