Prev: 53157 Up: Map Next: 53248
53217: Replace Overlapping Special Object
Handles two objects that fill the same space. If one of them is a special object, it is replaced by a twinkling sprite.
Input
IX Address of the first object
IY Address of the other object
Replace a special object that fills the same space with a twinkling sprite.
ReplaceOverlappingSpecialObject 53217 LD A,(IX+0) Fetch the graphic number of the first object.
53220 SUB 96 Take 96 off it, to get the number of the special object.
53222 CP 7 Jump to ReplaceOverlappingSpecialObject_Other if it is not a special object.
53224 JR NC,ReplaceOverlappingSpecialObject_Other
53226 LD (IX+0),187 Replace it with the twinkling sprite.
53230 JR ReplaceOverlappingSpecialObject_Next Jump to ReplaceOverlappingSpecialObject_Next.
ReplaceOverlappingSpecialObject_Other 53232 LD A,(IY+0) Fetch the graphic number of the other object.
53235 SUB 96 Take 96 off it, to get the number of the special object.
53237 CP 7 Jump to ReplaceOverlappingSpecialObject_Next if it is not a special object.
53239 JR NC,ReplaceOverlappingSpecialObject_Next
53241 LD (IY+0),187 Replace it with the twinkling sprite.
ReplaceOverlappingSpecialObject_Next 53245 JP DrawObjectsInOrder_FindSecond Jump to DrawObjectsInOrder_FindSecond.
Prev: 53157 Up: Map Next: 53248