33 lines
737 B
C++
33 lines
737 B
C++
#include <cflags.hpp>
|
|
#include <ircolib/mem_access.hpp>
|
|
#include <loaders/elf.hpp>
|
|
#include <loaders/dol.hpp>
|
|
#include <ircolib/log.hpp>
|
|
#include <mem.hpp>
|
|
|
|
int main(int argc, char **argv) {
|
|
weee::core::mem mem;
|
|
|
|
cflags::cflags flags;
|
|
flags.add_string_callback(
|
|
'\0', "elf",
|
|
[&](const std::string &v) {
|
|
if (!weee::core::load_elf(v, mem))
|
|
ircolib::panic("Could not load '{}'", v);
|
|
},
|
|
"ELF binary to load");
|
|
|
|
flags.add_string_callback(
|
|
'\0', "dol",
|
|
[&](const std::string &v) {
|
|
if (!weee::core::load_dol(v, mem))
|
|
ircolib::panic("Could not load '{}'", v);
|
|
},
|
|
"DOL binary to load");
|
|
|
|
if (!flags.parse(argc, argv))
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|