Prev: C95D Up: Map Next: C991
C96F: Copy a bitmap to the screen
Used by the routines at move_method_arrow, draw_panel, draw_frame, draw_fuel_gauge and menu.
Draws a byte-aligned bitmap with no mask, overwriting what is there: a width in bytes, a height in rows, then the rows, bottom row first, drawn upwards from the given pixel position (line_up_hl steps up a row). Used for the panel and the play area's frame.
Input
H The y of the bottom row
L The x (a multiple of 8)
DE The bitmap
Output
DE The byte after it
draw_bitmap C96F PUSH HL Read the width and height; the screen address (pixel_to_screen).
C970 LD A,(DE)
C971 LD B,A
C972 INC DE
C973 LD A,(DE)
C974 LD C,A
C975 INC DE
C976 CALL pixel_to_screen
C979 LD A,B
C97A LD (scratch_count),A
draw_bitmap_0 C97D PUSH HL Each row: copy the bytes, then up one pixel row.
C97E LD A,(scratch_count)
C981 LD B,A
draw_bitmap_1 C982 LD A,(DE)
C983 LD (HL),A
C984 INC DE
C985 INC HL
C986 DJNZ draw_bitmap_1
C988 POP HL
C989 CALL line_up_hl
C98C DEC C
C98D JR NZ,draw_bitmap_0
C98F POP HL
C990 RET
Prev: C95D Up: Map Next: C991