summaryrefslogtreecommitdiff
path: root/devtools/bin/playback_getframe.pl
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /devtools/bin/playback_getframe.pl
downloadarchived-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.pl24
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;