… | |
… | |
26 | |
26 | |
27 | our @EXPORT = qw(insert_arch_stack_layer replace_arch_stack_layer new_arch_pb |
27 | our @EXPORT = qw(insert_arch_stack_layer replace_arch_stack_layer new_arch_pb |
28 | fill_pb_from_arch arch_is_floor stack_find_floor stack_find_wall |
28 | fill_pb_from_arch arch_is_floor stack_find_floor stack_find_wall |
29 | stack_find arch_is_wall arch_is_monster add_table_widget quick_msg |
29 | stack_find arch_is_wall arch_is_monster add_table_widget quick_msg |
30 | def arch_is_exit map2abs exit_paths pseudohtml2txt arch_is_connector |
30 | def arch_is_exit map2abs exit_paths pseudohtml2txt arch_is_connector |
31 | gtk2_get_color); |
31 | gtk2_get_color devirtualize); |
32 | |
32 | |
33 | my %allocated_colors; |
33 | my %allocated_colors; |
|
|
34 | |
|
|
35 | sub devirtualize { |
|
|
36 | my ($map, $x, $y, $arch, $stack) = @_; |
|
|
37 | if ($arch->{_virtual}) { |
|
|
38 | my @head = $map->get_head ($arch); |
|
|
39 | if (@head) { |
|
|
40 | return ($head[0], $head[1], $head[3]->[$head[2]], $head[3]) |
|
|
41 | } |
|
|
42 | } |
|
|
43 | return ($x, $y, $arch, $stack) |
|
|
44 | |
|
|
45 | } |
34 | |
46 | |
35 | sub gtk2_get_color { |
47 | sub gtk2_get_color { |
36 | my ($widget, $name) = @_; |
48 | my ($widget, $name) = @_; |
37 | my $colormap = $widget->{window}->get_colormap; |
49 | my $colormap = $widget->{window}->get_colormap; |
38 | my $ret; |
50 | my $ret; |