 
// Note If missing folder (font, palette...) => crash

// flag xxx is modified but never checked is annoying

// Not clear how things are grouped:
//    some_check ? act: scene_1
//    act: scene_2
// Will go to scene_2

// act: (good) vs act : (bad because of space)

// Error reporting isn't always great: pointing to start of a section instead of where the error is ( "text" near at the end of a section)

// include or something

// I don't understand why but it seems that flags sometimes dont't work the first time they are used (or maybe just checked ?) And break some things like item don't display. NOTE this is because of not knowing when a condition ends.

// Condition like a ? b ? c d e ? act: set something to express ( a && b && ( c || d || e ) )

// d1_6 ? d2_3 ? d3_7 ? d4_1 ? d5_3 ? d6_2 ? act: set valid_altitude
// confirm_pressed ? target_altitude ? valid_altitude ? act: set goal_altitude_ok
// confirm_pressed ? target_altitude ? not valid_altitude ? act: clear goal_altitude_ok => this doesn't seem to work

// uni05_63.ttf font doesn't work yanspin says it's not a pixel font (size detection failed) => makes yarnspin crash

// Smaller font size to be able to have more than 4 options

// Why the need of act before set/clear

// OR for not flags doesn't seem to work

// Is it that you can't use txt once you start to add something else like chr opt...

// several time I try to make an option with different actions instead of different actions.
// opt: a
      // flag ? act: b
      // not flag ? act: c

// flag ? opt: a
      // act: b
// not flag ? opt: a
      // act: c

// In a character setting the name twice instead of name followed by short doesn't display an error, but doesn't work (no character is displayed)

// Tilde workaround

// Being able to output text without new line so that we can create phrases

// 192 * 128

// Why are faces 90 * 90 ?

// Specify resolution in doc

// Can't have number in character ids

// Can't have act: exit in dialog

// Can't have condition in dialog (silently fails)

title: YarnShip
author: [REDACTED]
start: init
version: 1.0
display_filters: none, pc, tv
alone_text:
nothing_text:
flags: AGSL_on, target_checklist
palette: palette.tga

//font_description: fonts\Berkelium64.ttf
//font_options: fonts\Sierra-SCI-Menu-Font.ttf
//// font_options: fonts\Volter__28Goldfish_29.ttf
//font_characters: fonts\Berkelium64.ttf
//font_items: fonts\Berkelium64.ttf
//font_name: fonts\Sierra-SCI-Menu-Font.ttf

=== theforththwall ===
name: The 4th wall
short: the4thwall

=== comms ===
name: comms
short: comms
face: comms.tga

=== AGSL ===
name: Automatic Guidance System Light
short: [AGSL]

=== GBLL ===
name: Gimbal Lock Light
short: [GBLL]

=== LCKL ===
name: Controls Lock Light
short: [LCKL]

=== init ===
scr: logo.tga
act: set AGSL_on
act: set control_lock
act: set LCKL_on
act: set f6
act: set o2
act: set d1_0
act: set d2_0
act: set d3_0
act: set d4_0
act: set d5_0
act: set d6_0

act: diag_001

=== cockpit_001 ===
img: cockpit.tga
txt: Everything went smooth. Until the AGSL.


act: clear process

o1 ? roll_left_pressed ? act: set process
    process ? act: clear roll_left_pressed
    process ? act: clear o1
    process ? act: set o3
act: clear process

o1 ? roll_right_pressed ? act: set process
    process ? act: clear roll_right_pressed
    process ? act: clear o1
    process ? act: set o4
act: clear process

o2 ? roll_left_pressed ? act: set process
    process ? act: clear roll_left_pressed
    process ? act: clear o2
    process ? act: set o4
act: clear process

o2 ? roll_right_pressed ? act: set process
    process ? act: clear roll_right_pressed
    process ? act: clear o2
    process ? act: set o3
act: clear process

o3 ? roll_left_pressed ? act: set process
    process ? act: clear roll_left_pressed
    process ? act: clear o3
    process ? act: set o2
act: clear process

o3 ? roll_right_pressed ? act: set process
    process ? act: clear roll_right_pressed
    process ? act: clear o3
    process ? act: set o1
act: clear process

o4 ? roll_left_pressed ? act: set process
    process ? act: clear roll_left_pressed
    process ? act: clear o4
    process ? act: set o1
