Prev: A1D9 Up: Map Next: A1FB
A1EA: Clip First Sprite
Used by the routines at PrepareErase and UpdateStarLayer.
Fetches the header of the first sprite and clips it to the playfield.
Input
DE Address of the sprite
Output
B Number of rows
C Index of the routine that draws the sprite
DE Address of the first row of data
H Width in bytes
ClipFirstSprite A1EA LD HL,($A1D3) Fetch the position of the first sprite.
A1ED CALL ReadSpriteHeader Read the header of the sprite.
A1F0 LD A,($A1D4) Fetch the vertical position.
A1F3 CALL ClipSpriteVertically Clip the sprite at the top and bottom of the playfield.
A1F6 LD A,L Fetch the clipped vertical position.
A1F7 LD ($A1D4),A Store it.
A1FA RET Return.
Prev: A1D9 Up: Map Next: A1FB