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.92 by root, Tue Oct 5 23:59:10 2010 UTC vs.
Revision 1.98 by root, Wed Oct 6 01:48:15 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 = ( 161our @WALL_SUFFIX = qw(⬤ ╹ ╺ ┗ ╻ ┃ ┏ ┣ ╸ ┛ ━ ┻ ┓ ┫ ┳ ╋);
162 "_0" => "⬤",
163 "_1_3" => "╸",
164 "_1_4" => "╺",
165 "_2_1_2" => "━",
166 162
167 "_1_2" => "╹", 163# used to create crude text glyphs for text-based clients
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
183sub autoglyph { 164sub autoglyph {
184 my ($stem, $face) = @_; 165 my ($stem, $face) = @_;
185 166
186 if ($stem =~ /^wall\/|Nimwall/) { 167 if ($stem =~ /^wall\/|Nimwall/) {
168 return $WALL_SUFFIX[hex $1]
187 if ($stem =~ /((?:_[0-4])+).x11/) { 169 if $stem =~ /(_[0-9A-F]).x11/;
188 return $WALL_SUFFIX{$1} if exists $WALL_SUFFIX{$1};
189 }
190 170
191 "+" 171 ""
172
173 } elsif ($stem =~ /^traps\//) {
174 "☠"
175
176 } elsif ($stem =~ /^armour\//) {
177 "☗"
178
179 } elsif ($stem =~ /^weapon\//) {
180 "†"
181
182 } elsif ($stem =~ /^readable\//) {
183 "✉"
184
185 } elsif ($stem =~ /^river\//) {
186 "⌇"
192 187
193 } elsif ($stem =~ /^floor\/|^ground\/|Nimfloor/) { 188 } elsif ($stem =~ /^floor\/|^ground\/|Nimfloor/) {
194 "." 189 "."
195 190
196 } elsif ($stem =~ /^player\//) { 191 } elsif ($stem =~ /^player\//) {
197 "\@" 192 "\@"
193
194 } elsif ($stem =~ /^(?:monster|misc|class|connect|gods|indoor|inorganic|mining|music|skills).*\/(.)/) {
195 $1
198 196
199 } else { 197 } else {
200 substr $stem, 0, 1 198 substr $stem, 0, 1
201 } 199 }
202} 200}
850 $v->{magicmap} = $COLOR{$magicmap}; 848 $v->{magicmap} = $COLOR{$magicmap};
851 } 849 }
852 850
853 my $stem = delete $v->{stem}; 851 my $stem = delete $v->{stem};
854 $v->{glyph} //= autoglyph $stem, $v; 852 $v->{glyph} //= autoglyph $stem, $v;
853 utf8::encode $v->{glyph};
855 $v->{glyph} = (chr $v->{magicmap}) . $v->{glyph}; 854 $v->{glyph} = (chr $v->{magicmap}) . $v->{glyph};
856 855
857 delete $v->{arc}; 856 delete $v->{arc};
858 } 857 }
859 858

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines