![]() |
Routines |
| Prev: 41341 | Up: Map | Next: 41372 |
|
Used by the routines at DrawInventoryItem and DisplayPlayerLives.
Clears the pixels in the area under a sprite, which is two bytes wide and 20 rows high, working up from the position of an entity.
|
||||||||
| ClearSprite | 41349 | LD L,(IX+3) | L=the entity X position, and H=the entity Y position. | |||||
| 41352 | LD H,(IX+4) | |||||||
| 41355 | CALL ScreenAddress | Call ScreenAddress to get the screen address of the position. | ||||||
| 41358 | LD B,20 | B=20 (the number of rows). | ||||||
| ClearSprite_Row | 41360 | LD (HL),0 | Clear the first byte of the row. | |||||
| 41362 | INC L | Move to the next byte. | ||||||
| 41363 | LD (HL),0 | Clear the second byte of the row. | ||||||
| 41365 | DEC L | Move back to the first byte. | ||||||
| 41366 | CALL ScreenPosition1PixelAbove | Call ScreenPosition1PixelAbove to move up one pixel row. | ||||||
| 41369 | DJNZ ClearSprite_Row | Decrease the row counter by one and loop back to ClearSprite_Row until it is zero. | ||||||
| 41371 | RET | Return. | ||||||
| Prev: 41341 | Up: Map | Next: 41372 |