[nostalgia] Update Studio to handle tabs and open directory dialog on Mac, Update core::init

This commit is contained in:
2021-10-31 13:31:12 -05:00
parent e29f65f351
commit ad743565b2
28 changed files with 416 additions and 155 deletions

View File

@@ -32,8 +32,8 @@ static int eventHandler(core::Context *ctx) noexcept {
return 16;
}
ox::Error run(ox::FileSystem *fs) noexcept {
oxRequireM(ctx, core::init(fs));
ox::Error run(ox::UniquePtr<ox::FileSystem> fs) noexcept {
oxRequireM(ctx, core::init(std::move(fs)));
constexpr auto TileSheetAddr = "/TileSheets/Charset.ng";
constexpr auto PaletteAddr = "/Palettes/Charset.npal";
oxReturnError(core::loadSpriteTileSheet(ctx.get(), 0, TileSheetAddr, PaletteAddr));

View File

@@ -6,4 +6,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
class ox::Error run(class ox::FileSystem *fs) noexcept;
#include <ox/std/memory.hpp>
class ox::Error run(ox::UniquePtr<class ox::FileSystem> fs) noexcept;

View File

@@ -17,8 +17,8 @@ static ox::Error run(int argc, const char **argv) noexcept {
return OxError(1);
}
const auto path = argv[1];
oxRequire(fs, nostalgia::core::loadRomFs(path));
return run(fs.get());
oxRequireM(fs, nostalgia::core::loadRomFs(path));
return run(std::move(fs));
}
int main(int argc, const char **argv) {