Prev: 37468 Up: Map Next: 37484
37472: Set Door Sprites
Used by the routines at HandlerDoorClosed and HandlerDoorLocked.
Writes a sprite ID to both halves of a door.
Input
A The sprite ID
IX The door entity
SetDoorSprites 37472 PUSH IX Copy IX into HL, as the address of this half of the door.
37474 POP HL
37475 LD (HL),A Update the sprite ID of this half of the door.
37476 EX AF,AF' Hold the sprite ID in AF'.
37477 LD A,L Fetch the low byte of the address of this half.
37478 XOR %00001000 Flip bit 3, to get the address of the other half of the door.
37480 LD L,A Keep the address of the other half of the door in L.
37481 EX AF,AF' Fetch the sprite ID from AF'.
37482 LD (HL),A Update the sprite ID of the other half of the door.
37483 RET Return.
Prev: 37468 Up: Map Next: 37484