summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: 3149b6600a53f7b29f0d102db3479eea10b3c41b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include "CLI11.hpp"
#include "Companion.h"

#ifdef STANDALONE
Companion* Companion::Instance;

int main(int argc, char *argv[]) {
    CLI::App app{"CubeOS - Rom extractor"};

    std::string filename;
    app.add_option("path", filename, "sm64 us rom")->required()->check(CLI::ExistingFile);

    try {
        app.parse(argc, argv);
    } catch (const CLI::ParseError &e) {
        return app.exit(e);
    }

    Companion::Instance = new Companion(filename);
    Companion::Instance->Init();
    return 0;
}
#endif