Prev: C95D Up: Map Next: C991
C96F: Draw Bitmap
Draws a bitmap on the screen. The bitmap starts with its width in bytes and its height in rows, followed by the bytes for each row. The position is that of the bottom row, and the rows are drawn going up the screen.
Input
DE Address of the bitmap
HL Position (H is the pixel row and L is the pixel column)
Output
DE Address after the bitmap
DrawBitmap C96F PUSH HL Stash HL on the stack.
C970 LD A,(DE) Read DE.
C971 LD B,A B=A.
C972 INC DE Advance DE.
C973 LD A,(DE) Read DE.
C974 LD C,A C=A.
C975 INC DE Advance DE.
C976 CALL GetScreenAddress Call GetScreenAddress.
C979 LD A,B A=B.
C97A LD ($5C1C),A The width of the bitmap.
DrawBitmap_Row C97D PUSH HL Stash HL on the stack.
C97E LD A,($5C1C) The width of the bitmap.
C981 LD B,A B=A.
DrawBitmap_Loop C982 LD A,(DE) Read DE.
C983 LD (HL),A Write A where HL points.
C984 INC DE Advance DE.
C985 INC HL Advance HL.
C986 DJNZ DrawBitmap_Loop Decrease B and jump to DrawBitmap_Loop until none remain.
C988 POP HL Bring HL back off the stack.
C989 CALL MoveUpARow Call MoveUpARow.
C98C DEC C Step C back.
C98D JR NZ,DrawBitmap_Row Jump to DrawBitmap_Row if the zero flag is clear.
C98F POP HL Bring HL back off the stack.
C990 RET Return.
Prev: C95D Up: Map Next: C991