Prev: F500 Up: Map Next: F5AC
F5A0: Make a character flip a light switch off occasionally
Used by the unused routine at F5F6 and the routine at F600. If the character is standing next to a light switch, this routine makes him flip the switch off (if it's on and affects the lights in more than one window or window-pair), or consider flipping the switch off (if it's on and affects the lights in only one window or window-pair).
Input
H Character number (0xD7-0xE5)
F5A0 CALL $F436 Is the character standing next to a light switch?
F5A3 RET Z Return if not
F5A4 BIT 5,A Does the light switch affect the lights in more than one window or window pair?
F5A6 JP Z,$F48D If not, flip the light switch off 109 times out of 256
F5A9 JP $F4EC Flip the light switch off
Prev: F500 Up: Map Next: F5AC