Prev: AF19 Up: Map Next: AF25
AF1D: Check Lights
Used by the routine at MoveLights.
Checks whether any of the lights are in use.
Input
B Number of lights
HL Address of the first light
DE Size of a light
Output
F The zero flag is set if no lights are in use
CheckLights AF1D XOR A Start the count of lights at zero.
CheckLights_Next AF1E OR (HL) Combine the type of the light with the others...
AF1F ADD HL,DE ...and move on to the next light.
AF20 DJNZ CheckLights_Next Loop back until all the lights have been checked.
AF22 RET Z Return if no lights are in use.
AF23 JR MoveLights_Update Jump to move the lights.
Prev: AF19 Up: Map Next: AF25