Prev: 58653 Up: Map Next: 58971
58938: Draw Intro UDG
Used by the routine at Animate_Introduction.
Draws a two-column, two-row UDG from *HL to the screen at *DE. The introduction uses this for the moon and bat frames.
Input
HL Graphic data
DE Screen address
Draw the upper character row.
Draw_IntroUDG 58938 LD B,8 Set the pixel-row counter to 8.
58940 PUSH DE Stash the screen address on the stack.
Draw_IntroUDG_Upper 58941 LD A,(HL) Write the left-hand pixel byte to the screen.
58942 LD (DE),A
58943 INC HL Advance the graphic pointer and move to the next column.
58944 INC E
58945 LD A,(HL) Write the right-hand pixel byte to the screen.
58946 LD (DE),A
58947 DEC E Move back to the left-hand column.
58948 INC D Move down one pixel row.
58949 INC HL Advance the graphic pointer.
58950 DJNZ Draw_IntroUDG_Upper Decrease the pixel-row counter by one and jump to Draw_IntroUDG_Upper until all eight rows are drawn.
Move down one character row.
58952 POP DE Restore the original screen address from the stack.
58953 LD A,32 Add 32 to the screen address.
58955 ADD A,E
58956 LD E,A
58957 LD B,8 Set the pixel-row counter to 8.
Draw the lower character row.
Draw_IntroUDG_Lower 58959 LD A,(HL) Write the left-hand pixel byte to the screen.
58960 LD (DE),A
58961 INC HL Advance the graphic pointer and move to the next column.
58962 INC E
58963 LD A,(HL) Write the right-hand pixel byte to the screen.
58964 LD (DE),A
58965 INC HL Advance the graphic pointer.
58966 DEC E Move back to the left-hand column.
58967 INC D Move down one pixel row.
58968 DJNZ Draw_IntroUDG_Lower Decrease the pixel-row counter by one and jump to Draw_IntroUDG_Lower until all eight rows are drawn.
58970 RET Return.
Prev: 58653 Up: Map Next: 58971