From edf04a90f14ab7635dc29443020f52a4824f77fa Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Apr 2014 21:59:14 +0200 Subject: Update creativia and crew for TG14. --- tools/make-switch-placements.pl | 46 +++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 27 deletions(-) (limited to 'tools') diff --git a/tools/make-switch-placements.pl b/tools/make-switch-placements.pl index 7bfb889..fef1ed9 100755 --- a/tools/make-switch-placements.pl +++ b/tools/make-switch-placements.pl @@ -49,33 +49,25 @@ while () { #$yy -= 28 if $name eq "e79-1"; $yy -= 15 if $name eq "e81-1"; #$yy -= 56 if $name eq "e83-1"; - } elsif ($name =~ /^creative(\d+)$/) { - my $s = $1; - if ($s < 3) { - if ($s == 1) { - $x = 1190; - $y = 278; - } else { - $x = 1180; - $y = 230; - } - $xx = $x+35; - $yy = $y+19; - $yy += 6; - } else { - $x = 1056; - $y = 296 - 22 * ($s-3); - if ($s <= 4) { - $xx = $x+100; - } elsif ($s <= 7) { - $xx = $x+70; - } elsif ($s <= 8) { - $xx = $x+55; - } else { - $xx = $x+35; - } - $yy = $y+19; - $yy -= 5 if $s == 3; + } elsif ($name =~ /^creative(\d+)-(\d+)$/) { + my ($s, $n) = ($1, $2); + $x = 973 + 52 * $n; + $y = int(160 + 22.2 * $s); + $xx = $x + 52; + $yy = $y + 14; + + if ($s == 2 && $n == 1) { + $xx += 20; + } + } elsif ($name =~ /^crew(\d+)-(\d+)$/) { + my ($s, $n) = ($1, $2); + $x = 1023 + 45 * $n; + $y = int(329 + 20.5 * $s); + $xx = $x + 45; + $yy = $y + 14; + + if ($s == 1 && $n == 1) { + $xx += 25; } } else { die "Unknown switch: $name"; -- cgit v1.2.3