b46cb65b [nostalgia/studio] Add version 877349df [nostalgia/core/studio] Increase max tilesheet export size, fix input handling when popups open 5418c062 [olympic] Change olympic::s_version to olympic::appVersion dd9c1100 [glutils] Update copyright for 2024 db82aee7 [teagba] Update copyright for 2024 edf15858 [teagba] Update copyright for 2024 d1efbb2f [ox] Update copyright for 2024 051623f4 [olympic,nostalgia] Update copyright for 2024 055d64b1 [olympic] Add support for an AppLib app specific version de9f8426 [ox/std] Add error.hpp include to memory.hpp 200e5867 Add .idea to .gitignore f1609519 [olympic] Cleanup e452d9db [nostalgia] Add python3-mypy to Debian deps 43a87b60 [nostalgia] Ensure pkg-gba reads .current_build without a new line 8acc6244 [olympic/keel] Improve error clarity on pack some common failures bd2aeee2 [ox/claw] Improve error clarity when loading ModelObjects git-subtree-dir: deps/nostalgia git-subtree-split: b46cb65b7f5b1ea17c115fcb31a6baff323ea1a3
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
/*
|
|
* Copyright 2016 - 2024 Gary Talent (gary@drinkingtea.net). All rights reserved.
|
|
*/
|
|
|
|
#include <ox/logconn/def.hpp>
|
|
#include <ox/logconn/logconn.hpp>
|
|
|
|
#include <keel/media.hpp>
|
|
|
|
#include "../modules/keelmodules.hpp"
|
|
|
|
#include "app.hpp"
|
|
|
|
static ox::Error run(int argc, const char **argv) noexcept {
|
|
#ifndef OX_BARE_METAL
|
|
// GBA doesn't need the modules and calling this doubles the size of the
|
|
// binary.
|
|
nostalgia::registerKeelModules();
|
|
#endif
|
|
if (argc < 2) {
|
|
return OxError(1, "Please provide path to project directory or OxFS file.");
|
|
}
|
|
const auto path = argv[1];
|
|
oxRequireM(fs, keel::loadRomFs(path));
|
|
return run(std::move(fs));
|
|
}
|
|
|
|
#ifdef _WIN32
|
|
int WinMain() {
|
|
auto const argc = __argc;
|
|
auto const argv = const_cast<const char**>(__argv);
|
|
#else
|
|
int main(int argc, const char **argv) {
|
|
#endif
|
|
OX_INIT_DEBUG_LOGGER(loggerConn, "Nostalgia Player")
|
|
ox::Error err;
|
|
err = run(argc, argv);
|
|
oxAssert(err, "Something went wrong...");
|
|
if (err) {
|
|
oxErrf("Failure: {}\n", toStr(err));
|
|
}
|
|
return static_cast<int>(err);
|
|
}
|