1 alias playdemo "set _demo_name \"$1\""
5 set _demo_time_increasing 0
8 alias seekdemo "_seekdemo_1_$_demo_seeking $1"
9 alias _seekdemo_1_0 "cl_cmd rpn time dup \"$1\" add dup /_demo_time exch def le /_demo_time_increasing exch def; _seekdemo_2"
10 alias _seekdemo_1_1 "cl_cmd rpn time _demo_time \"$1\" add dup /_demo_time exch def le /_demo_time_increasing exch def; _seekdemo_2"
11 alias _seekdemo_2 "_demo_seeking 1; r_render 0; snd_startnonloopingsounds 0; _seekdemo_3_$_demo_time_increasing"
12 alias _seekdemo_3_0 "playdemo \"$_demo_name\"; _seekdemo_4; defer 10 _seekdemo_9_2"
13 alias _seekdemo_3_1 "_seekdemo_7"
14 alias _seekdemo_4 "set _demo_good 0; cl_cmd rpn /_demo_good 1 def; _seekdemo_5"
15 alias _seekdemo_5 "_seekdemo_6_$_demo_good"
16 alias _seekdemo_6_0 "defer 0.02 _seekdemo_4"
17 alias _seekdemo_6_1 "defer clear; _seekdemo_7"
18 alias _seekdemo_7 "set _demo_time_step 2; cl_cmd rpn _demo_time time gt /_demo_time_step exch def; _seekdemo_8"
19 alias _seekdemo_8 "_seekdemo_9_$_demo_time_step"
20 alias _seekdemo_9_0 "slowmo 1; set _demo_seeking 0; r_render 1; snd_startnonloopingsounds 1"
21 alias _seekdemo_9_1 "cl_cmd rpn _demo_time time sub 10 mul 1 add /slowmo exch def; defer 0.001 _seekdemo_7"
22 alias _seekdemo_9_2 "slowmo 1; set _demo_seeking 0; r_render 1; snd_startnonloopingsounds 1; echo SEEK FAILED"
31 // use ,. keys to seek -5/+5 seconds
32 // use m/ keys (left/right of ,.) to seek -30/+30 seconds