]> git.draconx.ca Git - liblbx.git/commitdiff
Add man pages for lbxtool and lbximg
authorNick Bowler <draconx@gmail.com>
Sat, 5 Jan 2008 05:01:23 +0000 (00:01 -0500)
committerNick Bowler <draconx@gmail.com>
Sat, 5 Jan 2008 05:01:23 +0000 (00:01 -0500)
Makefile.am
configure.ac
doc/man/Makefile.am [new file with mode: 0644]
doc/man/lbximg.1 [new file with mode: 0644]
doc/man/lbxtool.1 [new file with mode: 0644]
src/Makefile.am
src/lbximg.c

index af437a64d6d80a47ea903fd842a648fc59cbcd9a..e1c7d3aa7e2ecbb098929beff19e5e52bf6d285f 100644 (file)
@@ -1 +1,2 @@
-SUBDIRS = src
+SUBDIRS = src doc/man
+DISTCLEANFILES = pkg_err_file pkg_rpt_file
index 48c392c08f517130c255b7852e95fe8af43a8b24..5494e25b4914d79a4636a1496df82b7005ff01e4 100644 (file)
@@ -32,6 +32,7 @@ AM_CONDITIONAL([BUILD_LBXIMG], [test x"$have_libpng" = x"yes"])
 AC_CONFIG_FILES([
        Makefile
        src/Makefile
+       doc/man/Makefile
 ])
 
 AC_OUTPUT
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
new file mode 100644 (file)
index 0000000..f0c58f8
--- /dev/null
@@ -0,0 +1 @@
+dist_man_MANS = lbxtool.1 lbximg.1
diff --git a/doc/man/lbximg.1 b/doc/man/lbximg.1
new file mode 100644 (file)
index 0000000..cebcef7
--- /dev/null
@@ -0,0 +1,66 @@
+.Dd January 4, 2008
+.Os liblbx
+.Dt LBXIMG \&1 "2ooM Reference Manual"
+.Sh NAME
+.Nm lbximg
+.Nd inspect and decode LBX images
+.Sh SYNOPSIS
+.Nm
+.Op Fl i Ns | Ns Fl d
+.Op Fl v
+.Op Fl p Ar palette_file
+.Op Fl O Ar override_file
+.Op Fl f Ar path
+.Op Ar frameno ...
+.Sh DESCRIPTION
+.Nm
+identifies and decodes LBX image files, using
+.Em liblbx .
+LBX images are multi-frame, 256-colour paletted images with transparency.
+.Nm
+can be used to convert some or all of the frames of an LBX image to PNG.
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl i , -ident
+Sets the operating mode to identify the image format.
+.It Fl d , -decode
+Sets the operating mode to decode frames to PNG.
+.It Fl v , -verbose
+Output additional information on standard output.
+.It Fl f , -file Ar path
+Read from the specified
+.Ar path
+instead of standard input.  If
+.Ar path
+is -,
+.Nm
+will read from standard input anyway.
+.It Fl p , -palette Ar palette_file
+Read the base palette from
+.Ar palette_file .
+In Moo2, these files are found in
+.Pa fonts.lbx .
+Without this option, the base palette is filled with a nice hot pink.  Colours
+in the base palette are superseded by those in the embedded palette and the
+override palette.
+.It Fl O , -override Ar override_file
+Use the embedded palette of an LBX image specified by
+.Ar override_file
+as the override palette.  In Moo2, this is notably used to select the player
+colour for ship images.  Colours in the override palette supersede those in
+both the base palette and the embedded palette.
+.It Ar frameno ...
+Specifies the frames to decode as a sequence of intervals, with frames indexing
+from zero.  By default, all frames are decoded.  Multiplicity is ignored, as is
+the order in which frames are specified.  For example:
+.Bl -tag -width
+.It Nm Li -d 3 6
+Decode frames 3 and 6.
+.It Nm Li -d 4-9
+Decode frames 4 through 9, inclusive
+.It Nm Li -d 6-9 1-4
+Decode frames 1 through 9, except for frame 5.
+.It Nm Li -d 3-
+Decode all frames except the first 3.
+.El
+.El
diff --git a/doc/man/lbxtool.1 b/doc/man/lbxtool.1
new file mode 100644 (file)
index 0000000..a5ac319
--- /dev/null
@@ -0,0 +1,41 @@
+.Dd January 4, 2008
+.Os liblbx
+.Dt LBXTOOL \&1 "2ooM Reference Manual"
+.Sh NAME
+.Nm lbxtool
+.Nd manipulate LBX archives
+.Sh SYNOPSIS
+.Nm
+.Op Fl l Ns | Ns Fl x
+.Op Fl v
+.Op Fl f Ar path
+.Op Ar
+.Sh DESCRIPTION
+.Nm
+lists and extracts files from LBX archives (the format used by Moo2),
+using
+.Em liblbx .
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl l , -list
+Sets the operating mode to list files in the archive.
+.It Fl x , -extract
+Sets the operating mode to extract files from the archive.
+.It Fl v , -verbose
+Output additional information on standard output.
+.It Fl f , -file Ar path
+Read from the specified
+.Ar path
+instead of standard input.  If
+.Ar path
+is -,
+.Nm
+will read from standard input anyway.
+.It Ar
+Limit the operation to these files in the archive.  By default, all files are
+selected.  Supports common shell globbing features.
+.El
+.Sh CAVEATS
+When extracting from an archive read from standard input, be sure to specify
+files in the order that they appear in the archive.  This limitation will
+hopefully be lifted in the future.
index f9958b9515ad73770dcc7f14ad74dc25915a89ff..ab54c5a0841577544bcdf27f78701bad5bc94aa8 100644 (file)
@@ -1,6 +1,8 @@
 lib_LTLIBRARIES   = liblbx.la
 bin_PROGRAMS      = lbxtool lbximg
-include_HEADERS   = lbx.h
+
+lbxdir = $(includedir)/lbx
+lbx_HEADERS   = lbx.h image.h
 
 liblbx_la_SOURCES = byteorder.h misc.h misc.c lbx.c image.c
 
index 921d42b797c6a8bd3d35f763d0d4288bbea75059..61516196174999a7aab25ca0f9428699184845ff 100644 (file)
@@ -358,7 +358,7 @@ int main(int argc, char **argv)
 
        static const char *sopts = "idvf:p:O:";
        static const struct option lopts[] = {
-               { "info",     0, NULL, 'i' },
+               { "ident",    0, NULL, 'i' },
                { "decode",   0, NULL, 'd' },
                { "verbose",  0, NULL, 'v' },
                { "file",     1, NULL, 'f' },