Prev: 50587 Up: Map Next: 50681
50665: 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 72 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 50665 NEG Make the number of rows positive and keep it in C.
50667 LD C,A
50668 LD A,(HL) Fetch the height of the image.
50669 INC HL
50670 SUB C Subtract the rows that are below.
50671 RET M Return if there are none left.
50672 RET Z
50673 LD B,0 Skip the image data for those rows.
50675 ADD HL,BC
50676 ADD HL,BC
50677 LD D,72 Set the vertical position to 72.
50679 JR DrawWallStrip_Rows Jump to DrawWallStrip_Rows.
View the equivalent code in;
Prev: 50587 Up: Map Next: 50681