![]() |
Routines |
| Prev: F1AF | Up: Map | Next: F1FC |
|
Used by the routine at Handler_KeysAndLockedDoors.
Walks ReferenceKeysAndLockedDoors looking for an entry whose key ID matches A.
|
||||||||||||
| FindMatchingKey | F1E5 | LD DE,$0006 | DE=0006 (key entry length). | |||||||||
| F1E8 | LD C,A | C=the key ID to match. | ||||||||||
| F1E9 | LD IX,($5BDA) | Point IX at *ReferenceKeysAndLockedDoors. | ||||||||||
| FindMatchingKey_0 | F1ED | LD A,(IX+$00) | Return if this key entry is the terminator (FF). | |||||||||
| F1F0 | CP $FF | |||||||||||
| F1F2 | RET Z | |||||||||||
| F1F3 | LD A,C | Return if this entry's key ID matches. | ||||||||||
| F1F4 | CP (IX+$04) | |||||||||||
| F1F7 | RET Z | |||||||||||
| F1F8 | ADD IX,DE | Move IX on to the next key entry. | ||||||||||
| F1FA | JR FindMatchingKey_0 | Jump to FindMatchingKey_0. | ||||||||||
| Prev: F1AF | Up: Map | Next: F1FC |