Prev: D273 Up: Map Next: D2B2
D2A2: Clip Edge Strip Top
Used by the routine at DrawStripGraphic.
Skips the rows of a strip that are below PixelBuffer. 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 strip
Skip the rows that are below the buffer.
ClipEdgeStripTop D2A2 NEG Make the number of rows positive and keep it in C.
D2A4 LD C,A
D2A5 LD A,(HL) Fetch the height of the strip.
D2A6 INC HL
D2A7 SUB C Subtract the rows that are below.
D2A8 RET M Return if there are none left.
D2A9 RET Z
D2AA LD B,$00 Skip the image data for those rows.
D2AC ADD HL,BC
D2AD ADD HL,BC
D2AE LD D,$48 Set the vertical position to 48.
D2B0 JR DrawStripGraphic_Draw Jump to DrawStripGraphic_Draw.
View the equivalent code in;
Prev: D273 Up: Map Next: D2B2