Prev: A64B Up: Map Next: A663
A652: Check Active Scenic Events
Input
HL Pointer to scenic data
Output
A The listed item that is here, or FF if there is none
F The zero flag is set when an item on the list is here or carried
CheckActiveScenicEvents A652 JR ActiveScenicEvents_CheckNext Jump to ActiveScenicEvents_CheckNext.
ActiveScenicEvents_Loop A654 INC HL Move to the next event ID.
ActiveScenicEvents_CheckNext A655 LD A,(HL) Jump to NoActiveScenicEvents if *HL is equal to FF.
A656 CP $FF
A658 JR Z,NoActiveScenicEvents
A65A CALL ValidateItemPresent Call ValidateItemPresent.
A65D JR NZ,ActiveScenicEvents_Loop Jump to ActiveScenicEvents_Loop if the Z flag is not set.
A65F LD A,(HL) A=*HL.
A660 RET Return.
NoActiveScenicEvents A661 AND A Clear the zero flag (A holds the FF end marker) to report that nothing on the list is here.
A662 RET Return.
View the equivalent code in;
Prev: A64B Up: Map Next: A663