X-Git-Url: http://git.shiar.net/perl/schtarr.git/blobdiff_plain/f241f9a797145d1c5de59696ec4736c582ea4aed..9b1ee55eb24347c0bbd567b17852a16f68803172:/capture diff --git a/capture b/capture index 1ef47e8..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)$/ ? @@ -200,7 +205,7 @@ sub capturestats { screenshot(left=>452, top=>6, right=>639, bottom=>13) ); my ($sec, $time) = parsetimer( - screenshot(left=>586, right=>621, top=>396, bottom=>402) + screenshot(left=>587, right=>621, top=>396, bottom=>402) ); $time ne '?' or next; printf {$outstats} "%d:\t%s\t%s\t%s\t%s\t%s\n",