![]()  | 
Unused | 
| Prev: AF08 | Up: Map | Next: AF1E | 
 
  | 
||||||||||||
| FindIndexOfItemFromItemGroupPresent | AF11 | LD B,$00 | Initialise an index counter in B to 00. | |||||||||
| AF13 | JR $AF17 | Jump to Call_CheckItemGroupPresent. | ||||||||||
| 
 
Move past the termination byte in the item group.
 
 | 
||||||||||||
| FindIndexOfItemFromItemGroupPresent_Loop | AF15 | INC B | Increment the index counter in B by one. | |||||||||
| AF16 | INC HL | Increment HL by one. | ||||||||||
| Call_CheckItemGroupPresent | AF17 | CALL CheckItemGroupPresent | Call CheckItemGroupPresent. | |||||||||
| AF1A | JR Z,$AF15 | Jump back to FindIndexOfItemFromItemGroupPresent_Loop until an item from the item group is matched. | ||||||||||
| 
 
An index was found.
 
 | 
||||||||||||
| AF1C | LD A,B | Store the index from B into A. | ||||||||||
| AF1D | RET | Return. | ||||||||||
| Prev: AF08 | Up: Map | Next: AF1E |