diff --git a/Makefile.am b/Makefile.am index d91612e0e21..347d77de333 100644 --- a/Makefile.am +++ b/Makefile.am @@ -103,8 +103,8 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = config/config.rpath # latest graph-includes.pl can be found currently at http://ydirson.free.fr/soft/wesnoth/graphs/ -deps.dot: - (cd $(top_srcdir)/src && graph-includes.pl -verbose -class wesnoth -group 1 1 \ - `find -name '*.[ch]pp'|sed s,\./,,`) > $@ +wesnoth-deps.dot: + (cd $(top_srcdir) && graph-includes --verbose --class wesnoth --group 1-1 \ + `find src -name '*.[ch]pp'|sed 's,\./,,'`) > $@ %.ps: %.dot dot -Tps $< > $@ diff --git a/graphincludes/project/wesnoth.pm b/graphincludes/project/wesnoth.pm new file mode 100644 index 00000000000..96a87f2a0c3 --- /dev/null +++ b/graphincludes/project/wesnoth.pm @@ -0,0 +1,62 @@ +# This file is part of the graph-includes package +# +# (c) 2005 Yann Dirson +# Distributed under version 2 of the GNU GPL. + +package graphincludes::project::wesnoth; +use graphincludes::project::default; +our @ISA = qw(graphincludes::project::default); + +sub filelabel { + my $self = shift; + my ($file,$level) = @_; + $level = $main::minshow unless defined $level; + + if ($level == 0) { + return $file; + } elsif ($level == 1) { + $file =~ s/\.[^.]*$//; + return 'ai' if $file =~ m/^ai_(move|attack)$/; + return $file; + } elsif ($level == 2) { + if ($file =~ m!^(variable|server/variable|game_events)\.! ) { + return 'variable'; + } elsif ($file =~ m!^(multiplayer|ai).*!) { + return $1; + } elsif ($file =~ m!^(mapgen|mapgen_dialog|cavegen|map_create)\..*!) { + return 'mapcreator'; + } 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))\..*!) { + return 'core'; + } elsif ($file =~ m!^(clipboard|cursor|font|image|sdl_utils|tooltips|video)\..*!) { + return 'graphics'; + } elsif ($file =~ m!^(events|preferences|show_dialog)\..*!) { + return 'guicore'; + } elsif ($file =~ m!^(editor|server|serialization|widgets)/.*!) { + return $1; + } + } + return undef; +} + +sub defaultcolors { + my @colors; + $colors[2] = { + core => 'steelblue3', + serialization => 'steelblue1', + variable => 'slateblue1', + + mapcreator => 'gold', + + graphics => 'peachpuff', + widgets => 'linen', + guicore => 'lavenderblush', + + multiplayer => 'palegreen', + + editor => 'cyan', + server => 'pink', + }; + return @colors; +} + +1;