![]() |
Routines |
| Prev: 45215 | Up: Map | Next: 45233 |
|
Reads the controls using the method chosen in the game options (see GameOptions): the keyboard, a Kempston joystick, a Cursor joystick or an Interface II joystick. Each of the routines returns the controls in C, with a bit set for each direction or button pressed.
|
||||||||||||||||||||
| HandlerControls | 45219 | LD A,(38546) | Fetch the game options from GameOptions. | |||||||||||||||||
| 45222 | RRCA | Rotate out the number of players bit (bit 0). | ||||||||||||||||||
| 45223 | AND %00000011 | Keep only bits 0-1 (Kempston and Cursor joystick options). | ||||||||||||||||||
| 45225 | JR Z,ReadKeyboard | Jump to ReadKeyboard if the keyboard was selected (both control bits are reset). | ||||||||||||||||||
| 45227 | DEC A | Jump to ReadKempstonJoystick if the Kempston joystick was selected. | ||||||||||||||||||
| 45228 | JR Z,ReadKempstonJoystick | |||||||||||||||||||
| 45230 | DEC A | Jump to ReadCursorJoystick if the Cursor joystick was selected. | ||||||||||||||||||
| 45231 | JR Z,ReadCursorJoystick | |||||||||||||||||||
|
View the equivalent code in;
Else, handle Interface II joystick - it's the only option left.
Continue on to ReadInterfaceIIJoystick.
|
||||||||||||||||||||
| Prev: 45215 | Up: Map | Next: 45233 |