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
4
#include "
porytiles2/build_version.h
"
5
6
#include "
command.hpp
"
7
#include "
create_tileset_command.hpp
"
8
#include "
debug_commands.hpp
"
9
#include "
verify_tileset_command.hpp
"
10
11
int
main
(
const
int
argc,
char
**argv)
12
{
13
CLI::App porytiles_app{
"Porytiles"
};
14
15
porytiles_app.description(
16
fmt::format(
17
R
"(porytiles {} {}
18
grunt-lucas <grunt.lucas@yahoo.com>
19
20
Overworld tileset compiler for use with the pokeruby, pokefirered, and
21
pokeemerald Pokémon Generation III decompilation projects from pret. Also
22
compatible with pokeemerald-expansion from rh-hideout. Builds Porymap-ready
23
assets from RGBA (or indexed) input assets.
24
25
Home 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:
31
https://github.com/grunt-lucas/porytiles/wiki
32
https://www.youtube.com/playlist?list=PLuyjFojPxF7-O5o_mS6uTBtyYcuyFf_Ce
33
34
SEE ALSO
35
https://github.com/pret/pokeruby
36
https://github.com/pret/pokefirered
37
https://github.com/pret/pokeemerald
38
https://github.com/rh-hideout/pokeemerald-expansion
39
https://github.com/huderlem/porymap)");
40
41
// Override some --version,--help flag defaults.
42
porytiles_app.add_flag(
43
"-V,--version"
,
44
[](
const
size_t
) {
45
std::cout <<
PORYTILES_EXECUTABLE
<<
" "
<<
PORYTILES_BUILD_VERSION
<<
" "
<<
PORYTILES_BUILD_DATE
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
}
build_version.h
PORYTILES_EXECUTABLE
#define PORYTILES_EXECUTABLE
Definition
build_version.h:25
PORYTILES_BUILD_VERSION
#define PORYTILES_BUILD_VERSION
Definition
build_version.h:26
PORYTILES_BUILD_DATE
#define PORYTILES_BUILD_DATE
Definition
build_version.h:27
CreateTilesetCommand
Definition
create_tileset_command.hpp:10
DebugPrimaryCompileCommand
Definition
debug_commands.hpp:36
VerifyTilesetCommand
Definition
verify_tileset_command.hpp:11
command.hpp
create_tileset_command.hpp
debug_commands.hpp
main
int main(const int argc, char **argv)
Definition
main.cpp:11
verify_tileset_command.hpp
Porytiles2
tools
driver
main.cpp
Generated by
1.9.8