Prev: D2A4 Up: Map Next: D33C
D2F2: Get Object Attribute Value
Used by the routine at ProcessObjectAttribute_C8C6.
GetObjectAttributeValue D2F2 PUSH BC
D2F3 LD B,$00
This entry point is used by the routine at GetCharacterAttributeWithSign.
GetObjectAttributeValue_0 D2F5 PUSH IX
D2F7 PUSH IY
D2F9 LD C,$00
D2FB CALL GetObjectAttributeValue_1
D2FE LD A,C
D2FF POP IY
D301 POP IX
D303 POP BC
D304 RET
GetObjectAttributeValue_1 D305 PUSH IX
D307 LD IX,$8B6F
GetObjectAttributeValue_2 D30B CALL FetchNextObjectWithID
D30E JR Z,GetObjectAttributeValue_5
D310 CP (IY+$01)
D313 JR NZ,GetObjectAttributeValue_2
D315 PUSH AF
D316 SUB A
D317 CP B
D318 LD A,C
D319 JR Z,GetObjectAttributeValue_3
D31B ADD A,(IY+$02)
D31E JP PE,GetObjectAttributeValue_6
D321 LD C,A
D322 JR GetObjectAttributeValue_4
GetObjectAttributeValue_3 D324 ADD A,(IY+$03)
D327 JP PE,GetObjectAttributeValue_6
D32A LD C,A
D32B LD A,(IX+$00)
D32E CALL GetObjectAttributeValue_1
GetObjectAttributeValue_4 D331 POP AF
D332 JR GetObjectAttributeValue_2
GetObjectAttributeValue_5 D334 POP IX
D336 RET
GetObjectAttributeValue_6 D337 POP AF
D338 LD C,$FF
D33A JR GetObjectAttributeValue_5
Prev: D2A4 Up: Map Next: D33C