.\" Hey, EMACS: -*- nroff -*- .\" Please adjust this date whenever revising the manpage. .Dd February 24, 2012 .Dt GRFCodec 1 .Sh NAME .Nm GRFCodec .Nd A tool to convert a GRF file into graphics files and meta data, and vice versa. .Sh SYNOPSIS .Nm grfcodec .Op Fl sv .Op Fl d | e .Op options .Ar GRF\(hyfile .Op Directory .Pp denotes the .GRF file you want to work on, e.g. TRG1.GRF .Pp is where the individual sprites should be saved. If omitted, they will default to a subdirectory called sprites/. .Sh OPTIONS .Bl -tag .It Fl ? Display the help message. .It Fl e Encode a GRF file. The .Ar GRF\(hyfile to pass is the file where to encode to. The source of the GRF\(hyfile, i.e. the .nfo, will be looked for in .Pa sprites/GRF\(hyfile.nfo . All graphics files will be searched for relative from the location of the GRF\(hyfile. .It Fl d Decode a GRF file. The .Ar GRF\(hyfile to pass is the file to decode. The result will be in .Pa sprites/GRF\(hyfile.nfo and .Pa sprites/GRF\(hyfile.png . .It Fl s Silences the progress output in interactive mode .It Fl v Display the version. .El .Pp Options for decoding: .Bl -tag .It Fl w Ar num Write spritesheets files with the given width (default 800, minimum 16) .It Fl h Ar num Split spritesheets when they reach this height (default no limit, minimum 16) .It Fl b Ar num Organize sprites in boxes of this size (default 16) .It Fl o Ar ssf Sets the format of generated spritesheets. See .Fl o ? for a list. .It Fl p Ar pal Use this palette instead of the default. See .Fl p ? for a list. .It Fl t Disable decoding of plain text characters as strings. .It Fl x Disable production of unquoted escape sequences. .It Fl xx Disable production of both quoted and unquoted escape sequences. .Pp This has the side effect of producing a version 6 .nfo, instead of a version 7 .nfo. .It Fl X List sprite numbers in the image file in hex. .El .Pp Options for encoding: .Bl -tag .It Fl c Crop extraneous transparent blue from real sprites .It Fl u Save uncompressed data (probably not a good idea) .It Fl q Suppress warning messages .It Fl g Ar num Create a GRF file with the given container version. Valid versions are 1 and 2, where the latter allows bigger sprites, larger sounds, and multiple zoom levels and bit depths for the sprites. .It Fl n Try both compression algorithms and use the most efficient. This might cause trouble when loading the NewGRF in TTDPatch. .El .Pp Options for both encoding and decoding: .Bl -tag .It Fl m Ar num Apply colour translation to all sprites except character\(hyglyphs. .It Fl M Ar num Apply colour translation to all sprites. .Pp If both of these are specified, only the last is obeyed. .Fl m ? or .Fl M ? for a list of colour translations. .El .Sh SEE ALSO The documentation in .Pa /usr/share/doc/grfcodec/ .Sh AUTHOR GRFCodec was written by Josef Drexler. .Pp This manual page was written by Remko Bijker. .Sh COPYRIGHT GRFCodec is Copyright (C) 2000\(hy2005 by Josef Drexler