Prev: 56426 Up: Map Next: 56723
56673: Handle Overlap First
Used by the routine at HandleOverlap.
Moves the entity clear of the overlap in the first direction. Entities of type 5 are changed to type 13.
Input
IX The entity
HandleOverlapFirst 56673 LD A,(56787) The z overlap is smaller, so this axis is left alone.
56676 CP B
56677 JP C,HandleOverlap_Vertical
56680 LD A,(IX+0) A puff becomes a sparkle.
56683 SUB 5
56685 JR NZ,HandleOverlapFirst_Shot
56687 LD (IX+35),4 The sparkle's countdown is 4 its frame is 0 its type is 13 and its height is 8.
56691 LD (IX+1),A
56694 LD (IX+0),13
56698 LD (IX+23),8
HandleOverlapFirst_Shot 56702 LD A,(IX+0) When the type is a shot.
56705 AND 31
56707 CP 14
56709 JR NZ,HandleOverlapFirst_Move
56711 SET 7,(IX+22) Set bit 7 of the width byte.
HandleOverlapFirst_Move 56715 LD HL,(56783) Move back by the x overlap and finish.
56718 CALL MoveEntityBack
56721 JR HandleOverlapSecond_Clear
Prev: 56426 Up: Map Next: 56723