Prev: 94F5 Up: Map Next: 954D
9546: Update Doorway
Used by the routine at HandlerDoorClosed.
Opens the doorway of a door if bit 0 of its sprite ID is set (which is so for the doors that are open), and closes it if it is not. The other entry points open and close the doorway of a door whatever the sprite ID. The doorway is open when bit 3 of the attribute is reset for both halves of the door, because CheckObstacles skips the doors that have it set.
Input
IX One half of the door
UpdateDoorway 9546 LD A,(IX+$00) Fetch the sprite ID of the door.
9549 AND %00000001 Keep only bit 0.
954B JR Z,CloseDoorway Jump to CloseDoorway if it is reset.
Prev: 94F5 Up: Map Next: 954D