Prev: 9CC6 Up: Map Next: 9D41
9D23: Visit Room
Used by the routines at B12F and B1D4.
VisitRoom 9D23 LD A,(IX+$01) C=IX+01 (current location).
9D26 LD C,A
9D27 RRCA
9D28 RRCA
9D29 RRCA
9D2A AND %00011111 Keep only bits 0-4.
9D2C LD L,A Create an offset in HL.
9D2D LD H,$00
9D2F LD A,C A=IX+01 (current location).
9D30 RLCA
9D31 RLCA
9D32 RLCA
9D33 AND %00111000 Keep only bits 3-5.
9D35 OR %11000110 Set bits 1-2, 6-7.
9D37 LD ($9D3F),A Write this value to 9D3F which updates the bit to set.
9D3A LD BC,$96BF HL=VisitedRooms+BC.
9D3D ADD HL,BC
9D3E SET 0,(HL) With above, set the bit to mark the room as having been visited.
9D40 RET Return.
View the equivalent code in;
Prev: 9CC6 Up: Map Next: 9D41