![]() |
Routines |
| Prev: 95DA | Up: Map | Next: 9641 |
|
The handler for the A.C.G. door (sprite ID 24 in HandlerTable2). When the three slots of the inventory hold the three A.C.G. key pieces (sprite IDs 8C 8D and 8E in that order) the doorway is opened and the door is used as an exit with HandlerDoorExit_Check, with a bigger range than other doors. Otherwise the doorway is closed and the door is just shown by HandlerRoomItem.
|
||||||||
| HandlerDoorACGExit | 961B | LD HL,$5E32 | Point HL at the sprite ID in the first slot of the inventory at Inventory_Slot1_Sprite_Id. | |||||
| 961E | LD DE,$0004 | DE=0004 (the size of a slot). | ||||||
| 9621 | LD A,(HL) | Fetch the sprite ID in the slot. | ||||||
| 9622 | CP $8C | Jump to HandlerDoorACGExit_Locked if it is not 8C. | ||||||
| 9624 | JR NZ,HandlerDoorACGExit_Locked | |||||||
| 9626 | ADD HL,DE | Move HL on to the second slot. | ||||||
| 9627 | LD A,(HL) | Fetch the sprite ID in the slot. | ||||||
| 9628 | CP $8D | Jump to HandlerDoorACGExit_Locked if it is not 8D. | ||||||
| 962A | JR NZ,HandlerDoorACGExit_Locked | |||||||
| 962C | ADD HL,DE | Move HL on to the third slot. | ||||||
| 962D | LD A,(HL) | Fetch the sprite ID in the slot. | ||||||
| 962E | CP $8E | Jump to HandlerDoorACGExit_Locked if it is not 8E. | ||||||
| 9630 | JR NZ,HandlerDoorACGExit_Locked | |||||||
| 9632 | CALL OpenDoorway | Call OpenDoorway to open the doorway. | ||||||
| 9635 | LD BC,$3020 | BC=3020 (the range of the door). | ||||||
| 9638 | JP HandlerDoorExit_Check | Jump to HandlerDoorExit_Check to check whether the player is in range of the door. | ||||||
| HandlerDoorACGExit_Locked | 963B | CALL CloseDoorway | Call CloseDoorway to close the doorway. | |||||
| 963E | JP HandlerRoomItem | Jump to HandlerRoomItem to handle a room item that does nothing. | ||||||
| Prev: 95DA | Up: Map | Next: 9641 |