Prev: C863 Up: Map Next: C89E
C86E: Check Object Mother
Used by the routines at GetObjectLocation and CheckObjectVisibility.
Follows the moved marker until FF and leaves the id it stopped on in the alternate accumulator.
CheckObjectMother C86E PUSH IX Switch to the saved result and take the end marker.
C870 EX AF,AF'
C871 LD A,$FF
CheckObjectMother_Loop C873 EX AF,AF' Jump to CheckObjectMother_0 if the moved marker is FF.
C874 LD A,(IX+$01)
C877 CP $FF
C879 JR Z,CheckObjectMother_0
C87B EX AF,AF' Call FetchObjectDataPointer to look up the current object.
C87C LD A,(IX+$01)
C87F CALL FetchObjectDataPointer
C882 BIT 7,(IX+$05) Jump ahead to CheckObjectMother_Next if the object-attribute flag is clear.
C886 JR Z,CheckObjectMother_Next
An object flag is set?
C888 BIT 5,(IX+$05) Jump to CheckObjectMother_Loop if an object flag is set.
C88C JR NZ,CheckObjectMother_Loop
C88E BIT 3,(IX+$05) See whether bit 3 of the object attribute is set.
C892 JR NZ,CheckObjectMother_Loop Jump to CheckObjectMother_Loop when this object's attribute bit is set.
CheckObjectMother_Next C894 EX AF,AF' Switch to the saved result.
CheckObjectMother_0 C895 POP IX Restore the saved character record from the stack.
C897 RET Return.
C898 CALL ExchangeCharacterRecordSchedule Run ExchangeCharacterRecordSchedule, then run CheckObjectMother.
C89B CALL CheckObjectMother
View the equivalent code in;
Prev: C863 Up: Map Next: C89E