act: clear process

o4 ? roll_right_pressed ? act: set process
    process ? act: clear roll_right_pressed
    process ? act: clear o4
    process ? act: set o2
act: clear process

// f1

f1 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f1
    process ? act: clear o1
    process ? act: set f15
    process ? act: set o1
act: clear process

f1 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f1
    process ? act: clear o1
    process ? act: set f18
    process ? act: set o1
act: clear process

f1 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f1
    process ? act: clear o1
    process ? act: set f8
    process ? act: set o1
act: clear process

f1 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f1
    process ? act: clear o1
    process ? act: set f2
    process ? act: set o1
act: clear process

f1 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f1
    process ? act: clear o2
    process ? act: set f18
    process ? act: set o2
act: clear process

f1 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f1
    process ? act: clear o2
    process ? act: set f15
    process ? act: set o2
act: clear process

f1 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f1
    process ? act: clear o2
    process ? act: set f2
    process ? act: set o2
act: clear process

f1 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f1
    process ? act: clear o2
    process ? act: set f8
    process ? act: set o2
act: clear process

f1 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f1
    process ? act: clear o3
    process ? act: set f8
    process ? act: set o3
act: clear process

f1 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f1
    process ? act: clear o3
    process ? act: set f2
    process ? act: set o3
act: clear process

f1 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f1
    process ? act: clear o3
    process ? act: set f18
    process ? act: set o3
act: clear process

f1 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f1
    process ? act: clear o3
    process ? act: set f15
    process ? act: set o3
act: clear process

f1 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f1
    process ? act: clear o4
    process ? act: set f2
    process ? act: set o4
act: clear process

f1 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f1
    process ? act: clear o4
    process ? act: set f8
    process ? act: set o4
act: clear process

f1 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f1
    process ? act: clear o4
    process ? act: set f15
    process ? act: set o4
act: clear process

f1 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f1
    process ? act: clear o4
    process ? act: set f18
    process ? act: set o4
act: clear process


// f2

f2 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f2 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f2 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f2
    process ? act: clear o1
    process ? act: set f1
    process ? act: set o1
act: clear process

f2 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f2
    process ? act: clear o1
    process ? act: set f3
    process ? act: set o1
act: clear process

f2 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f2 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f2 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f2
    process ? act: clear o2
    process ? act: set f3
    process ? act: set o2
act: clear process

f2 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f2
    process ? act: clear o2
    process ? act: set f1
    process ? act: set o2
act: clear process

f2 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f2
    process ? act: clear o3
    process ? act: set f1
    process ? act: set o3
act: clear process

f2 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f2
    process ? act: clear o3
    process ? act: set f3
    process ? act: set o3
act: clear process

f2 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f2 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f2 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f2
    process ? act: clear o4
    process ? act: set f3
    process ? act: set o4
act: clear process

f2 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f2
    process ? act: clear o4
    process ? act: set f1
    process ? act: set o4
act: clear process

f2 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f2 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f3

f3 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f3
    process ? act: clear o1
    process ? act: set f10
    process ? act: set o3
act: clear process

f3 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f3
    process ? act: clear o1
    process ? act: set f11
    process ? act: set o3
act: clear process

f3 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f3
    process ? act: clear o1
    process ? act: set f2
    process ? act: set o1
act: clear process

f3 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f3
    process ? act: clear o1
    process ? act: set f4
    process ? act: set o1
act: clear process

f3 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f3
    process ? act: clear o2
    process ? act: set f11
    process ? act: set o4
act: clear process

f3 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f3
    process ? act: clear o2
    process ? act: set f10
    process ? act: set o4
act: clear process

f3 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f3
    process ? act: clear o2
    process ? act: set f4
    process ? act: set o2
act: clear process

f3 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f3
    process ? act: clear o2
    process ? act: set f2
    process ? act: set o2
act: clear process

f3 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f3
    process ? act: clear o3
    process ? act: set f2
    process ? act: set o3
act: clear process

f3 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f3
    process ? act: clear o3
    process ? act: set f4
    process ? act: set o3
act: clear process

f3 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f3
    process ? act: clear o3
    process ? act: set f11
    process ? act: set o2
act: clear process

f3 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f3
    process ? act: clear o3
    process ? act: set f10
    process ? act: set o2
