Prev: 75CC Up: Map Next: 761A
75D0: Erase Sprite
Used by the routines at 74A5 and 751C.
Input
B Loop counter
C Actor Y position, or zero?
DE Address into a sprite/buffer
HL Address in the DISPLAY_FILE
MaskSprite 75D0 LD A,C Jump to MaskSprite_4 if the sprites vertical position is zero.
75D1 AND A
75D2 JR Z,MaskSprite_4
75D4 DEC C Else decrement.
75D5 PUSH BC Stash BC and HL on the stack.
75D6 PUSH HL
Loop to create a mask of the sprite and it write to the screen.
MaskSprite_0 75D7 LD A,(DE) A=sprite byte.
75D8 CPL Create mask and write to screen.
75D9 AND (HL)
75DA LD (HL),A
75DB INC DE Move onto the next byte.
75DC INC L Move onto the next column.
75DD DJNZ MaskSprite_0 Decrease counter by one and loop back to MaskSprite_0 until counter is zero.
75DF POP HL Restore HL from the stack.
75E0 CALL ScreenPos1PixelAbove Call ScreenPos1PixelAbove.
75E3 POP BC Restore BC from the stack.
75E4 EXX
75E5 LD A,C Jump to MaskSprite_3 if C is zero.
75E6 AND A
75E7 JR Z,MaskSprite_3
MaskSprite_1 75E9 DEC C
75EA PUSH BC Stash BC and HL on the stack.
75EB PUSH HL
MaskSprite_2 75EC LD A,(DE)
75ED OR (HL)
75EE LD (HL),A
75EF INC DE
75F0 INC L
75F1 DJNZ MaskSprite_2
75F3 POP HL Restore HL from the stack.
75F4 CALL ScreenPos1PixelAbove Call ScreenPos1PixelAbove.
75F7 POP BC Restore BC from the stack.
MaskSprite_3 75F8 EXX
75F9 JR MaskSprite
MaskSprite_4 75FB EXX
75FC LD A,C
75FD AND A
75FE JR NZ,MaskSprite_1
This entry point is used by the routine at 74A5.
MaskSprite_5 7600 EXX
This entry point is used by the routine at 74A5.
MaskSprite_6 7601 LD A,($5E10)
7604 LD C,A
7605 LD A,($5E11)
7608 OR C
7609 RET Z
760A XOR A
760B LD ($5E10),A
760E EXX
760F LD A,($5E11)
7612 LD C,A
7613 XOR A
This entry point is used by the routine at 74A5.
MaskSprite_7 7614 LD ($5E11),A
7617 EXX
7618 JR MaskSprite
Prev: 75CC Up: Map Next: 761A