Prev: D237 Up: Map Next: D26C
D249: Process Object Location Recursively
Used by the routines at StoreMatchedCharacterRoom and CombineCharacterRoom.
Walks the objects inside the current one and records the room of each.
Input
A Object ID
B Location ID
ProcessObjectLocationRecursively D249 PUSH IY Call AdjustObjectTableForSum to adjust object table for sum.
D24B PUSH IX
D24D CALL AdjustObjectTableForSum
ProcessObjectLocationRecursively_Loop D250 CALL FetchNextObjectWithID Go to ProcessObjectLocationRecursively_Next if there is no further object.
D253 JR Z,ProcessObjectLocationRecursively_Next
D255 CP (IY+$01) Jump back to ProcessObjectLocationRecursively_Loop while this id does not match the schedule entry.
D258 JR NZ,ProcessObjectLocationRecursively_Loop
D25A LD (IY+$0F),B Store it in the character attribute and read the record flag, then call ProcessObjectLocationRecursively to run object location recursively.
D25D PUSH AF
D25E LD A,(IX+$00)
D261 CALL ProcessObjectLocationRecursively
D264 POP AF Fetch the next object from ProcessObjectLocationRecursively_Loop.
D265 JR ProcessObjectLocationRecursively_Loop
Return.
ProcessObjectLocationRecursively_Next D267 POP IX Restore the saved character record and the saved schedule entry from the stack.
D269 POP IY
D26B RET Return.
View the equivalent code in;
Prev: D237 Up: Map Next: D26C