Prev: C59B Up: Map Next: C5F9
C5E9: Clip Wall Strip Top
Used by the routine at DrawWallStrip.
Skips the rows of a wall tile that are below PlayfieldBuffer. A is the number of those rows, negated. It starts drawing at 48 and jumps to DrawWallStrip_Rows.
Input
A The number of rows below the buffer, negated
HL The address of the image
Skip the rows that are below the buffer.
ClipWallStripTop C5E9 NEG Make the number of rows positive and keep it in C.
C5EB LD C,A
C5EC LD A,(HL) Fetch the height of the image.
C5ED INC HL
C5EE SUB C Subtract the rows that are below.
C5EF RET M Return if there are none left.
C5F0 RET Z
C5F1 LD B,$00 Skip the image data for those rows.
C5F3 ADD HL,BC
C5F4 ADD HL,BC
C5F5 LD D,$48 Set the vertical position to 48.
C5F7 JR DrawWallStrip_Rows Jump to DrawWallStrip_Rows.
View the equivalent code in;
Prev: C59B Up: Map Next: C5F9