updated graph-includes config and command-line for newly-released v0.4

This commit is contained in:
Yann Dirson 2005-04-18 21:05:36 +00:00
parent e18f06a9a4
commit 3950be251a
2 changed files with 51 additions and 38 deletions

View file

@ -104,7 +104,7 @@ EXTRA_DIST = config/config.rpath
# latest graph-includes.pl can be found currently at http://ydirson.free.fr/soft/wesnoth/graphs/ # latest graph-includes.pl can be found currently at http://ydirson.free.fr/soft/wesnoth/graphs/
wesnoth-deps.dot: wesnoth-deps.dot:
(cd $(top_srcdir) && graph-includes --verbose --class wesnoth --group 1-1 \ (cd $(top_srcdir) && graph-includes -v --class wesnoth --group 1-1 \
--prefixstrip src/ `find src -name '*.[ch]pp'`) > $@ --prefixstrip src/ -I src `find src -name '*.[ch]pp'`) > $@
%.ps: %.dot %.ps: %.dot
dot -Tps $< > $@ dot -Tps $< > $@

View file

@ -4,61 +4,74 @@
# Distributed under version 2 of the GNU GPL. # Distributed under version 2 of the GNU GPL.
package graphincludes::project::wesnoth; package graphincludes::project::wesnoth;
use graphincludes::project::default; use strict;
our @ISA = qw(graphincludes::project::default); use warnings;
use base qw(graphincludes::project::default);
sub filelabel { sub filelabel {
my $self = shift; my $self = shift;
my ($file,$level) = @_; my ($file,$level) = @_;
$level = $main::minshow unless defined $level; $level = $main::minshow unless defined $level;
# 0: file
$file =~ s/^$self->{PFXSTRIP}// if defined $self->{PFXSTRIP}; $file =~ s/^$self->{PFXSTRIP}// if defined $self->{PFXSTRIP};
if ($level == 0) { return $file if $level == 0;
return $file;
} elsif ($level == 1) { # 1: compilation unit
$file =~ s/\.[^.]*$//;
return 'ai' if $file =~ m/^ai_(move|attack)$/; $file =~ s/\.[^.]*$//;
return $file; $file='ai' if $file =~ m/^ai_(move|attack)$/;
} elsif ($level == 2) {
if ($file =~ m!^(variable|server/variable|game_events)\.! ) { return $file if $level == 1;
return 'variable';
} elsif ($file =~ m!^(multiplayer|ai).*!) { # 2: small groups
return $1;
} elsif ($file =~ m!^(mapgen|mapgen_dialog|cavegen|map_create)\..*!) { if ($file =~ m!^(variable|server/variable)\.! ) {
return 'mapcreator'; $file='variable';
} elsif ($file =~ m!^(array|astarnode|config|filesystem|game_config|gettext|global|language|log|map|pathfind|pathutils|race|random|scoped_resource|terrain|thread|tstring|unit|unit_types|util|variable|wassert|(.*/xcoll))\..*!) { } elsif ($file =~ m!^(multiplayer|ai).*!) {
return 'core'; $file=$1;
} elsif ($file =~ m!^(clipboard|cursor|font|image|sdl_utils|tooltips|video)\..*!) { } elsif ($file =~ m!^(mapgen|mapgen_dialog|cavegen|map_create)\..*!) {
return 'graphics'; $file='mapcreator';
} elsif ($file =~ m!^(about|builder|display|events|preferences|show_dialog|sound|theme)\..*!) { } elsif ($file =~ m!^(serialization|widgets)/.*!) {
return 'uicore'; $file=$1;
} elsif ($file =~ m!^(game|help|titlescreen)\..*!) {
return 'gameclient';
} elsif ($file =~ m!^(editor|server|serialization|widgets)/.*!) {
return $1;
} else {
return '<' . $self->filelabel($file, $level - 1) . '>';
}
} }
return undef;
return $file if $level == 2;
# 3: big groups
if ($file =~ m!^(array|astarnode|config|filesystem|game_config|game_errors|gettext|global|language|log|map|pathfind|pathutils|race|random|serialization|scoped_resource|terrain|thread|tstring|unit|unit_types|util|variable|wassert|wml_separators|(.*/xcoll))$!) {
$file='core';
} elsif ($file =~ m!^(clipboard|cursor|font|image|sdl_utils|tooltips|video)$!) {
$file='graphics';
} elsif ($file =~ m!^(about|builder|display|events|preferences|show_dialog|sound|theme|widgets)$!) {
$file='uicore';
} elsif ($file =~ m!^(ai|game|help|multiplayer|titlescreen)$!) {
$file='gameclient';
} elsif ($file =~ m!^(campaign_server|editor|server|tools)/.*!) {
$file=$1;
}
return $file;
} }
sub defaultcolors { sub defaultcolors {
my @colors; my @colors;
$colors[2] = { $colors[2] = {
core => 'steelblue3',
serialization => 'steelblue1', serialization => 'steelblue1',
variable => 'slateblue1',
mapcreator => 'gold', mapcreator => 'gold',
graphics => 'peachpuff',
widgets => 'linen', widgets => 'linen',
uicore => 'lavenderblush',
multiplayer => 'palegreen', multiplayer => 'palegreen',
};
$colors[3] = {
core => 'steelblue3',
graphics => 'peachpuff',
uicore => 'lavenderblush',
gameclient => 'yellow',
editor => 'cyan', editor => 'cyan',
server => 'pink', server => 'pink',
}; };