![]() |
Routines |
| Prev: C8BE | Up: Map | Next: C8EF |
|
Used by the routines at TestSeventhMarker and CombineCharacterRoom.
Looks the object up, then reads its attribute through GetObjectAttributeValue.
|
||||
| ProcessObjectAttribute_LookObjectRun | C8C6 | PUSH BC | Call FetchObjectDataPointer to look up that object. | |
| C8C7 | PUSH AF | |||
| C8C8 | LD A,B | |||
| C8C9 | CALL FetchObjectDataPointer | |||
| C8CC | LD A,B | Take the count, then call GetObjectAttributeValue to get object attribute value. | ||
| C8CD | CALL GetObjectAttributeValue | |||
| C8D0 | ADD A,(IX+$03) | Add the object's third parameter, and go to ProcessObjectAttribute_LookObjectRun_0 when the sum does not carry. | ||
| C8D3 | JR NC,ProcessObjectAttribute_LookObjectRun_0 | |||
| C8D5 | LD A,$FF | Use FF when the sum overflowed. | ||
| ProcessObjectAttribute_LookObjectRun_0 | C8D7 | LD B,A | Call FetchObjectDataPointer to look up that object. | |
| C8D8 | POP AF | |||
| C8D9 | LD C,A | |||
| C8DA | CALL FetchObjectDataPointer | |||
| C8DD | LD A,C | Take the count, then call GetObjectAttributeValue to get object attribute value. | ||
| C8DE | CALL GetObjectAttributeValue | |||
| C8E1 | SUB (IX+$03) | Subtract the object's third parameter, negate A and subtract B. | ||
| C8E4 | NEG | |||
| C8E6 | SUB B | |||
| C8E7 | POP BC | Restore BC from the stack. | ||
| C8E8 | JR C,ProcessObjectAttribute_SignalStepFailed | Go to ProcessObjectAttribute_SignalStepFailed if that subtraction borrows. | ||
| C8EA | OR %00000001 | Reset the zero flag. | ||
| C8EC | RET | Return. | ||
| ProcessObjectAttribute_SignalStepFailed | C8ED | XOR A | Clear A. | |
| C8EE | RET | Return. | ||
| Prev: C8BE | Up: Map | Next: C8EF |