mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-23 14:46:53 +00:00
25 lines
365 B
Perl
25 lines
365 B
Perl
|
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;
|