… | |
… | |
637 | } |
637 | } |
638 | |
638 | |
639 | sub map_scroll { |
639 | sub map_scroll { |
640 | my ($self, $dx, $dy) = @_; |
640 | my ($self, $dx, $dy) = @_; |
641 | |
641 | |
642 | $self->{map}->scroll ($dx, $dy); |
642 | $self->{map_widget}->scroll ($dx, $dy); |
643 | } |
643 | } |
644 | |
644 | |
645 | sub feed_map1a { |
645 | sub feed_map1a { |
646 | my ($self, $data) = @_; |
646 | my ($self, $data) = @_; |
647 | |
647 | |
… | |
… | |
694 | my $data = $self->{map}->get_rect ($x, $y, $w, $h); |
694 | my $data = $self->{map}->get_rect ($x, $y, $w, $h); |
695 | |
695 | |
696 | if ($data ne $$rdata) { |
696 | if ($data ne $$rdata) { |
697 | $map_info->[1] = \$data; |
697 | $map_info->[1] = \$data; |
698 | my $cdata = Compress::LZF::compress $data; |
698 | my $cdata = Compress::LZF::compress $data; |
699 | warn "db_put $hash $x $y ", length $data, " > ", length $cdata; |
|
|
700 | DC::DB::put $self->{mapcache} => $hash => $cdata, sub { }; |
699 | DC::DB::put $self->{mapcache} => $hash => $cdata, sub { }; |
701 | } |
700 | } |
702 | } |
701 | } |
703 | } |
702 | } |
704 | |
703 | |
… | |
… | |
742 | |
741 | |
743 | my $map_info = $self->{map_cache}{$hash} = [$hash, \"", $x, $y, $w, $h]; |
742 | my $map_info = $self->{map_cache}{$hash} = [$hash, \"", $x, $y, $w, $h]; |
744 | |
743 | |
745 | my $cb = sub { |
744 | my $cb = sub { |
746 | $map_info->[1] = \$_[0]; |
745 | $map_info->[1] = \$_[0]; |
747 | |
|
|
748 | return if 2505 == length $_[0];#d# |
|
|
749 | warn "map_cache $hash $x $y $w $h ", length $_[0];#d# |
|
|
750 | |
746 | |
751 | my $inprogress = @{ $self->{bg_fetch} || [] }; |
747 | my $inprogress = @{ $self->{bg_fetch} || [] }; |
752 | unshift @{ $self->{bg_fetch} }, $self->{map}->set_rect ($x, $y, $_[0]); |
748 | unshift @{ $self->{bg_fetch} }, $self->{map}->set_rect ($x, $y, $_[0]); |
753 | $self->bg_fetch unless $inprogress; |
749 | $self->bg_fetch unless $inprogress; |
754 | }; |
750 | }; |
… | |
… | |
1368 | |
1364 | |
1369 | $self->update_server_info; |
1365 | $self->update_server_info; |
1370 | |
1366 | |
1371 | $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; |
1367 | $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; |
1372 | $self->send_command ("pickup $::CFG->{pickup}"); |
1368 | $self->send_command ("pickup $::CFG->{pickup}"); |
|
|
1369 | |
|
|
1370 | $self->send_exti_msg (clientlog => sprintf "OpenGL Info: %s [%s]", |
|
|
1371 | DC::OpenGL::gl_vendor, DC::OpenGL::gl_version);#d# |
1373 | } |
1372 | } |
1374 | |
1373 | |
1375 | sub lookat { |
1374 | sub lookat { |
1376 | my ($self, $x, $y) = @_; |
1375 | my ($self, $x, $y) = @_; |
1377 | |
1376 | |