… | |
… | |
552 | my $map_info = delete $self->{map_info} |
552 | my $map_info = delete $self->{map_info} |
553 | or return; |
553 | or return; |
554 | |
554 | |
555 | my ($hash, $x, $y, $w, $h) = @$map_info; |
555 | my ($hash, $x, $y, $w, $h) = @$map_info; |
556 | |
556 | |
557 | my $data = $self->{map}->get_rect ($x, $y, $w, $h); |
557 | my $data = Compress::LZF::compress $self->{map}->get_rect ($x, $y, $w, $h); |
|
|
558 | $self->{map_cache_new}{$hash} = \$data; |
558 | CFPlus::DB::put $self->{mapcache} => $hash => Compress::LZF::compress $data, sub { }; |
559 | CFPlus::DB::put $self->{mapcache} => $hash => $data, sub { }; |
559 | #warn sprintf "SAVEmap[%s] length %d\n", $hash, length $data;#d# |
|
|
560 | } |
560 | } |
561 | |
561 | |
562 | sub map_clear { |
562 | sub map_clear { |
563 | my ($self) = @_; |
563 | my ($self) = @_; |
564 | |
564 | |