#!/usr/bin/perl # # Ship List Image Overview # # Usage: perl shiplist.pl # # This generates a HTML file on stdout, which contains all ship # types, as well as their pictures. Place the file in your # Winplan directory, and open it with your browser, to see all # ships. This is useful for ship-list designers, to see what # pictures are available. # $COLUMNS = 8; $DIRECTORY = shift(@ARGV) || "."; open HULL, "< $DIRECTORY/hullspec.dat" or die "can't open hullspec: $!"; binmode HULL; print "Schiffsbilder"; foreach (0..104) { if ($_ % $COLUMNS == 0) { print ""; } read HULL, $hull, 60; my ($name, $image) = unpack "A30v", $hull; print "\n"; if ($_ % $COLUMNS == $COLUMNS-1) { print ""; } } print "
$name
\n";