File: default_script.goom

package info (click to toggle)
freej 0.10git20080824-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 13,504 kB
  • ctags: 19,398
  • sloc: ansic: 135,255; cpp: 32,550; sh: 9,318; perl: 2,932; asm: 2,355; yacc: 1,178; makefile: 1,119; java: 136; lex: 94; python: 16
file content (34 lines) | stat: -rw-r--r-- 615 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * specify here high-level properties of a flash.
 */

flash_occurs when (Sound.Goom_Detection > 50%) and (Sound.Sound_Speed > 14%);

max_flash = 200%;
slow_down_coef = 96%;

/*
 * Here you have the fx's state machin behaviour.
 */

(locked) ? locked--;

(not locked) and (flash_occurs) ?
{
    cur_power = Sound_Speed.Goom_Detection;
    start flashing_up;
}

(not locked) and (flashing_up) ?
{
    factor += cur_power * 2 * (speedvar / 4 + 0.95);
    if (factor > max_flash) factor = max_flash;

    (not flash_occurs) ?
    {
        locked = 200;
        stop flashing_up;
    }
}

factor *= slow_down_coef;