--- deliantra/Deliantra/Deliantra.pm 2006/02/21 21:37:01 1.16 +++ deliantra/Deliantra/Deliantra.pm 2006/02/22 22:36:45 1.17 @@ -226,9 +226,14 @@ \%paths } -# arch_extents determines the extents of a given arch -# bigfaces, linked faces and single faces are handled here -# it returns (minx, miny, maxx, maxy) +=item ($minx, $miny, $maxx, $maxy) = arch_extents $arch + +arch_extents determines the extents of the given arch's face(s), linked +faces and single faces are handled here it returns (minx, miny, maxx, +maxy) + +=cut + sub arch_extents { my ($a) = @_; @@ -269,6 +274,37 @@ *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; } +=item $data = arch_attr $arch + +Returns a hashref describing the object and its attributes. It can contain +the following keys: + + name the name, suitable for display purposes + ignore + attr + desc + use + section => [name => \%attr, name => \%attr] + +=cut + +sub arch_attr($) { + my ($arch) = @_; + + require Crossfire::Data; + + my %attr; + + if ($arch->{type} > 0) { + %attr = %{ $Crossfire::Data::ATTR{$arch->{type}+0} || {} }; + } else { + die; + } + + use PApp::Util; + warn PApp::Util::dumpval \%attr; +} + sub arch_edit_sections { # if (edit_type == IGUIConstants.TILE_EDIT_NONE) # edit_type = 0;