Prev: C4D1 Up: Map Next: C863
C821: Routine at C821
Used by the routines at 9CCE, C4D1, CBC2, CC37, D078, D36A, D4EF and DC6C.
C821 PUSH IX Stash IX and BC on the stack.
C823 PUSH BC
C824 CALL FetchObjectDataPointer Call FetchObjectDataPointer.
C827 LD B,A B=A.
C828 LD A,($A036) A=*CurrentCharacter_ID.
C82B CALL $C863 Call C863.
C82E CP B Jump to C85D if A is equal to B.
C82F JR Z,$C85D
C831 BIT 7,(IX+$05) Jump to C85A if bit 7 of *IX+05 is not set.
C835 JR Z,$C85A
C837 LD C,A C=A.
C838 LD A,B A=B.
C839 LD B,C B=C.
C83A CALL $C863 Call C863.
C83D LD C,A C=A.
C83E LD A,($A036) A=*CurrentCharacter_ID.
C841 CP C Jump to C85D if A is equal to C.
C842 JR Z,$C85D
C844 LD A,C A=C.
C845 CP B Jump to C85A if A is not equal to B.
C846 JR NZ,$C85A
C848 INC A Increment A by one.
C849 JR NZ,$C85D Jump to C85D if A is not equal to B.
C84B LD B,(IX+$00) B=*IX+00.
C84E LD A,($A00A) Jump to C85D if *A00A is equal to *IX+0F.
C851 CP (IX+$0F)
C854 JR Z,$C85D
C856 INC IX Increment IX by one.
C858 DJNZ $C851 Decrease counter by one and loop back to C851 until counter is zero.
C85A XOR A A=00.
C85B JR $C85F Jump to C85F.
C85D OR %00000001 Set bit 0.
C85F POP BC Restore BC and IX from the stack.
C860 POP IX
C862 RET Return.
Prev: C4D1 Up: Map Next: C863