Prev: 54533 Up: Map Next: 54569
54539: Load B with index of room to left of an entity's current room
Used by the routines at 48641, 52098, 54283 and 54348.
IX Address of complex state data for an entity
D (entry at 54542 only) Index of base room for check
B Index of room found if there is one, undefined otherwise
F Zero flag set if there is no room to the left, reset otherwise
54539 LD D,(IX+0) Load current room of entity pointed to by IX into D
This entry point is used by the routine at 53194.
54542 LD IY,(34250) Load start address of current level's horizontal room connectivity data into IY
54546 INC IY Advance by one byte to second byte (right room index) of first entry
54548 LD A,(IY+0) Load second byte (right room index) of current entry into A
54551 CP 255 If byte is 255 (i.e. the end marker)...
54553 RET Z ...then return
54554 CP D If byte is not the same as the room index in D...
54555 JR NZ,54563 ...then skip ahead to 54563
54557 LD B,(IY-1) Load first byte (left room index) of current entry into B
54560 CP 255 Reset zero flag (as current room cannot be 255)
54562 RET Return
54563 INC IY Advance by two bytes to the next entry...
54565 INC IY ...
54567 JR 54548 Loop back to 54548
Prev: 54533 Up: Map Next: 54569