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.6 by elmex, Sun Feb 5 00:28:09 2006 UTC vs.
Revision 1.7 by root, Sun Feb 5 01:53:59 2006 UTC

5=cut 5=cut
6 6
7package Crossfire; 7package Crossfire;
8 8
9our $VERSION = '0.1'; 9our $VERSION = '0.1';
10use base 'Exporter';
11our @EXPORT = qw(read_pak read_arch arch2map);
12 10
13use strict; 11use strict;
14 12
13use base 'Exporter';
14
15use Storable; 15use Storable;
16
17our @EXPORT = qw(read_pak read_arch arch2map $ARCH TILESIZE);
16 18
17our $LIB = $ENV{CROSSFIRE_LIBDIR} 19our $LIB = $ENV{CROSSFIRE_LIBDIR}
18 or die "\$CROSSFIRE_LIBDIR must be set\n"; 20 or die "\$CROSSFIRE_LIBDIR must be set\n";
19 21
20sub T (){ 32 } 22sub TILESIZE (){ 32 }
21 23
22our $ARCH; 24our $ARCH;
23our $TILE;
24 25
25sub read_pak($;$) { 26sub read_pak($;$) {
26 my ($path, $cache) = @_; 27 my ($path, $cache) = @_;
27 28
28 eval { 29 eval {
161 162
162sub init($) { 163sub init($) {
163 my ($cachedir) = @_; 164 my ($cachedir) = @_;
164 165
165 $ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; 166 $ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst";
166 $TILE = read_pak "$LIB/crossfire.0", "$cachedir/crossfire.0.pst";
167} 167}
168 168
169=head1 AUTHOR 169=head1 AUTHOR
170 170
171 Marc Lehmann <schmorp@schmorp.de> 171 Marc Lehmann <schmorp@schmorp.de>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines