You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
365 B
25 lines
365 B
![]()
4 years ago
|
if( scalar( @ARGV ) != 2 )
|
||
|
{
|
||
|
die "Usage: playback_getframe.pl framenum blah.txt\n";
|
||
|
}
|
||
|
|
||
|
# getframe.pl framenum blah.txt
|
||
|
$line = 0;
|
||
|
$desiredFrame = shift;
|
||
|
$frame = 1;
|
||
|
open INPUT, shift || die;
|
||
|
while( <INPUT> )
|
||
|
{
|
||
|
$line++;
|
||
|
if( /Dx8Present/ )
|
||
|
{
|
||
|
$frame++;
|
||
|
}
|
||
|
if( $frame == $desiredFrame )
|
||
|
{
|
||
|
print "$line: $_";
|
||
|
}
|
||
|
last if $frame > $desiredFrame;
|
||
|
}
|
||
|
close INPUT;
|