--- cfmaps/cfmapidx 2005/11/23 09:07:21 1.3 +++ cfmaps/cfmapidx 2007/06/21 12:30:10 1.8 @@ -1,7 +1,7 @@ #!/opt/bin/perl # cfmap2idx - inverted index for crossfire maps -# Copyright (C) 2005 Marc Lehmann +# Copyright (C) 2005,2007 Marc Lehmann # # CFMAPIDX is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,12 +14,12 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with gvpe; if not, write to the Free Software +# along with cfmaps; if not, write to the Free Software # Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -our $VERSION = '0.91'; +our $VERSION = '0.912'; -use Storable; +use Crossfire; use DB_File; sub escape_html($) { @@ -77,7 +77,7 @@ print "
  • $_
  • "; } - print "

    ", + print "

    ", ""; } @@ -90,9 +90,10 @@ my %idx2; for my $path (@ARGV) { + (my $base = $path) =~ s/\.map$//; my $docnum = pack "n", ++$idx{Vdocnum}; - $idx{"D$docnum"} = $path; - my $meta = Storable::retrieve "$path.pst"; + $idx{"D$docnum"} = $base; + my $meta = read_arch "$base.map"; for my $x (0 .. $meta->{width} - 1) { for my $y (0 .. $meta->{height} - 1) {