… | |
… | |
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\">", |
|
|
66 | "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>", |
65 | "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>", |
67 | "<head>", |
66 | "<head>", |
68 | "<title>Crossfire Map \"$path\"</title>", |
67 | "<title>Crossfire Map \"$path\"</title>", |
69 | "<link rel='stylesheet' type='text/css' media='all' href='/common.css'/>\n", |
68 | "<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", |
69 | "<link rel='stylesheet' type='text/css' media='all' href='/overlay.css' title='Show Overlays'/>\n", |
… | |
… | |
119 | print "<tr>"; |
118 | print "<tr>"; |
120 | for my $x (0.. $meta->{width} - 1) { |
119 | for my $x (0.. $meta->{width} - 1) { |
121 | if (my $as = $meta->{map}[$x][$y]) { |
120 | if (my $as = $meta->{map}[$x][$y]) { |
122 | my @class; |
121 | my @class; |
123 | |
122 | |
124 | push @class, "fishy" if grep $_->{invisible} || $_->{face} || exists $_->{no_pass}, @$as; |
123 | push @class, "fishy" if grep $_->{invisible} || $_->{face} || exists $_->{no_pass}, @$as; |
125 | push @class, "exit" if grep $is_exit{$arch->{$_->{_name}}{type}}, @$as; |
124 | push @class, "exit" if grep $is_exit{$arch->{$_->{_name}}{type}} && $_->{slaying}, @$as; |
126 | |
125 | push @class, "dialog" if grep $_->{msg} =~ /^\@match/m, @$as; |
127 | my @connected = grep $_, map $_->{connected}, @$as; |
|
|
128 | |
126 | |
129 | print "<td", (@class ? " class='" . (join " ", @class) . "'" : ""), ">"; |
127 | print "<td", (@class ? " class='" . (join " ", @class) . "'" : ""), ">"; |
130 | print "<div>"; |
128 | print "<div>"; |
131 | print "<span class='c'>", (join ", ", @connected), "</span>" if @connected; |
129 | |
|
|
130 | print join "\n", map "<span class='c'>$_</span>", |
|
|
131 | reverse sort { (length $a) <=> (length $b) or $b <=> $a } |
|
|
132 | grep $_, map $_->{connected}, @$as; |
|
|
133 | |
132 | print "<div>($x|$y)"; |
134 | print "<div>($x|$y)"; |
133 | |
135 | |
134 | sub print_archs { |
136 | sub print_archs { |
135 | print "<ul>"; |
137 | print "<ul>"; |
136 | for my $a (@{$_[0]}) { |
138 | for my $a (@{$_[0]}) { |