summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-08 17:29:32 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-08 17:29:32 -0400
commitdc82a851014290f99dfef34298c3c8f96580ca96 (patch)
tree14a182ce950b06742555f29418ec7d672c3f011c
parentdaa8c5eca5a9fac0747599061b0159007a2440dc (diff)
downloadgames-nes-spritemaker-dc82a851014290f99dfef34298c3c8f96580ca96.tar.gz
games-nes-spritemaker-dc82a851014290f99dfef34298c3c8f96580ca96.zip
docs
-rw-r--r--bin/pnm2chr17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/pnm2chr b/bin/pnm2chr
index 4f0dc33..a0754ab 100644
--- a/bin/pnm2chr
+++ b/bin/pnm2chr
@@ -1,9 +1,26 @@
#!/usr/bin/env perl
use strict;
use warnings;
+# PODNAME: pnm2chr
+# ABSTRACT: converts PNM files to NES sprite data (.chr files)
use Games::NES::SpriteMaker 'image_to_sprite';
+=head1 SYNOPSIS
+
+ pnm2chr input.pgm # generates input.chr
+ pnm2chr < input.pgm > output.chr
+
+=head1 DESCRIPTION
+
+This is a simple wrapper around L<Games::NES::SpriteMaker> to convert existing
+files from PNM format to CHR-ROM format. If you pass a filename as an argument,
+it will create a new file in the same directory with the same name except
+replacing the extension with C<.chr>, otherwise it will read PNM data from
+stdin and write CHR data to stdout.
+
+=cut
+
my $data;
if (@ARGV) {
$data = $ARGV[0];