Porytiles
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1#include <CLI/CLI.hpp>
2#include <fmt/format.h>
3
5
6#include "./command.hpp"
7
8int main(const int argc, char **argv) {
9 CLI::App porytiles_app{"Porytiles"};
10
11 porytiles_app.description(fmt::format(R"(porytiles {} {}
12grunt-lucas <grunt.lucas@yahoo.com>
13
14Overworld tileset compiler for use with the pokeruby, pokefirered, and
15pokeemerald Pokémon Generation III decompilation projects from pret. Also
16compatible with pokeemerald-expansion from rh-hideout. Builds Porymap-ready
17assets from RGBA (or indexed) input assets.
18
19Home Page: https://github.com/grunt-lucas/porytiles)",
20 std::string{PORYTILES_BUILD_VERSION}, std::string{PORYTILES_BUILD_DATE}));
21
22 porytiles_app.footer(
23 R"(To get more help with Porytiles, check out the guides at:
24https://github.com/grunt-lucas/porytiles/wiki
25https://www.youtube.com/playlist?list=PLuyjFojPxF7-O5o_mS6uTBtyYcuyFf_Ce
26
27SEE ALSO
28https://github.com/pret/pokeruby
29https://github.com/pret/pokefirered
30https://github.com/pret/pokeemerald
31https://github.com/rh-hideout/pokeemerald-expansion
32https://github.com/huderlem/porymap)");
33
34 // Override some --version,--help flag defaults.
35 porytiles_app.add_flag(
36 "-V,--version",
37 [](const size_t) {
39 << std::endl;
40 std::exit(0);
41 },
42 "Print version info and exit.");
43 porytiles_app.get_option("--help")->description("Print this help message and exit.");
44
45 CompileTilesetCommand compile_tileset{porytiles_app};
46 CompileLayoutCommand compile_layout{porytiles_app};
47 CompileSpritesheetCommand compile_spritesheet{porytiles_app};
48
49 DecompileTilesetCommand decompile_tileset{porytiles_app};
50 DecompileLayoutCommand decompile_layout{porytiles_app};
51
52 ReduceBitDepthCommand reduce_bit_depth{porytiles_app};
53
54 porytiles_app.require_subcommand();
55
56 CLI11_PARSE(porytiles_app, argc, argv);
57 return 0;
58}
#define PORYTILES_EXECUTABLE
#define PORYTILES_BUILD_VERSION
#define PORYTILES_BUILD_DATE
int main(const int argc, char **argv)
Definition main.cpp:8