2015-08-21 11:29:53 +00:00
|
|
|
#include <nall/nall.hpp>
|
|
|
|
using namespace nall;
|
|
|
|
|
|
|
|
#include <hiro/hiro.hpp>
|
|
|
|
using namespace hiro;
|
|
|
|
|
2015-11-19 09:27:56 +00:00
|
|
|
//if file already exists in the same path as the binary; use it (portable mode)
|
|
|
|
//if not, use default requested path (*nix/user mode)
|
|
|
|
auto locate(string pathname, string filename) -> string {
|
|
|
|
string location{programpath(), filename};
|
|
|
|
if(file_system_object::exists(location)) return location;
|
|
|
|
return {pathname, filename};
|
|
|
|
}
|
|
|
|
|
2015-08-21 11:29:53 +00:00
|
|
|
#include "settings.cpp"
|
|
|
|
Settings settings;
|
|
|
|
|
|
|
|
#include "heuristics/famicom.hpp"
|
|
|
|
#include "heuristics/super-famicom.hpp"
|
|
|
|
#include "heuristics/game-boy.hpp"
|
|
|
|
#include "heuristics/game-boy-advance.hpp"
|
2015-12-19 09:00:27 +00:00
|
|
|
#include "heuristics/bs-memory.hpp"
|
2015-08-21 11:29:53 +00:00
|
|
|
#include "heuristics/sufami-turbo.hpp"
|
|
|
|
|
|
|
|
#include "core/core.hpp"
|
|
|
|
#include "core/core.cpp"
|
|
|
|
#include "core/famicom.cpp"
|
|
|
|
#include "core/super-famicom.cpp"
|
|
|
|
#include "core/game-boy.cpp"
|
|
|
|
#include "core/game-boy-color.cpp"
|
|
|
|
#include "core/game-boy-advance.cpp"
|
2015-12-19 09:00:27 +00:00
|
|
|
#include "core/bs-memory.cpp"
|
2015-08-21 11:29:53 +00:00
|
|
|
#include "core/sufami-turbo.cpp"
|
|
|
|
Icarus icarus;
|
|
|
|
|
|
|
|
#include "ui/ui.hpp"
|
|
|
|
#include "ui/scan-dialog.cpp"
|
2015-11-19 09:27:56 +00:00
|
|
|
#include "ui/settings-dialog.cpp"
|
2015-08-21 11:29:53 +00:00
|
|
|
#include "ui/import-dialog.cpp"
|
|
|
|
#include "ui/error-dialog.cpp"
|
|
|
|
|
|
|
|
#include <nall/main.hpp>
|
|
|
|
auto nall::main(lstring args) -> void {
|
|
|
|
if(args.size() == 3 && args[1] == "-m") {
|
|
|
|
if(!directory::exists(args[2])) return print("error: directory not found\n");
|
|
|
|
return print(icarus.manifest(args[2]));
|
|
|
|
}
|
|
|
|
|
|
|
|
new ScanDialog;
|
2015-11-19 09:27:56 +00:00
|
|
|
new SettingsDialog;
|
2015-08-21 11:29:53 +00:00
|
|
|
new ImportDialog;
|
|
|
|
new ErrorDialog;
|
|
|
|
scanDialog->show();
|
|
|
|
Application::run();
|
|
|
|
}
|