act: clear process

f3 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f3
    process ? act: clear o4
    process ? act: set f4
    process ? act: set o4
act: clear process

f3 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f3
    process ? act: clear o4
    process ? act: set f2
    process ? act: set o4
act: clear process

f3 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f3
    process ? act: clear o4
    process ? act: set f10
    process ? act: set o1
act: clear process

f3 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f3
    process ? act: clear o4
    process ? act: set f11
    process ? act: set o1
act: clear process


// f4

f4 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f4 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f4 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f4
    process ? act: clear o1
    process ? act: set f3
    process ? act: set o1
act: clear process

f4 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f4
    process ? act: clear o1
    process ? act: set f5
    process ? act: set o1
act: clear process

f4 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f4 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f4 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f4
    process ? act: clear o2
    process ? act: set f5
    process ? act: set o2
act: clear process

f4 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f4
    process ? act: clear o2
    process ? act: set f3
    process ? act: set o2
act: clear process

f4 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f4
    process ? act: clear o3
    process ? act: set f3
    process ? act: set o3
act: clear process

f4 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f4
    process ? act: clear o3
    process ? act: set f5
    process ? act: set o3
act: clear process

f4 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f4 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f4 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f4
    process ? act: clear o4
    process ? act: set f5
    process ? act: set o4
act: clear process

f4 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f4
    process ? act: clear o4
    process ? act: set f3
    process ? act: set o4
act: clear process

f4 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f4 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f5

f5 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f5
    process ? act: clear o1
    process ? act: set f16
    process ? act: set o2
act: clear process

f5 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f5
    process ? act: clear o1
    process ? act: set f17
    process ? act: set o2
act: clear process

f5 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f5
    process ? act: clear o1
    process ? act: set f4
    process ? act: set o1
act: clear process

f5 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f5
    process ? act: clear o1
    process ? act: set f6
    process ? act: set o1
act: clear process

f5 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f5
    process ? act: clear o2
    process ? act: set f17
    process ? act: set o1
act: clear process

f5 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f5
    process ? act: clear o2
    process ? act: set f16
    process ? act: set o1
act: clear process

f5 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f5
    process ? act: clear o2
    process ? act: set f6
    process ? act: set o2
act: clear process

f5 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f5
    process ? act: clear o2
    process ? act: set f4
    process ? act: set o2
act: clear process

f5 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f5
    process ? act: clear o3
    process ? act: set f4
    process ? act: set o3
act: clear process

f5 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f5
    process ? act: clear o3
    process ? act: set f6
    process ? act: set o3
act: clear process

f5 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f5
    process ? act: clear o3
    process ? act: set f17
    process ? act: set o4
act: clear process

f5 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f5
    process ? act: clear o3
    process ? act: set f16
    process ? act: set o4
act: clear process

f5 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f5
    process ? act: clear o4
    process ? act: set f6
    process ? act: set o4
act: clear process

f5 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f5
    process ? act: clear o4
    process ? act: set f4
    process ? act: set o4
act: clear process

f5 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f5
    process ? act: clear o4
    process ? act: set f16
    process ? act: set o3
act: clear process

f5 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f5
    process ? act: clear o4
    process ? act: set f17
    process ? act: set o3
act: clear process


// f6

f6 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f6 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f6 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f6
    process ? act: clear o1
    process ? act: set f5
    process ? act: set o1
act: clear process

f6 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f6
    process ? act: clear o1
    process ? act: set f7
    process ? act: set o1
act: clear process

f6 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f6 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f6 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f6
    process ? act: clear o2
    process ? act: set f7
    process ? act: set o2
act: clear process

f6 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f6
    process ? act: clear o2
    process ? act: set f5
    process ? act: set o2
act: clear process

f6 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f6
    process ? act: clear o3
    process ? act: set f5
    process ? act: set o3
act: clear process

f6 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f6
    process ? act: clear o3
    process ? act: set f7
    process ? act: set o3
act: clear process

f6 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f6 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f6 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f6
    process ? act: clear o4
    process ? act: set f7
    process ? act: set o4
act: clear process

f6 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f6
    process ? act: clear o4
    process ? act: set f5
    process ? act: set o4
act: clear process

f6 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f6 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f7

