Prev: D36A Up: Map Next: D3D5
D39B: Process Object Entry Alternate
Walks the objects in this room and describes each one that is here. Pointed at by B4E7 and B58E.
ProcessObjectEntryAlternate D39B PUSH IY Save the schedule entry, the source, the count and the character record.
D39D PUSH DE
D39E PUSH BC
D39F PUSH IX
D3A1 POP BC Copy the character record from IX into BC.
D3A2 LD DE,$0001 Take an offset of 0001.
Has the object count reached 6A?
ProcessObjectEntryAlternate_Loop D3A5 INC B Count one more, and go to ProcessObjectEntryAlternate_BringSavedCharacter with FF if the count has reached 6A.
D3A6 LD A,B
D3A7 CP $6A
D3A9 LD A,$FF
D3AB JR Z,ProcessObjectEntryAlternate_BringSavedCharacter
D3AD LD A,B Take the count, then call FetchLocationDataPointer to look up this room.
D3AE CALL FetchLocationDataPointer
D3B1 PUSH IX Step to the next schedule entry, then call CompareFollowingFields to compare location data.
D3B3 POP IY
D3B5 ADD IY,DE
D3B7 CALL CompareFollowingFields
D3BA JR NZ,ProcessObjectEntryAlternate_Loop Jump back to ProcessObjectEntryAlternate_Loop while the room fields do not match.
D3BC LD A,($A038) Jump ahead to ProcessObjectEntryAlternate_Next if the object attribute flag is not zero.
D3BF AND A
D3C0 JR NZ,ProcessObjectEntryAlternate_Next
D3C2 PUSH BC Take the count and call FindObjectByFieldTwo to find an object by field two.
D3C3 LD A,B
D3C4 CALL FindObjectByFieldTwo
D3C7 POP BC
D3C8 CP $FF Jump back to ProcessObjectEntryAlternate_Loop if the entry is the end marker.
D3CA JR Z,ProcessObjectEntryAlternate_Loop
ProcessObjectEntryAlternate_Next D3CC LD A,B Take the count.
ProcessObjectEntryAlternate_BringSavedCharacter D3CD PUSH BC Copy the object count from BC into IX.
D3CE POP IX
D3D0 POP BC Restore the saved count, the saved source and the saved schedule entry from the stack.
D3D1 POP DE
D3D2 POP IY
D3D4 RET Return.
View the equivalent code in;
Prev: D36A Up: Map Next: D3D5