Prev: 51390 Up: Map Next: 51439
51398: Process Object Attribute
Used by the routines at TestSeventhMarker and CombineCharacterRoom.
Looks the object up, then reads its attribute through GetObjectAttributeValue.
ProcessObjectAttribute_LookObjectRun 51398 PUSH BC Call FetchObjectDataPointer to look up that object.
51399 PUSH AF
51400 LD A,B
51401 CALL FetchObjectDataPointer
51404 LD A,B Take the count, then call GetObjectAttributeValue to get object attribute value.
51405 CALL GetObjectAttributeValue
51408 ADD A,(IX+3) Add the object's third parameter, and go to ProcessObjectAttribute_LookObjectRun_0 when the sum does not carry.
51411 JR NC,ProcessObjectAttribute_LookObjectRun_0
51413 LD A,255 Use 255 when the sum overflowed.
ProcessObjectAttribute_LookObjectRun_0 51415 LD B,A Call FetchObjectDataPointer to look up that object.
51416 POP AF
51417 LD C,A
51418 CALL FetchObjectDataPointer
51421 LD A,C Take the count, then call GetObjectAttributeValue to get object attribute value.
51422 CALL GetObjectAttributeValue
51425 SUB (IX+3) Subtract the object's third parameter, negate A and subtract B.
51428 NEG
51430 SUB B
51431 POP BC Restore BC from the stack.
51432 JR C,ProcessObjectAttribute_SignalStepFailed Go to ProcessObjectAttribute_SignalStepFailed if that subtraction borrows.
51434 OR %00000001 Reset the zero flag.
51436 RET Return.
ProcessObjectAttribute_SignalStepFailed 51437 XOR A Clear A.
51438 RET Return.
Prev: 51390 Up: Map Next: 51439