Prev: 45215 Up: Map Next: 45233
45219: Handler: Controls
Used by the routines at PlayerMovement, GamePlay_Start and 46807.
Output
C Controls
Bit Action
0 Left
1 Right
2 Down
3 Up
4 Fire
HandlerControls 45219 LD A,(38546) A=GameOptions.
45222 RRCA Shift off the keyboard option.
45223 AND %00000011 Keep only bits 0-1 (Kempston and Cursor joystick options).
45225 JR Z,ReadKeyboard If there are no joystick options, then keyboard was selected - so jump to ReadKeyboard.
45227 DEC A If bit 0 was on then Kempston joystick was selected - so jump to ReadKempstonJoystick.
45228 JR Z,ReadKempstonJoystick
45230 DEC A If bit 1 was on then Cursor joystick was selected - so jump to ReadCursorJoystick.
45231 JR Z,ReadCursorJoystick
Else, handle Interface II joystick - it's the only option left.
Continue on to ReadInterfaceIIJoystick.
Prev: 45215 Up: Map Next: 45233