ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/utils/cfutil.in
(Generate patch)

Comparing deliantra/server/utils/cfutil.in (file contents):
Revision 1.56 by root, Sun Aug 19 15:47:56 2007 UTC vs.
Revision 1.58 by root, Tue Aug 21 19:44:57 2007 UTC

21use Crossfire; 21use Crossfire;
22use Coro; 22use Coro;
23use Coro::AIO; 23use Coro::AIO;
24use Coro::Util; 24use Coro::Util;
25use POSIX (); 25use POSIX ();
26use Digest::MD5;
27use Carp; 26use Carp;
28use Coro::Channel; 27use Coro::Channel;
29use Coro::Storable; $Storable::canonical = 1; 28use Coro::Storable; $Storable::canonical = 1;
30 29
31$SIG{QUIT} = sub { Carp::cluck "QUIT" }; 30$SIG{QUIT} = sub { Carp::cluck "QUIT" };
426 facings => $facings, 425 facings => $facings,
427 frames => \@frames, 426 frames => \@frames,
428 }; 427 };
429 } 428 }
430 429
431 for my $face ($o->{face} || (), @{$anim || []}) { 430 for ($o->{face} || (), @{$anim || []}) {
432 next if $face =~ /^facings\s/; 431 next if /^facings\s/;
432
433 my $face = $_;
434 $face =~ s/\+\d+\+\d+$//; # remove tile offset coordinates
433 435
434 my $info = $FACEINFO{$face} ||= { }; 436 my $info = $FACEINFO{$face} ||= { };
435 $info->{arc} = $o; 437 $info->{arc} = $o;
436 438
437 next if $face =~ /^blank.x11$|^empty.x11$/; 439 next if $face =~ /^blank.x11$|^empty.x11$/;
521 substr $dir, 0, 1 + length $PATH, ""; 523 substr $dir, 0, 1 + length $PATH, "";
522 524
523 $RESOURCE{"$dir/$file"} = { 525 $RESOURCE{"$dir/$file"} = {
524 type => (delete $meta->{type}) || $type, 526 type => (delete $meta->{type}) || $type,
525 data => $data, 527 data => $data,
526 chksum => (Digest::MD5::md5 $data),
527 %$meta ? (meta => $meta) : (), 528 %$meta ? (meta => $meta) : (),
528 }; 529 };
529 } 530 }
530 } 531 }
531 532
681 length $v->{data64} or warn "$k: face has no png64. this will not work very well.\n"; 682 length $v->{data64} or warn "$k: face has no png64. this will not work very well.\n";
682 683
683 length $v->{data32} <= 10000 or warn "$k: face32 larger than 10000 bytes, will not work with crossfire client.\n"; 684 length $v->{data32} <= 10000 or warn "$k: face32 larger than 10000 bytes, will not work with crossfire client.\n";
684 #length $v->{data64} <= 10000 or warn "$k: face64 larger than 10000 bytes.\n"; 685 #length $v->{data64} <= 10000 or warn "$k: face64 larger than 10000 bytes.\n";
685 686
686 $v->{chksum32} = Digest::MD5::md5 $v->{data32};
687 $v->{chksum64} = Digest::MD5::md5 $v->{data64};
688
689 if (my $magicmap = $v->{magicmap}) { 687 if (my $magicmap = $v->{magicmap}) {
690 $magicmap =~ y/A-Z_\-/a-z/d; 688 $magicmap =~ y/A-Z_\-/a-z/d;
691 $v->{magicmap} = $COLOR{$magicmap}; 689 $v->{magicmap} = $COLOR{$magicmap};
692 } 690 }
693 691

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines