diff options
| author | Wiimm <wiimm@wiimm.de> | 2022-05-13 19:22:53 +0200 |
|---|---|---|
| committer | Wiimm <wiimm@wiimm.de> | 2022-05-13 19:22:53 +0200 |
| commit | 59090f08e8ff7c9db4912ab1dbae391eb5a2c887 (patch) | |
| tree | 67f91c7c5c011292704b106bc7b4dc674cf13463 /project/scripts/kcl/remove-sound-triggers.txt | |
| parent | 568365f5bdd4dc71a156ca963d89ac002f405a34 (diff) | |
SZS v2.27a
Diffstat (limited to 'project/scripts/kcl/remove-sound-triggers.txt')
| -rw-r--r-- | project/scripts/kcl/remove-sound-triggers.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/project/scripts/kcl/remove-sound-triggers.txt b/project/scripts/kcl/remove-sound-triggers.txt new file mode 100644 index 0000000..c6f5ec4 --- /dev/null +++ b/project/scripts/kcl/remove-sound-triggers.txt @@ -0,0 +1,25 @@ +############################### +### (c) Wiimm, 2021-09-24 ### +############################### + +# Setup +@def start = mSec() # start time, for the status line +@def rm_count = 0 # remove counter + +# Define a function to test the KCL flag for sound trigger +@function isSound # flag + @pdef t = $1 & 0x1f + @return t == 0x18 +@endfunction + +# Main loop: Iterate through all triangles +@for t=0;tri$n()-1 + @if isSound(tri$flag(t)) + @def status = tri$remove(t) + @def rm_count = rm_count+1 + @endif +@endfor + +# Print a little status line +@echo " - " rm_count " of " tri$n() " triangles removed in " (mSec()-start) " msec." + |
