Prev: 31721 Up: Map Next: 31796
31759: BuildExitList
Builds the current room's door-exit list (CorridorPosTable + 2): walks the room's 5 direction slots in RoomAdjCorridors and stores each destination that differs from the current room (up to 5 entries). The room view draws one door per entry.
31759 LD A,(31242) A = current room
31762 LD L,A
31763 LD H,0
31765 PUSH HL
31766 ADD HL,HL
31767 ADD HL,HL
31768 POP DE
31769 ADD HL,DE
31770 LD DE,29171
31773 ADD HL,DE
31774 LD DE,29632
31777 LD B,5
31779 LD C,(HL)
31780 CP C
31781 JR Z,31792
31783 LD A,(31242)
31786 CP C
31787 JR Z,31792
31789 LD A,C
31790 LD (DE),A
31791 INC DE
31792 INC HL
31793 DJNZ 31779
31795 RET
Prev: 31721 Up: Map Next: 31796