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"
8#include "debug_commands.hpp"
10
11int main(const int argc, char **argv)
12{
13 CLI::App porytiles_app{"Porytiles"};
14
15 porytiles_app.description(
16 fmt::format(
17 R"(porytiles {} {}
18grunt-lucas <grunt.lucas@yahoo.com>
19
20Overworld tileset compiler for use with the pokeruby, pokefirered, and
21pokeemerald Pokémon Generation III decompilation projects from pret. Also
22compatible with pokeemerald-expansion from rh-hideout. Builds Porymap-ready
23assets from RGBA (or indexed) input assets.
24
25Home Page: https://github.com/grunt-lucas/porytiles)",
26 std::string{PORYTILES_BUILD_VERSION},
27 std::string{PORYTILES_BUILD_DATE}));
28
29 porytiles_app.footer(
30 R"(To get more help with Porytiles, check out the guides at:
31https://github.com/grunt-lucas/porytiles/wiki
32https://www.youtube.com/playlist?list=PLuyjFojPxF7-O5o_mS6uTBtyYcuyFf_Ce
33
34SEE ALSO
35https://github.com/pret/pokeruby
36https://github.com/pret/pokefirered
37https://github.com/pret/pokeemerald
38https://github.com/rh-hideout/pokeemerald-expansion
39https://github.com/huderlem/porymap)");
40
41 // Override some --version,--help flag defaults.
42 porytiles_app.add_flag(
43 "-V,--version",
44 [](const size_t) {
46 << std::endl;
47 std::exit(0);
48 },
49 "Print version info and exit.");
50 porytiles_app.get_option("--help")->description("Print this help message and exit.");
51
52 CreateTilesetCommand create_tileset{porytiles_app};
53 VerifyTilesetCommand verify_tileset{porytiles_app};
54 DebugPrimaryCompileCommand debug_compile{porytiles_app};
55
56 porytiles_app.require_subcommand();
57
58 CLI11_PARSE(porytiles_app, argc, argv);
59 return 0;
60}
#define PORYTILES_EXECUTABLE
#define PORYTILES_BUILD_VERSION
#define PORYTILES_BUILD_DATE
int main(const int argc, char **argv)
Definition main.cpp:11