Consistency
[ScratchNES.git] / src / Input / input.tosh
1 define read controller 1
2 set M to item 1 of controller 1 state * 1
3 delete 1 of controller 1 state
4
5 define controller strobe (value)
6 if controller strobe = 1 and value = 0 then
7 delete all of controller 1 state
8 add <key z pressed?> to controller 1 state
9 add <key x pressed?> to controller 1 state
10 add <key s pressed?> to controller 1 state
11 add <key space pressed?> to controller 1 state
12 add <key up arrow pressed?> to controller 1 state
13 add <key down arrow pressed?> to controller 1 state
14 add <key left arrow pressed?> to controller 1 state
15 add <key right arrow pressed?> to controller 1 state
16 set controller strobe to value
17 else
18 set controller strobe to value
19 end
This page took 0.126071 seconds and 4 git commands to generate.