Prev: 51299 Up: Map Next: 51358
51310: Check Object Mother
Used by the routines at GetObjectLocation and CheckObjectVisibility.
Follows the moved marker until 255 and leaves the id it stopped on in the alternate accumulator.
CheckObjectMother 51310 PUSH IX Switch to the saved result and take the end marker.
51312 EX AF,AF'
51313 LD A,255
CheckObjectMother_Loop 51315 EX AF,AF' Jump to CheckObjectMother_0 if the moved marker is 255.
51316 LD A,(IX+1)
51319 CP 255
51321 JR Z,CheckObjectMother_0
51323 EX AF,AF' Call FetchObjectDataPointer to look up the current object.
51324 LD A,(IX+1)
51327 CALL FetchObjectDataPointer
51330 BIT 7,(IX+5) Jump ahead to CheckObjectMother_Next if the object-attribute flag is clear.
51334 JR Z,CheckObjectMother_Next
An object flag is set?
51336 BIT 5,(IX+5) Jump to CheckObjectMother_Loop if an object flag is set.
51340 JR NZ,CheckObjectMother_Loop
51342 BIT 3,(IX+5) See whether bit 3 of the object attribute is set.
51346 JR NZ,CheckObjectMother_Loop Jump to CheckObjectMother_Loop when this object's attribute bit is set.
CheckObjectMother_Next 51348 EX AF,AF' Switch to the saved result.
CheckObjectMother_0 51349 POP IX Restore the saved character record from the stack.
51351 RET Return.
51352 CALL ExchangeCharacterRecordSchedule Run ExchangeCharacterRecordSchedule, then run CheckObjectMother.
51355 CALL CheckObjectMother
View the equivalent code in;
Prev: 51299 Up: Map Next: 51358