f7 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f7
    process ? act: clear o1
    process ? act: set f14
    process ? act: set o4
act: clear process

f7 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f7
    process ? act: clear o1
    process ? act: set f13
    process ? act: set o4
act: clear process

f7 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f7
    process ? act: clear o1
    process ? act: set f6
    process ? act: set o1
act: clear process

f7 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f7
    process ? act: clear o1
    process ? act: set f8
    process ? act: set o1
act: clear process

f7 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f7
    process ? act: clear o2
    process ? act: set f13
    process ? act: set o3
act: clear process

f7 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f7
    process ? act: clear o2
    process ? act: set f14
    process ? act: set o3
act: clear process

f7 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f7
    process ? act: clear o2
    process ? act: set f8
    process ? act: set o2
act: clear process

f7 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f7
    process ? act: clear o2
    process ? act: set f6
    process ? act: set o2
act: clear process

f7 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f7
    process ? act: clear o3
    process ? act: set f6
    process ? act: set o3
act: clear process

f7 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f7
    process ? act: clear o3
    process ? act: set f8
    process ? act: set o3
act: clear process

f7 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f7
    process ? act: clear o3
    process ? act: set f13
    process ? act: set o1
act: clear process

f7 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f7
    process ? act: clear o3
    process ? act: set f14
    process ? act: set o1
act: clear process

f7 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f7
    process ? act: clear o4
    process ? act: set f8
    process ? act: set o4
act: clear process

f7 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f7
    process ? act: clear o4
    process ? act: set f6
    process ? act: set o4
act: clear process

f7 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f7
    process ? act: clear o4
    process ? act: set f14
    process ? act: set o2
act: clear process

f7 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f7
    process ? act: clear o4
    process ? act: set f13
    process ? act: set o2
act: clear process


// f8

f8 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f8 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f8 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f8
    process ? act: clear o1
    process ? act: set f7
    process ? act: set o1
act: clear process

f8 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f8
    process ? act: clear o1
    process ? act: set f1
    process ? act: set o1
act: clear process

f8 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f8 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f8 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f8
    process ? act: clear o2
    process ? act: set f1
    process ? act: set o2
act: clear process

f8 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f8
    process ? act: clear o2
    process ? act: set f7
    process ? act: set o2
act: clear process

f8 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f8
    process ? act: clear o3
    process ? act: set f7
    process ? act: set o3
act: clear process

f8 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f8
    process ? act: clear o3
    process ? act: set f1
    process ? act: set o3
act: clear process

f8 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f8 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f8 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f8
    process ? act: clear o4
    process ? act: set f1
    process ? act: set o4
act: clear process

f8 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f8
    process ? act: clear o4
    process ? act: set f7
    process ? act: set o4
act: clear process

f8 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f8 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f9

f9 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f9
    process ? act: clear o1
    process ? act: set f16
    process ? act: set o1
act: clear process

f9 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f9
    process ? act: clear o1
    process ? act: set f15
    process ? act: set o1
act: clear process

f9 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f9
    process ? act: clear o1
    process ? act: set f14
    process ? act: set o1
act: clear process

f9 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f9
    process ? act: clear o1
    process ? act: set f10
    process ? act: set o1
act: clear process

f9 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f9
    process ? act: clear o2
    process ? act: set f15
    process ? act: set o2
act: clear process

f9 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f9
    process ? act: clear o2
    process ? act: set f15
    process ? act: set o2
act: clear process

f9 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f9
    process ? act: clear o2
    process ? act: set f10
    process ? act: set o2
act: clear process

f9 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f9
    process ? act: clear o2
    process ? act: set f14
    process ? act: set o2
act: clear process

f9 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f9
    process ? act: clear o3
    process ? act: set f14
    process ? act: set o3
act: clear process

f9 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f9
    process ? act: clear o3
    process ? act: set f10
    process ? act: set o3
act: clear process

f9 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f9
    process ? act: clear o3
    process ? act: set f15
    process ? act: set o3
act: clear process

f9 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f9
    process ? act: clear o3
    process ? act: set f16
    process ? act: set o3
act: clear process

f9 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f9
    process ? act: clear o4
    process ? act: set f10
    process ? act: set o4
act: clear process

f9 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f9
    process ? act: clear o4
    process ? act: set f14
    process ? act: set o4
act: clear process

