Prev: 42571 Up: Map Next: 42595
42578: Check Active Scenic Events
Used by the routines at 43160 and 43186.
Input
HL Pointer to scenic data
Output
A
F The Z flag is set then there are no matching scenic events
CheckActiveScenicEvents 42578 JR ActiveScenicEvents_CheckNext Jump to ActiveScenicEvents_CheckNext.
ActiveScenicEvents_Loop 42580 INC HL Move to the next event ID.
ActiveScenicEvents_CheckNext 42581 LD A,(HL) Jump to NoActiveScenicEvents if *HL is equal to 255.
42582 CP 255
42584 JR Z,NoActiveScenicEvents
42586 CALL ValidateItemPresent Call ValidateItemPresent.
42589 JR NZ,ActiveScenicEvents_Loop Jump to ActiveScenicEvents_Loop if the Z flag is not set.
42591 LD A,(HL) A=*HL.
42592 RET Return.
NoActiveScenicEvents 42593 AND A Set Z flag.
42594 RET Return.
View the equivalent code in The Jewels Of Babylon.
Prev: 42571 Up: Map Next: 42595