Prev: A17D Up: Map Next: A19C
A185: Clear Sprite
Used by the routines at DrawInventoryItem and DisplayPlayerLives.
Clears the pixels in the area under a sprite, which is two bytes wide and 14 rows high, working up from the position of an entity.
Input
IX The entity
ClearSprite A185 LD L,(IX+$03) L=the entity X position, and H=the entity Y position.
A188 LD H,(IX+$04)
A18B CALL ScreenAddress Call ScreenAddress to get the screen address of the position.
A18E LD B,$14 B=14 (the number of rows).
ClearSprite_Row A190 LD (HL),$00 Clear the first byte of the row.
A192 INC L Move to the next byte.
A193 LD (HL),$00 Clear the second byte of the row.
A195 DEC L Move back to the first byte.
A196 CALL ScreenPosition1PixelAbove Call ScreenPosition1PixelAbove to move up one pixel row.
A199 DJNZ ClearSprite_Row Decrease the row counter by one and loop back to ClearSprite_Row until it is zero.
A19B RET Return.
Prev: A17D Up: Map Next: A19C