ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra/Deliantra.pm
(Generate patch)

Comparing deliantra/Deliantra/Deliantra.pm (file contents):
Revision 1.16 by root, Tue Feb 21 21:37:01 2006 UTC vs.
Revision 1.17 by root, Wed Feb 22 22:36:45 2006 UTC

224 } 224 }
225 225
226 \%paths 226 \%paths
227} 227}
228 228
229=item ($minx, $miny, $maxx, $maxy) = arch_extents $arch
230
229# arch_extents determines the extents of a given arch 231arch_extents determines the extents of the given arch's face(s), linked
230# bigfaces, linked faces and single faces are handled here 232faces and single faces are handled here it returns (minx, miny, maxx,
231# it returns (minx, miny, maxx, maxy) 233maxy)
234
235=cut
236
232sub arch_extents { 237sub arch_extents {
233 my ($a) = @_; 238 my ($a) = @_;
234 239
235 my $o = $ARCH{$a->{_name}} 240 my $o = $ARCH{$a->{_name}}
236 or return; 241 or return;
265 my ($cachedir) = @_; 270 my ($cachedir) = @_;
266 271
267 return if %ARCH; 272 return if %ARCH;
268 273
269 *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; 274 *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst";
275}
276
277=item $data = arch_attr $arch
278
279Returns a hashref describing the object and its attributes. It can contain
280the following keys:
281
282 name the name, suitable for display purposes
283 ignore
284 attr
285 desc
286 use
287 section => [name => \%attr, name => \%attr]
288
289=cut
290
291sub arch_attr($) {
292 my ($arch) = @_;
293
294 require Crossfire::Data;
295
296 my %attr;
297
298 if ($arch->{type} > 0) {
299 %attr = %{ $Crossfire::Data::ATTR{$arch->{type}+0} || {} };
300 } else {
301 die;
302 }
303
304 use PApp::Util;
305 warn PApp::Util::dumpval \%attr;
270} 306}
271 307
272sub arch_edit_sections { 308sub arch_edit_sections {
273# if (edit_type == IGUIConstants.TILE_EDIT_NONE) 309# if (edit_type == IGUIConstants.TILE_EDIT_NONE)
274# edit_type = 0; 310# edit_type = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines