1 | =head1 NAME |
1 | =head1 NAME |
2 | |
2 | |
3 | Crossfire::Map - represent a crossfire map |
3 | Deliantra::Map - represent a crossfire map |
4 | |
4 | |
5 | =cut |
5 | =cut |
6 | |
6 | |
7 | package Crossfire::Map; |
7 | package Deliantra::Map; |
8 | |
8 | |
9 | our $VERSION = '0.1'; |
9 | our $VERSION = '0.1'; |
10 | |
10 | |
11 | use strict; |
11 | use strict; |
12 | |
12 | |
13 | use Carp (); |
13 | use Carp (); |
14 | use Crossfire; |
14 | use Deliantra; |
15 | |
15 | |
16 | use base 'Exporter'; |
16 | use base 'Exporter'; |
17 | |
17 | |
18 | sub new { |
18 | sub new { |
19 | my ($class, $width, $height) = @_; |
19 | my ($class, $width, $height) = @_; |
… | |
… | |
154 | my %meta = %{$self->{info}}; |
154 | my %meta = %{$self->{info}}; |
155 | |
155 | |
156 | $meta{width} = $self->{width}; |
156 | $meta{width} = $self->{width}; |
157 | $meta{height} = $self->{height}; |
157 | $meta{height} = $self->{height}; |
158 | |
158 | |
159 | unshift @arch, Crossfire::normalize_arch \%meta; |
159 | unshift @arch, Deliantra::normalize_arch \%meta; |
160 | } |
160 | } |
161 | |
161 | |
162 | \@arch |
162 | \@arch |
163 | } |
163 | } |
164 | |
164 | |
165 | sub as_mapstring { |
165 | sub as_mapstring { |
166 | my ($self) = @_; |
166 | my ($self) = @_; |
167 | my $arch = $self->as_archlist; |
167 | my $arch = $self->as_archlist; |
168 | Crossfire::archlist_to_string ($arch) |
168 | Deliantra::archlist_to_string ($arch) |
169 | } |
169 | } |
170 | |
170 | |
171 | sub write_file { |
171 | sub write_file { |
172 | my ($self, $path) = @_; |
172 | my ($self, $path) = @_; |
173 | |
173 | |