… | |
… | |
25 | our $LIB = $ENV{CROSSFIRE_LIBDIR} |
25 | our $LIB = $ENV{CROSSFIRE_LIBDIR} |
26 | or Carp::croak "\$CROSSFIRE_LIBDIR must be set\n"; |
26 | or Carp::croak "\$CROSSFIRE_LIBDIR must be set\n"; |
27 | |
27 | |
28 | sub TILESIZE (){ 32 } |
28 | sub TILESIZE (){ 32 } |
29 | |
29 | |
30 | our $CACHEDIR; |
30 | our $VARDIR; |
31 | our %ARCH; |
31 | our %ARCH; |
32 | our %FACE; |
32 | our %FACE; |
33 | our $TILE; |
33 | our $TILE; |
34 | |
34 | |
35 | our %FIELD_MULTILINE = ( |
35 | our %FIELD_MULTILINE = ( |
… | |
… | |
206 | } |
206 | } |
207 | } |
207 | } |
208 | |
208 | |
209 | undef $parse_block; # work around bug in perl not freeing $fh etc. |
209 | undef $parse_block; # work around bug in perl not freeing $fh etc. |
210 | |
210 | |
|
|
211 | warn "hoi\n";#d# |
211 | Storable::nstore (\%arc, $cache) |
212 | Storable::nstore (\%arc, $cache) |
212 | if defined $cache; |
213 | if defined $cache; |
|
|
214 | warn "hox\n";#d# |
213 | |
215 | |
214 | \%arc |
216 | \%arc |
215 | } |
217 | } |
216 | } |
218 | } |
217 | |
219 | |
… | |
… | |
381 | |
383 | |
382 | mkdir $cachedir, 0777; |
384 | mkdir $cachedir, 0777; |
383 | *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; |
385 | *ARCH = read_arch "$LIB/archetypes", "$cachedir/archetypes.pst"; |
384 | } |
386 | } |
385 | |
387 | |
386 | $CACHEDIR ||= $ENV{HOME} ? "$ENV{HOME}/crossfire" : File::Spec->tmpdir; |
388 | $VARDIR ||= $ENV{HOME} ? "$ENV{HOME}/crossfire" : File::Spec->tmpdir; |
387 | |
389 | |
388 | init $CACHEDIR; |
390 | init $VARDIR; |
389 | |
391 | |
390 | =head1 AUTHOR |
392 | =head1 AUTHOR |
391 | |
393 | |
392 | Marc Lehmann <schmorp@schmorp.de> |
394 | Marc Lehmann <schmorp@schmorp.de> |
393 | http://home.schmorp.de/ |
395 | http://home.schmorp.de/ |