Prev: D3C2 Up: Map Next: D425
D415: Clip Wall Strip Top
Used by the routine at DrawWallStrip.
Skips the rows of a wall strip that are below PixelBuffer. A is the number of those rows, negated. It starts drawing at 48 and jumps to DrawWallStrip_Draw.
Input
A The number of rows below the buffer, negated
HL The address of the graphic
Skip the rows that are below the buffer.
ClipWallStripTop D415 NEG Make the number of rows positive and keep it in C.
D417 LD C,A
D418 LD A,(HL) Fetch the height of the graphic.
D419 INC HL
D41A SUB C Subtract the rows that are below.
D41B RET M Return if there are none left.
D41C RET Z
D41D LD B,$00 Skip the image data for those rows.
D41F ADD HL,BC
D420 ADD HL,BC
D421 LD D,$48 Set the vertical position to 48.
D423 JR DrawWallStrip_Draw Jump to DrawWallStrip_Draw.
View the equivalent code in;
Prev: D3C2 Up: Map Next: D425