diff options
author | root <root@frank.tg14.gathering.org> | 2014-04-14 21:59:14 +0200 |
---|---|---|
committer | root <root@frank.tg14.gathering.org> | 2014-04-14 21:59:14 +0200 |
commit | edf04a90f14ab7635dc29443020f52a4824f77fa (patch) | |
tree | 6faf6d0698661678cd4cf5c4c71d1b3da4acef0d /tools | |
parent | 39537e4fd5f3751c23b5c24048ba422a4b735f6a (diff) |
Update creativia and crew for TG14.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/make-switch-placements.pl | 46 |
1 files changed, 19 insertions, 27 deletions
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 (<STDIN>) { #$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"; |