Prev: 46140 Up: Map Next: 46312
46272: Draw Unshifted Rows
Draws the rows of a sprite that is not shifted, using the stack pointer to read the sprite data. Each pair of sprite bytes is a mask byte and a picture byte, and these are combined with the screen buffer. There are four entry points, which are for widths of four, three, two and one bytes. The address in the table at RowRoutineTable is the entry point for the width.
Input
HL The address in the screen buffer
B The number of rows
SP The sprite data
DrawUnshiftedRows 46272 POP DE Draw one byte of the sprite.
46273 LD A,E
46274 CPL
46275 AND (HL)
46276 OR D
46277 LD (HL),A
46278 INC HL
DrawUnshiftedRows_Three 46279 POP DE Draw one byte of the sprite.
46280 LD A,E
46281 CPL
46282 AND (HL)
46283 OR D
46284 LD (HL),A
46285 INC HL
DrawUnshiftedRows_Two 46286 POP DE Draw one byte of the sprite.
46287 LD A,E
46288 CPL
46289 AND (HL)
46290 OR D
46291 LD (HL),A
46292 INC HL
This entry point is used by the routine at DrawNeedleTip.
DrawUnshiftedRows_One 46293 POP DE Draw the last byte of the sprite.
46294 LD A,E
46295 CPL
46296 AND (HL)
46297 OR D
46298 LD (HL),A
DrawUnshiftedRows_Next 46299 LD DE,65280 Move to the next row of the screen buffer.
46302 ADD HL,DE
46303 DEC B Repeat for the remaining rows.
46304 JP NZ,DrawUnshiftedRows_Next
46307 LD SP,(23770) Restore the stack pointer.
46311 RET Return.
Prev: 46140 Up: Map Next: 46312