Prev: 96AF Up: Map Next: 96EC
96C9: Calculate Rooms Visited
Used by the routine at GameStats.
CalcRoomsVisited 96C9 LD HL,$5E40 HL=VisitedRooms.
96CC LD BC,$0813 BC=0813.
96CF LD D,$03 D=03.
96D1 XOR A
CalcRoomsVisited_0 96D2 PUSH BC Stash BC on the stack.
96D3 LD E,(HL)
96D4 INC HL
CalcRoomsVisited_1 96D5 RR E
96D7 JR NC,CalcRoomsVisited_2
96D9 DEC D
96DA JR NZ,CalcRoomsVisited_2
96DC LD D,$03
96DE ADD A,$02
96E0 DAA
CalcRoomsVisited_2 96E1 DJNZ CalcRoomsVisited_1
96E3 POP BC Restore BC from the stack.
96E4 DEC C
96E5 JR NZ,CalcRoomsVisited_0
96E7 INC A
96E8 LD ($5E54),A
96EB RET Return.
View the equivalent code in;
Prev: 96AF Up: Map Next: 96EC