Prev: B5FD Up: Map Next: B613
B606: Find Active Scenic Event
Walk the scenic-event list at HL and return the index of the first one that matches.
FindActiveScenicEvent B606 LD B,$00 Start the index at 00.
B608 JR FindActiveScenicEvent_Next Check the first scenic event at FindActiveScenicEvent_Next.
FindActiveScenicEvent_Loop B60A INC B Advance the index in B.
B60B INC HL Advance HL to the next event.
FindActiveScenicEvent_Next B60C CALL CheckActiveScenicEvents Call CheckActiveScenicEvents to check the scenic events.
B60F JR Z,FindActiveScenicEvent_Loop Branch to FindActiveScenicEvent_Loop to count each listed item that is here, until the end of the list.
B611 LD A,B Copy the index into A.
B612 RET Return.
Prev: B5FD Up: Map Next: B613