accessing_20two_20joysticks
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| accessing_20two_20joysticks [2018/03/31 13:19] – external edit 127.0.0.1 | accessing_20two_20joysticks [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====Accessing two joysticks===== | =====Accessing two joysticks===== | ||
| - | //by Richard Russell, April 2007//\\ \\ The BBC BASIC [[http:// | + | //by Richard Russell, April 2007//\\ \\ The BBC BASIC [[http:// |
| + | |||
| + | <code bb4w> | ||
| DEF PROCjoystick(id%, | DEF PROCjoystick(id%, | ||
| LOCAL joyinfo{} | LOCAL joyinfo{} | ||
| Line 11: | Line 13: | ||
| b% = joyinfo.wButtons% | b% = joyinfo.wButtons% | ||
| ENDPROC | ENDPROC | ||
| - | To access the first joystick set the first parameter **id%** to 0; to access the second joystick set **id%** to **1**.\\ \\ You would call the procedure using code similar to the following:\\ \\ | + | </ |
| + | |||
| + | To access the first joystick set the first parameter **id%** to 0; to access the second joystick set **id%** to **1**.\\ \\ You would call the procedure using code similar to the following: | ||
| + | |||
| + | <code bb4w> | ||
| PROCjoystick(0, | PROCjoystick(0, | ||
| PROCjoystick(1, | PROCjoystick(1, | ||
| + | </ | ||
| + | |||
| This will load the current joystick values into the specified variables. | This will load the current joystick values into the specified variables. | ||
accessing_20two_20joysticks.1522502344.txt.gz · Last modified: 2024/01/05 00:18 (external edit)