]> mj.ucw.cz Git - anim.git/blobdiff - goldberg.pl
Improved command-line parsing.
[anim.git] / goldberg.pl
index c555a068efee495539e9ab625aa86920ffa2e62a..417dbe6aaad00b4102077aed71408be64d3d3c37 100755 (executable)
@@ -13,7 +13,10 @@ use AA::Graph;
 use AA::Net;
 use AA::Anim;
 
-my $ui = AA::UI->new('');
+my $anim = shift @ARGV;
+my $output = shift @ARGV || "";
+
+my $ui = AA::UI->new($output);
 
 my $back = AA::Background->new('bg');
 
@@ -76,6 +79,7 @@ my $scenario;
 
 if (!@ARGV || $ARGV[0] eq "1") {
        $scenario = [
+               sub { },
                sub { flow(0, 5);       hint(1); },
                sub { up(1); },
                sub { flow(1, 5);       hint(2); },
@@ -90,6 +94,7 @@ if (!@ARGV || $ARGV[0] eq "1") {
                $e[$i]->Set('c', 5-$i);
        }
        $scenario = [
+               sub { },
                sub { flow(0, 5); hint(1); },
                sub { up(1); },
                sub { flow(1, 4); hint(2); },
@@ -136,6 +141,7 @@ if (!@ARGV || $ARGV[0] eq "1") {
                $e[$i]->Set('c', 5-$i);
        }
        $scenario = [
+               sub { },
                sub { flow(0, 5); hint(1); },
                sub { up(1); },
                sub { flow(1, 4); },