… | |
… | |
11 | use DC::Pod; |
11 | use DC::Pod; |
12 | use DC::Macro; |
12 | use DC::Macro; |
13 | use DC::Item; |
13 | use DC::Item; |
14 | |
14 | |
15 | use base 'Deliantra::Protocol::Base'; |
15 | use base 'Deliantra::Protocol::Base'; |
|
|
16 | |
|
|
17 | our $TEX_DIALOGUE = new_from_resource DC::Texture |
|
|
18 | "dialogue.png", minify => 1, mipmap => 1; |
|
|
19 | |
|
|
20 | our $TEX_NOFACE = new_from_resource DC::Texture |
|
|
21 | "noface.png", minify => 1, mipmap => 1; |
16 | |
22 | |
17 | sub new { |
23 | sub new { |
18 | my ($class, %arg) = @_; |
24 | my ($class, %arg) = @_; |
19 | |
25 | |
20 | my $self = $class->SUPER::new (%arg, |
26 | my $self = $class->SUPER::new (%arg, |
… | |
… | |
75 | |
81 | |
76 | $self->{map_widget}->add_command (@$_) |
82 | $self->{map_widget}->add_command (@$_) |
77 | for @cmd_help; |
83 | for @cmd_help; |
78 | |
84 | |
79 | { |
85 | { |
80 | $self->{dialogue} = my $tex = new_from_file DC::Texture |
86 | $self->{dialogue} = my $tex = $TEX_DIALOGUE; |
81 | DC::find_rcfile "dialogue.png", minify => 1, mipmap => 1; |
|
|
82 | $self->{map}->set_texture (1, @$tex{qw(name w h s t)}, @{$tex->{minified}}); |
87 | $self->{map}->set_texture (1, @$tex{qw(name w h s t)}, @{$tex->{minified}}); |
83 | } |
88 | } |
84 | |
89 | |
85 | { |
90 | { |
86 | $self->{noface} = my $tex = new_from_file DC::Texture |
91 | $self->{noface} = my $tex = $TEX_NOFACE; |
87 | DC::find_rcfile "noface.png", minify => 1, mipmap => 1; |
|
|
88 | $self->{map}->set_texture (2, @$tex{qw(name w h s t)}, @{$tex->{minified}}); |
92 | $self->{map}->set_texture (2, @$tex{qw(name w h s t)}, @{$tex->{minified}}); |
89 | } |
93 | } |
90 | |
94 | |
91 | $self->{open_container} = 0; |
95 | $self->{open_container} = 0; |
92 | |
96 | |
… | |
… | |
637 | } |
641 | } |
638 | |
642 | |
639 | sub map_scroll { |
643 | sub map_scroll { |
640 | my ($self, $dx, $dy) = @_; |
644 | my ($self, $dx, $dy) = @_; |
641 | |
645 | |
642 | $self->{map}->scroll ($dx, $dy); |
646 | $self->{map_widget}->scroll ($dx, $dy); |
643 | } |
647 | } |
644 | |
648 | |
645 | sub feed_map1a { |
649 | sub feed_map1a { |
646 | my ($self, $data) = @_; |
650 | my ($self, $data) = @_; |
647 | |
651 | |
… | |
… | |
1364 | |
1368 | |
1365 | $self->update_server_info; |
1369 | $self->update_server_info; |
1366 | |
1370 | |
1367 | $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; |
1371 | $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; |
1368 | $self->send_command ("pickup $::CFG->{pickup}"); |
1372 | $self->send_command ("pickup $::CFG->{pickup}"); |
|
|
1373 | |
|
|
1374 | $self->send_exti_msg (clientlog => sprintf "OpenGL Info: %s [%s]", |
|
|
1375 | DC::OpenGL::gl_vendor, DC::OpenGL::gl_version);#d# |
1369 | } |
1376 | } |
1370 | |
1377 | |
1371 | sub lookat { |
1378 | sub lookat { |
1372 | my ($self, $x, $y) = @_; |
1379 | my ($self, $x, $y) = @_; |
1373 | |
1380 | |