From: Shiar Date: Fri, 8 Feb 2008 18:50:00 +0000 (+0100) Subject: capture: put text filter colors on seperate lines X-Git-Url: http://git.shiar.net/perl/schtarr.git/commitdiff_plain/9b1ee55eb24347c0bbd567b17852a16f68803172 capture: put text filter colors on seperate lines Valid colors to filter_color() put on seperate lines to allow source comments and easy extension on future encounters. --- diff --git a/capture b/capture index 722e77f..828f1fd 100755 --- a/capture +++ b/capture @@ -164,7 +164,10 @@ sub parsestats { my $input = shift; # (452,6)-(639,13) $input->write(file => sprintf "tests%05d.png", $i) or warn $input->errstr if DEBUG; - my $stats = filter_color($input, "\020\377\030", "\317\030\030", "\310\030\030"); # ?/10FF18 | C81818/CF1818 + my $stats = filter_color($input, + "\020\377\030", "\317\030\030", # CF1818/C81818 + "\310\030\030", # ?/10FF18 + ); my $min = getchars($stats, \%digitgreen, 7, 0, 39); my $gas = getchars($stats, \%digitgreen, 7, 68, 107); my $unit = getchars($stats, \%digitgreen, 7, 136, 181); @@ -177,7 +180,9 @@ sub parsetimer { my $input = shift; # (587,396)-(621,402) $input->write(file => sprintf "testt%05d.png", $i) or warn $input->errstr if DEBUG; - my $play = filter_color($input, "\276\272\357"); # 190, 186, 239 + my $play = filter_color($input, + "\276\272\357", # BEBAEF + ); my $time = getchars($play, \%digittime, 6, 0, 33); return ( $time =~ /^(?:(\d):)?(\d\d):(\d\d)$/ ?