initial special_edge() implementation, with ignored_deps()
[deps.git] / examples / graphincludes / project / wesnoth.pm
blob5bc778e615c2eb68b0e8fecefdeabba48467beb5
1 # This file is part of the graph-includes package
3 # (c) 2005 Yann Dirson <ydirson@altern.org>
4 # Distributed under version 2 of the GNU GPL.
6 package graphincludes::project::wesnoth;
7 use graphincludes::project::default;
8 our @ISA = qw(graphincludes::project::default);
10 sub filelabel {
11 my $self = shift;
12 my ($file,$level) = @_;
13 $level = $main::minshow unless defined $level;
15 $file =~ s/^$self->{PFXSTRIP}// if defined $self->{PFXSTRIP};
17 if ($level == 0) {
18 return $file;
19 } elsif ($level == 1) {
20 $file =~ s/\.[^.]*$//;
21 return 'ai' if $file =~ m/^ai_(move|attack)$/;
22 return $file;
23 } elsif ($level == 2) {
24 if ($file =~ m!^(variable|server/variable|game_events)\.! ) {
25 return 'variable';
26 } elsif ($file =~ m!^(multiplayer|ai).*!) {
27 return $1;
28 } elsif ($file =~ m!^(mapgen|mapgen_dialog|cavegen|map_create)\..*!) {
29 return 'mapcreator';
30 } elsif ($file =~ m!^(array|astarnode|config|filesystem|game_config|gettext|global|language|log|map|pathfind|pathutils|race|random|scoped_resource|terrain|thread|unit|util|variable|wassert|(.*/xcoll))\..*!) {
31 return 'core';
32 } elsif ($file =~ m!^(clipboard|cursor|font|image|sdl_utils|tooltips|video)\..*!) {
33 return 'graphics';
34 } elsif ($file =~ m!^(events|preferences|show_dialog)\..*!) {
35 return 'guicore';
36 } elsif ($file =~ m!^(editor|server|serialization|widgets)/.*!) {
37 return $1;
40 return undef;
43 sub defaultcolors {
44 my @colors;
45 $colors[2] = {
46 core => 'steelblue3',
47 serialization => 'steelblue1',
48 variable => 'slateblue1',
50 mapcreator => 'gold',
52 graphics => 'peachpuff',
53 widgets => 'linen',
54 guicore => 'lavenderblush',
56 multiplayer => 'palegreen',
58 editor => 'cyan',
59 server => 'pink',
61 return @colors;
64 sub ignored_deps {
65 return {'src/font.cpp' => {'src/team.hpp' => 'team colors' },
66 'src/language.cpp' => {'src/preferences.hpp' => 'split out graph. stuff from preferences'},