f9 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f9
    process ? act: clear o4
    process ? act: set f16
    process ? act: set o4
act: clear process

f9 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f9
    process ? act: clear o4
    process ? act: set f15
    process ? act: set o4
act: clear process


// f10

f10 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f10 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f10 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f10
    process ? act: clear o1
    process ? act: set f9
    process ? act: set o1
act: clear process

f10 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f10
    process ? act: clear o1
    process ? act: set f3
    process ? act: set o4
act: clear process

f10 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f10 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f10 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f10
    process ? act: clear o2
    process ? act: set f3
    process ? act: set o3
act: clear process

f10 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f10
    process ? act: clear o2
    process ? act: set f9
    process ? act: set o2
act: clear process

f10 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f10
    process ? act: clear o3
    process ? act: set f9
    process ? act: set o3
act: clear process

f10 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f10
    process ? act: clear o3
    process ? act: set f3
    process ? act: set o1
act: clear process

f10 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f10 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f10 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f10
    process ? act: clear o4
    process ? act: set f3
    process ? act: set o2
act: clear process

f10 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f10
    process ? act: clear o4
    process ? act: set f9
    process ? act: set o4
act: clear process

f10 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f10 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f11

f11 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f11 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f11 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f11
    process ? act: clear o1
    process ? act: set f3
    process ? act: set o4
act: clear process

f11 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f11
    process ? act: clear o1
    process ? act: set f12
    process ? act: set o1
act: clear process

f11 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f11 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f11 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f11
    process ? act: clear o2
    process ? act: set f12
    process ? act: set o2
act: clear process

f11 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f11
    process ? act: clear o2
    process ? act: set f3
    process ? act: set o3
act: clear process

f11 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f11
    process ? act: clear o3
    process ? act: set f3
    process ? act: set o1
act: clear process

f11 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f11
    process ? act: clear o3
    process ? act: set f12
    process ? act: set o3
act: clear process

f11 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f11 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f11 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f11
    process ? act: clear o4
    process ? act: set f1
    process ? act: set o4
act: clear process

f11 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f11
    process ? act: clear o4
    process ? act: set f7
    process ? act: set o4
act: clear process

f11 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f11 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f12

f12 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f12
    process ? act: clear o1
    process ? act: set f17
    process ? act: set o2
act: clear process

f12 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f12
    process ? act: clear o1
    process ? act: set f18
    process ? act: set o2
act: clear process

f12 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f12
    process ? act: clear o1
    process ? act: set f11
    process ? act: set o1
act: clear process

f12 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f12
    process ? act: clear o1
    process ? act: set f13
    process ? act: set o1
act: clear process

f12 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f12
    process ? act: clear o2
    process ? act: set f18
    process ? act: set o1
act: clear process

f12 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f12
    process ? act: clear o2
    process ? act: set f17
    process ? act: set o1
act: clear process

f12 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f12
    process ? act: clear o2
    process ? act: set f13
    process ? act: set o2
act: clear process

f12 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f12
    process ? act: clear o2
    process ? act: set f11
    process ? act: set o2
act: clear process

f12 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f12
    process ? act: clear o3
    process ? act: set f11
    process ? act: set o3
act: clear process

f12 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f12
    process ? act: clear o3
    process ? act: set f13
    process ? act: set o3
act: clear process

f12 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f12
    process ? act: clear o3
    process ? act: set f18
    process ? act: set o4
act: clear process

f12 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f12
    process ? act: clear o3
    process ? act: set f17
    process ? act: set o4
act: clear process

f12 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f12
    process ? act: clear o4
    process ? act: set f13
    process ? act: set o4
act: clear process

f12 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f12
    process ? act: clear o4
    process ? act: set f11
    process ? act: set o4
act: clear process

f12 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f12
    process ? act: clear o4
    process ? act: set f17
    process ? act: set o3
act: clear process

f12 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f12
    process ? act: clear o4
    process ? act: set f18
    process ? act: set o3
act: clear process


// f13

f13 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f13 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f13 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f13
    process ? act: clear o1
    process ? act: set f12
    process ? act: set o1
act: clear process

f13 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f13
    process ? act: clear o1
    process ? act: set f7
    process ? act: set o3
act: clear process

f13 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f13 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f13 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f13
    process ? act: clear o2
    process ? act: set f7
    process ? act: set o4
