ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/utils/cfutil.in
(Generate patch)

Comparing deliantra/server/utils/cfutil.in (file contents):
Revision 1.89 by root, Tue Oct 5 23:26:56 2010 UTC vs.
Revision 1.90 by root, Tue Oct 5 23:52:02 2010 UTC

156 and die "map installation failed.\n"; 156 and die "map installation failed.\n";
157 157
158 print "maps installed successfully.\n"; 158 print "maps installed successfully.\n";
159} 159}
160 160
161our %WALL_SUFFIX = (
162 "0" => "⬤",
163 "1_3" => "╸",
164 "1_4" => "╺",
165 "2_1_2" => "━",
166
167 "1_2" => "╹",
168 "2_2_4" => "┛",
169 "2_2_1" => "┗",
170 "3_1" => "┻",
171
172 "1_1" => "╻",
173 "2_2_3" => "┓",
174 "2_2_2" => "┏",
175 "3_3" => "┳",
176
177 "2_1_1" => "┃",
178 "3_4" => "┫",
179 "3_2" => "┣",
180 "4" => "╋",
181);
182
161sub autoglyph { 183sub autoglyph {
162 my ($stem, $face) = @_; 184 my ($stem, $face) = @_;
163 185
164 if ($stem =~ /^wall\/|Nimwall/) { 186 if ($stem =~ /^wall\/|Nimwall/) {
165# warn $stem; 187 while (my ($k, $v) = each %WALL_SUFFIX) {
188 return $v if $stem =~ /_$k.x11/;
189 }
190
166 "+" 191 "+"
192
167 } elsif ($stem =~ /^floor\/|^ground\/|Nimfloor/) { 193 } elsif ($stem =~ /^floor\/|^ground\/|Nimfloor/) {
168 "." 194 "."
195
169 } elsif ($stem =~ /^player\//) { 196 } elsif ($stem =~ /^player\//) {
170 "\@" 197 "\@"
198
171 } else { 199 } else {
172 substr $stem, 0, 1 200 substr $stem, 0, 1
173 } 201 }
174} 202}
175 203

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines