--- deliantra/Deliantra-Client/DC/Protocol.pm 2008/05/20 02:47:21 1.197 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2008/09/09 10:27:26 1.202 @@ -14,6 +14,12 @@ use base 'Deliantra::Protocol::Base'; +our $TEX_DIALOGUE = new_from_resource DC::Texture + "dialogue.png", minify => 1, mipmap => 1; + +our $TEX_NOFACE = new_from_resource DC::Texture + "noface.png", minify => 1, mipmap => 1; + sub new { my ($class, %arg) = @_; @@ -77,14 +83,12 @@ for @cmd_help; { - $self->{dialogue} = my $tex = new_from_file DC::Texture - DC::find_rcfile "dialogue.png", minify => 1, mipmap => 1; + $self->{dialogue} = my $tex = $TEX_DIALOGUE; $self->{map}->set_texture (1, @$tex{qw(name w h s t)}, @{$tex->{minified}}); } { - $self->{noface} = my $tex = new_from_file DC::Texture - DC::find_rcfile "noface.png", minify => 1, mipmap => 1; + $self->{noface} = my $tex = $TEX_NOFACE; $self->{map}->set_texture (2, @$tex{qw(name w h s t)}, @{$tex->{minified}}); } @@ -639,7 +643,7 @@ sub map_scroll { my ($self, $dx, $dy) = @_; - $self->{map}->scroll ($dx, $dy); + $self->{map_widget}->scroll ($dx, $dy); } sub feed_map1a { @@ -696,7 +700,6 @@ if ($data ne $$rdata) { $map_info->[1] = \$data; my $cdata = Compress::LZF::compress $data; - warn "db_put $hash $x $y ", length $data, " > ", length $cdata; DC::DB::put $self->{mapcache} => $hash => $cdata, sub { }; } } @@ -745,9 +748,6 @@ my $cb = sub { $map_info->[1] = \$_[0]; - return if 2505 == length $_[0];#d# - warn "map_cache $hash $x $y $w $h ", length $_[0];#d# - my $inprogress = @{ $self->{bg_fetch} || [] }; unshift @{ $self->{bg_fetch} }, $self->{map}->set_rect ($x, $y, $_[0]); $self->bg_fetch unless $inprogress; @@ -1098,21 +1098,19 @@ # no longer neecssary with TRT servers #$text =~ s/(?<=\S)\n(?=\w)/ /g; - for (split /\n/, $text) { - ::message ({ - fg => $fg, - markup => $_, - type => $type, - extra => [@extra], - color_flags => $color, #d# ugly, kill - }); + ::message ({ + fg => $fg, + markup => $text, + type => $type, + extra => [@extra], + color_flags => $color, #d# ugly, kill + }); - $color &= ~NDI_CLEAR; # only clear once for multiline messages - # actually, this is an ugly design. _we_ should control the channels, - # not some random other widget, as the channels are clearly protocol-specific. - # then we could also react to flags such as CLEAR without resorting to - # hacks such as color_flags, above. - } +# $color &= ~NDI_CLEAR; # only clear once for multiline messages +# # actually, this is an ugly design. _we_ should control the channels, +# # not some random other widget, as the channels are clearly protocol-specific. +# # then we could also react to flags such as CLEAR without resorting to +# # hacks such as color_flags, above. $self->{statusbox}->add ($text, group => $text, @@ -1370,6 +1368,9 @@ $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; $self->send_command ("pickup $::CFG->{pickup}"); + + $self->send_exti_msg (clientlog => sprintf "OpenGL Info: %s [%s]", + DC::OpenGL::gl_vendor, DC::OpenGL::gl_version);#d# } sub lookat {