Prev: A1D3 Up: Map Next: A1EA
A1D9: Clip Second Sprite
Used by the routines at PrepareDraw and UpdateStarLayer.
Fetches the header of the second 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
ClipSecondSprite A1D9 LD HL,($A1D5) Fetch the position of the second sprite.
A1DC CALL ReadSpriteHeader Read the header of the sprite.
A1DF LD A,($A1D6) Fetch the vertical position.
A1E2 CALL ClipSpriteVertically Clip the sprite at the top and bottom of the playfield.
A1E5 LD A,L Fetch the clipped vertical position.
A1E6 LD ($A1D6),A Store it.
A1E9 RET Return.
Prev: A1D3 Up: Map Next: A1EA