Prev: A0FA Up: Map Next: A179
A15E: Resolve Full Overlap
Chooses what to do when two items overlap along all three coordinates. An item with the flags 03 is drawn before the other item.
ResolveFullOverlap A15E LD HL,($A1AE) Fetch the address of the entry after the item under consideration.
A161 DEC HL Move back to the start of the entry...
A162 DEC HL ...in the draw list...
A163 DEC HL ...which is three bytes.
A164 LD A,(HL) Fetch the flags of the item under consideration.
A165 CP $03 Jump to SortDrawList_SecondLoop to carry on with the next other item if they are the same.
A167 JP Z,SortDrawList_SecondLoop
A16A LD HL,($A1B0) Fetch the address of the entry after the other item.
A16D DEC HL Move back to the start of the entry...
A16E DEC HL ...in the draw list...
A16F DEC HL ...which is three bytes.
A170 LD A,(HL) Fetch the flags of the other item.
A171 CP $03 Jump to DrawOtherItemFirst if they are the same, to draw the other item first.
A173 JP Z,DrawOtherItemFirst
A176 JP SortDrawList_SecondLoop Jump to SortDrawList_SecondLoop to carry on with the next other item.
Prev: A0FA Up: Map Next: A179