summaryrefslogtreecommitdiff
path: root/tools/pokemon_animation.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pokemon_animation.c')
-rw-r--r--tools/pokemon_animation.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/pokemon_animation.c b/tools/pokemon_animation.c
index a854c8b4c..cb5766896 100644
--- a/tools/pokemon_animation.c
+++ b/tools/pokemon_animation.c
@@ -1,3 +1,6 @@
+#define PROGRAM_NAME "pokemon_animation"
+#define USAGE_OPTS "[-h|--help] [-b|--bitmasks] [-f|--frames] front.animated.tilemap front.dimensions"
+
#include "common.h"
struct Options {
@@ -5,10 +8,6 @@ struct Options {
bool use_frames;
};
-void usage() {
- fputs("Usage: pokemon_animation [-b|--bitmasks] [-f|--frames] front.animated.tilemap front.dimensions\n", stderr);
-}
-
void parse_args(int argc, char *argv[], struct Options *options) {
struct option long_options[] = {
{"bitmasks", no_argument, 0, 'b'},
@@ -25,12 +24,10 @@ void parse_args(int argc, char *argv[], struct Options *options) {
options->use_frames = true;
break;
case 'h':
- usage();
- exit(0);
+ usage_exit(0);
break;
default:
- usage();
- exit(1);
+ usage_exit(1);
}
}
}
@@ -175,8 +172,7 @@ int main(int argc, char *argv[]) {
argc -= optind;
argv += optind;
if (argc < 2) {
- usage();
- exit(1);
+ usage_exit(1);
}
int width;