Prev: C468 Up: Map Next: C4A7
C497: Clip Edge Strip Top
Used by the routine at DrawStripGraphic.
Skips the rows of an image that are below PlayfieldBuffer. A is the number of those rows, negated. It starts drawing at 48 and jumps to DrawStripGraphic_Draw.
Input
A The number of rows below the buffer, negated
HL The address of the image
Skip the rows that are below the buffer.
ClipEdgeStripTop C497 NEG Make the number of rows positive and keep it in C.
C499 LD C,A
C49A LD A,(HL) Fetch the height of the image.
C49B INC HL
C49C SUB C Subtract the rows that are below.
C49D RET M Return if there are none left.
C49E RET Z
C49F LD B,$00 Skip the image data for those rows.
C4A1 ADD HL,BC
C4A2 ADD HL,BC
C4A3 LD D,$48 Set the vertical position to 48.
C4A5 JR DrawStripGraphic_Draw Jump to DrawStripGraphic_Draw.
View the equivalent code in;
Prev: C468 Up: Map Next: C4A7