… | |
… | |
60 | my $W2 = $W + 600; |
60 | my $W2 = $W + 600; |
61 | |
61 | |
62 | my (@path) = split /\//, $path; |
62 | my (@path) = split /\//, $path; |
63 | |
63 | |
64 | print "<?xml version='1.0' encoding='utf-8'?>", |
64 | print "<?xml version='1.0' encoding='utf-8'?>", |
65 | "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">", |
65 | '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', |
66 | "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>", |
66 | "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>", |
67 | "<head>", |
67 | "<head>", |
68 | "<title>Crossfire Map \"$path\"</title>", |
68 | "<title>Crossfire Map \"$path\"</title>", |
69 | "<link rel='stylesheet' type='text/css' media='all' href='/common.css'/>\n", |
69 | "<link rel='stylesheet' type='text/css' media='all' href='/common.css'/>\n", |
70 | "<link rel='stylesheet' type='text/css' media='all' href='/overlay.css' title='Show Overlays'/>\n", |
70 | "<link rel='stylesheet' type='text/css' media='all' href='/overlay.css' title='Show Overlays'/>\n", |
… | |
… | |
119 | print "<tr>"; |
119 | print "<tr>"; |
120 | for my $x (0.. $meta->{width} - 1) { |
120 | for my $x (0.. $meta->{width} - 1) { |
121 | if (my $as = $meta->{map}[$x][$y]) { |
121 | if (my $as = $meta->{map}[$x][$y]) { |
122 | my @class; |
122 | my @class; |
123 | |
123 | |
124 | push @class, "fishy" if grep $_->{invisible} || $_->{face} || exists $_->{no_pass}, @$as; |
124 | push @class, "fishy" if grep $_->{invisible} || $_->{face} || exists $_->{no_pass} || exists $_->{no_pick}, @$as; |
125 | push @class, "exit" if grep $is_exit{$arch->{$_->{_name}}{type}} && $_->{slaying}, @$as; |
125 | push @class, "exit" if grep $is_exit{$arch->{$_->{_name}}{type}} && $_->{slaying}, @$as; |
126 | push @class, "dialog" if grep $_->{msg} =~ /^\@match/m, @$as; |
126 | push @class, "dialog" if grep $_->{msg} =~ /^\@match/m, @$as; |
127 | |
127 | |
128 | print "<td", (@class ? " class='" . (join " ", @class) . "'" : ""), ">"; |
128 | print "<td", (@class ? " class='" . (join " ", @class) . "'" : ""), ">"; |
129 | print "<div>"; |
129 | print "<div>"; |
… | |
… | |
180 | print "</table><p class='footer'>created by <a href='http://software.schmorp.de/#crossfire'>cfmap2html</a> version $VERSION</p>", |
180 | print "</table><p class='footer'>created by <a href='http://software.schmorp.de/#crossfire'>cfmap2html</a> version $VERSION</p>", |
181 | "<p class='enlarge'/></body></html>"; |
181 | "<p class='enlarge'/></body></html>"; |
182 | |
182 | |
183 | close $fh; |
183 | close $fh; |
184 | |
184 | |
185 | system "gzip", "-7f", "$path.xhtml"; |
185 | #system "gzip", "-7f", "$path.xhtml"; |
186 | } |
186 | } |
187 | |
187 | |