[nostalgia/core] Expand conversion system to allow raw-to-raw

This commit is contained in:
2022-02-17 21:29:46 -06:00
parent fba203a1e7
commit b87c2f0c50
5 changed files with 129 additions and 122 deletions
+6
View File
@@ -47,6 +47,12 @@ ox::Result<AssetRef<T>> readObj(Context *ctx, const ox::FileAddress &file, bool
#endif
}
template<typename T>
ox::Error writeObj(Context *ctx, const ox::FileAddress &file, T &obj, ox::ClawFormat fmt = ox::ClawFormat::Metal) noexcept {
oxRequire(objBuff, ox::writeClaw(&obj, fmt));
return ctx->rom-write(file, objBuff);
}
ox::Result<ox::UniquePtr<ox::FileSystem>> loadRomFs(const char *path) noexcept;
ox::Result<char*> loadRom(const char *path = "") noexcept;