act: clear process

f13 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f13
    process ? act: clear o2
    process ? act: set f12
    process ? act: set o2
act: clear process

f13 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f13
    process ? act: clear o3
    process ? act: set f12
    process ? act: set o3
act: clear process

f13 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f13
    process ? act: clear o3
    process ? act: set f7
    process ? act: set o2
act: clear process

f13 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f13 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f13 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f13
    process ? act: clear o4
    process ? act: set f7
    process ? act: set o1
act: clear process

f13 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f13
    process ? act: clear o4
    process ? act: set f12
    process ? act: set o4
act: clear process

f13 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f13 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f14

f14 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f14 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f14 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f14
    process ? act: clear o1
    process ? act: set f7
    process ? act: set o3
act: clear process

f14 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f14
    process ? act: clear o1
    process ? act: set f9
    process ? act: set o1
act: clear process

f14 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f14 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f14 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f14
    process ? act: clear o2
    process ? act: set f9
    process ? act: set o2
act: clear process

f14 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f14
    process ? act: clear o2
    process ? act: set f7
    process ? act: set o4
act: clear process

f14 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f14
    process ? act: clear o3
    process ? act: set f7
    process ? act: set o2
act: clear process

f14 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f14
    process ? act: clear o3
    process ? act: set f9
    process ? act: set o3
act: clear process

f14 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f14 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f14 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f14
    process ? act: clear o4
    process ? act: set f9
    process ? act: set o4
act: clear process

f14 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f14
    process ? act: clear o4
    process ? act: set f7
    process ? act: set o1
act: clear process

f14 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f14 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process


// f15

f15 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f15
    process ? act: clear o1
    process ? act: set f9
    process ? act: set o1
act: clear process

f15 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f15
    process ? act: clear o1
    process ? act: set f1
    process ? act: set o1
act: clear process

f15 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f15
    process ? act: clear o2
    process ? act: set f1
    process ? act: set o2
act: clear process

f15 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f15
    process ? act: clear o2
    process ? act: set f9
    process ? act: set o2
act: clear process

f15 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f15
    process ? act: clear o3
    process ? act: set f1
    process ? act: set o3
act: clear process

f15 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f15
    process ? act: clear o3
    process ? act: set f9
    process ? act: set o3
act: clear process

f15 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f15 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f15
    process ? act: clear o4
    process ? act: set f9
    process ? act: set o4
act: clear process

f15 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f15
    process ? act: clear o4
    process ? act: set f1
    process ? act: set o4
act: clear process


// f16

f16 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f16
    process ? act: clear o1
    process ? act: set f5
    process ? act: set o2
act: clear process

f16 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f16
    process ? act: clear o1
    process ? act: set f9
    process ? act: set o1
act: clear process

f16 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f16
    process ? act: clear o2
    process ? act: set f9
    process ? act: set o2
act: clear process

f16 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f16
    process ? act: clear o2
    process ? act: set f5
    process ? act: set o1
act: clear process

f16 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f16
    process ? act: clear o3
    process ? act: set f9
    process ? act: set o3
act: clear process

f16 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f16
    process ? act: clear o3
    process ? act: set f5
    process ? act: set o4
act: clear process

f16 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f16 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f16
    process ? act: clear o4
    process ? act: set f5
    process ? act: set o3
act: clear process

f16 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f16
    process ? act: clear o4
    process ? act: set f9
    process ? act: set o4
act: clear process


// f17

f17 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f17
    process ? act: clear o1
    process ? act: set f12
    process ? act: set o2
act: clear process

f17 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f17
    process ? act: clear o1
    process ? act: set f5
    process ? act: set o2
act: clear process

f17 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f17
    process ? act: clear o2
    process ? act: set f5
    process ? act: set o1
act: clear process

f17 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f17
    process ? act: clear o2
    process ? act: set f12
    process ? act: set o1
act: clear process

f17 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f17
    process ? act: clear o3
    process ? act: set f5
    process ? act: set o4
act: clear process

f17 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f17
    process ? act: clear o3
    process ? act: set f12
    process ? act: set o4
act: clear process

f17 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f17 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f17
    process ? act: clear o4
    process ? act: set f12
    process ? act: set o3
act: clear process

