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
8
int
main
(
const
int
argc,
char
**argv) {
9
CLI::App porytiles_app{
"Porytiles"
};
10
11
porytiles_app.description(fmt::format(R
"(porytiles {} {}
12
grunt-lucas <grunt.lucas@yahoo.com>
13
14
Overworld tileset compiler for use with the pokeruby, pokefirered, and
15
pokeemerald Pokémon Generation III decompilation projects from pret. Also
16
compatible with pokeemerald-expansion from rh-hideout. Builds Porymap-ready
17
assets from RGBA (or indexed) input assets.
18
19
Home 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:
24
https://github.com/grunt-lucas/porytiles/wiki
25
https://www.youtube.com/playlist?list=PLuyjFojPxF7-O5o_mS6uTBtyYcuyFf_Ce
26
27
SEE ALSO
28
https://github.com/pret/pokeruby
29
https://github.com/pret/pokefirered
30
https://github.com/pret/pokeemerald
31
https://github.com/rh-hideout/pokeemerald-expansion
32
https://github.com/huderlem/porymap)");
33
34
// Override some --version,--help flag defaults.
35
porytiles_app.add_flag(
36
"-V,--version"
,
37
[](
const
size_t
) {
38
std::cout <<
PORYTILES_EXECUTABLE
<<
" "
<<
PORYTILES_BUILD_VERSION
<<
" "
<<
PORYTILES_BUILD_DATE
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
}
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
CompileLayoutCommand
Definition
command.hpp:77
CompileSpritesheetCommand
Definition
command.hpp:99
CompileTilesetCommand
Definition
command.hpp:55
DecompileLayoutCommand
Definition
command.hpp:143
DecompileTilesetCommand
Definition
command.hpp:121
ReduceBitDepthCommand
Definition
command.hpp:165
command.hpp
main
int main(const int argc, char **argv)
Definition
main.cpp:8
Porytiles2
tools
driver
main.cpp
Generated by
1.9.8