[nostalgia/core] Expand conversion system to allow raw-to-raw
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user