f17 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f17
    process ? act: clear o4
    process ? act: set f5
    process ? act: set o3
act: clear process


// f18

f18 ? o1 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f18
    process ? act: clear o1
    process ? act: set f1
    process ? act: set o1
act: clear process

f18 ? o1 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f18
    process ? act: clear o1
    process ? act: set f12
    process ? act: set o2
act: clear process

f18 ? o1 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o1 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o2 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: clear f18
    process ? act: clear o2
    process ? act: set f12
    process ? act: set o1
act: clear process

f18 ? o2 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: clear f18
    process ? act: clear o2
    process ? act: set f1
    process ? act: set o2
act: clear process

f18 ? o2 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o2 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o3 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o3 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o3 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f18
    process ? act: clear o3
    process ? act: set f12
    process ? act: set o4
act: clear process

f18 ? o3 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f18
    process ? act: clear o3
    process ? act: set f1
    process ? act: set o3
act: clear process

f18 ? o4 ? up_pressed ? act: set process
    process ? act: clear up_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o4 ? down_pressed ? act: set process
    process ? act: clear down_pressed
    process ? act: set GBLL_on
act: clear process

f18 ? o4 ? left_pressed ? act: set process
    process ? act: clear left_pressed
    process ? act: clear f18
    process ? act: clear o4
    process ? act: set f1
    process ? act: set o4
act: clear process

f18 ? o4 ? right_pressed ? act: set process
    process ? act: clear right_pressed
    process ? act: clear f18
    process ? act: clear o4
    process ? act: set f12
    process ? act: set o3
act: clear process


not control_lock ?
    chr: roll_left
        obj_orient ?
            act: set orient_set
        orient_set ?
            act: set obj_lock
        act: set left_pressed
        act: cockpit_001

not control_lock ?
    chr: roll_right
        obj_orient ?
            act: set orient_set
        orient_set ?
            act: set obj_lock
        act: set right_pressed
        act: cockpit_001

not control_lock ?
    chr: up
        obj_orient ?
            act: set orient_set
        orient_set ?
            act: set obj_lock
        act: set up_pressed
        act: cockpit_001

not control_lock ?
    chr: down
        obj_orient ?
            act: set orient_set
        orient_set ?
            act: set obj_lock
        act: set down_pressed
        act: cockpit_001

not control_lock ?
    chr: left
        obj_orient ?
            act: set orient_set
        orient_set ?
            act: set obj_lock
        act: set roll_left_pressed
        act: cockpit_001

not control_lock ?
    chr: right
        obj_orient ?
            act: set orient_set
        orient_set ?
            act: set obj_lock
        act: set roll_right_pressed
        act: cockpit_001


// Lights

LCKL_on ?
    chr: LCKL
        act: clear nothing

AGSL_on ?
    chr: AGSL
        act: clear AGSL_on

GBLL_on ?
    chr: GBLL
        act: clear GBLL_on

// Checklists
// Target

altitude_set ? use: Altitude
    act: cockpit_001

longitude_set ? use: Longitude
    act: cockpit_001

latitude_set ? use: Latitude
    act: cockpit_001

inclination_set ? use: Inclination
    act: cockpit_001

velocity_set ? use: Velocity
    act: cockpit_001

function_set ? use: Function
    act: cockpit_001

// Rendez-vous

unlock_set ? use: Unlock
    act: cockpit_001

orient_set ? use: Orient
    act: cockpit_001

lock_set ? use: Lock
    act: cockpit_001

burn_set ? use: Burn
    act: cockpit_001

obj_grab_target ? got_target_checklist ?
    opt: [COMMS] I'm ready. What are the coordinates ?
        act: diag_002

obj_set_target ? altitude_set ? longitude_set ? latitude_set ? inclination_set ? velocity_set ? function_set ?
    opt: [COMMS] Target set.
    act: diag_003

obj_grab_rdv ? got_rdv_checklist ?
    opt: [COMMS] Checklist... Check !
        act: diag_004

obj_unlock ? not control_lock ?
    opt: [COMMS] What is the visual cue ?
        act: diag_005

obj_burn ?
    opt: [COMMS] Orientation set and locked.
        act: diag_007

opt: .                      ^ Window ^
act: cockpit_up

opt: .                                         > Target panel >
act: cockpit_target

opt: < Systems <
act: cockpit_left
