diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /devtools/bin/playback_getframe.pl | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'devtools/bin/playback_getframe.pl')
| -rw-r--r-- | devtools/bin/playback_getframe.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/devtools/bin/playback_getframe.pl b/devtools/bin/playback_getframe.pl new file mode 100644 index 0000000..137c598 --- /dev/null +++ b/devtools/bin/playback_getframe.pl @@ -0,0 +1,24 @@ +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; |