1 | #!@PERL@ |
1 | #!@PERL@ |
|
|
2 | |
|
|
3 | # |
|
|
4 | # This file is part of Deliantra, the Roguelike Realtime MMORPG. |
|
|
5 | # |
|
|
6 | # Copyright (©) 2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
|
|
7 | # |
|
|
8 | # Deliantra is free software: you can redistribute it and/or modify it under |
|
|
9 | # the terms of the Affero GNU General Public License as published by the |
|
|
10 | # Free Software Foundation, either version 3 of the License, or (at your |
|
|
11 | # option) any later version. |
|
|
12 | # |
|
|
13 | # This program is distributed in the hope that it will be useful, |
|
|
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
16 | # GNU General Public License for more details. |
|
|
17 | # |
|
|
18 | # You should have received a copy of the Affero GNU General Public License |
|
|
19 | # and the GNU General Public License along with this program. If not, see |
|
|
20 | # <http://www.gnu.org/licenses/>. |
|
|
21 | # |
|
|
22 | # The authors can be reached via e-mail to <support@deliantra.net> |
|
|
23 | # |
2 | |
24 | |
3 | use strict; |
25 | use strict; |
4 | |
26 | |
5 | my $prefix = "@prefix@"; |
27 | my $prefix = "@prefix@"; |
6 | my $exec_prefix = "@exec_prefix@"; |
28 | my $exec_prefix = "@exec_prefix@"; |
… | |
… | |
383 | push @ARC, $o; |
405 | push @ARC, $o; |
384 | for (my $m = $o; $m; $m = $m->{more}) { |
406 | for (my $m = $o; $m; $m = $m->{more}) { |
385 | $ARC{$m->{_name}} = $m; |
407 | $ARC{$m->{_name}} = $m; |
386 | } |
408 | } |
387 | |
409 | |
388 | $o->{editor_folder} ||= $dir; |
410 | $o->{editor_folder} ||= "\x00$dir"; # horrible kludge |
389 | |
411 | |
390 | my $visibility = delete $o->{visibility}; |
412 | my $visibility = delete $o->{visibility}; |
391 | my $magicmap = delete $o->{magicmap}; |
413 | my $magicmap = delete $o->{magicmap}; |
392 | |
414 | |
393 | # find upper left corner :/ |
415 | # find upper left corner :/ |
… | |
… | |
677 | $_->join for (@a_trs, @a_res, @a_png); |
699 | $_->join for (@a_trs, @a_res, @a_png); |
678 | |
700 | |
679 | print "scanning done, processing results...\n" if $VERBOSE; |
701 | print "scanning done, processing results...\n" if $VERBOSE; |
680 | { |
702 | { |
681 | # remove path prefix from editor_folder |
703 | # remove path prefix from editor_folder |
|
|
704 | $_->{editor_folder} =~ /^\x00/ |
682 | substr $_->{editor_folder}, 0, 1 + length $path, "" |
705 | and substr $_->{editor_folder}, 0, 2 + length $path, "" |
683 | for values %ARC; |
706 | for values %ARC; |
684 | |
707 | |
685 | print "resolving inheritance tree...\n" if $VERBOSE; |
708 | print "resolving inheritance tree...\n" if $VERBOSE; |
686 | # resolve inherit |
709 | # resolve inherit |
687 | while () { |
710 | while () { |
688 | my $progress; |
711 | my $progress; |