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.5 by root, Sun Feb 5 00:25:33 2006 UTC vs.
Revision 1.8 by root, Sun Feb 5 02:29:13 2006 UTC

8 8
9our $VERSION = '0.1'; 9our $VERSION = '0.1';
10 10
11use strict; 11use strict;
12 12
13use base 'Exporter';
14
13use Storable; 15use Storable;
16
17our @EXPORT = qw(read_pak read_arch arch2map $ARCH TILESIZE);
14 18
15our $LIB = $ENV{CROSSFIRE_LIBDIR} 19our $LIB = $ENV{CROSSFIRE_LIBDIR}
16 or die "\$CROSSFIRE_LIBDIR must be set\n"; 20 or die "\$CROSSFIRE_LIBDIR must be set\n";
17 21
18sub T (){ 32 } 22sub TILESIZE (){ 32 }
19 23
20our $ARCH; 24our $ARCH;
21our $TILE;
22 25
23sub read_pak($;$) { 26sub read_pak($;$) {
24 my ($path, $cache) = @_; 27 my ($path, $cache) = @_;
25 28
26 eval { 29 eval {
151 } 154 }
152 } 155 }
153 156
154 $meta{width} = $mapx; 157 $meta{width} = $mapx;
155 $meta{height} = $mapy; 158 $meta{height} = $mapy;
159 $meta{map} = $map;
156 160
157 \%meta 161 \%meta
158} 162}
159 163
160sub init($) { 164sub init($) {
161 my ($cachedir) = @_; 165 my ($cachedir) = @_;
162 166
163 $ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; 167 $ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst";
164 $TILE = read_pak "$LIB/crossfire.0", "$cachedir/crossfire.0.pst";
165} 168}
166 169
167=head1 AUTHOR 170=head1 AUTHOR
168 171
169 Marc Lehmann <schmorp@schmorp.de> 172 Marc Lehmann <schmorp@schmorp.de>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines