Prev: E46D Up: Map Next: E4E1
E4A9: Draws an end-game montage shot to the screen (attrs -> screen)
Input
HL Address of image to plot
DE Destination address in the screen
draw_endshot E4A9 PUSH DE Preserve destination in screen
E4AA LD B,$40 Counter = 64 rows
draw_endshot_0 E4AC PUSH BC Preserve counter
E4AD LD BC,$000D 13 bytes to transfer
E4B0 PUSH DE Preserve destination
E4B1 LDIR Copy
E4B3 POP DE Restore destination
E4B4 INC D Scanline increment
E4B5 LD A,D
E4B6 AND $07
E4B8 JR NZ,draw_endshot_1
E4BA LD A,E
E4BB ADD A,$20
E4BD LD E,A
E4BE JR C,draw_endshot_1
E4C0 LD A,D
E4C1 SUB $08
E4C3 LD D,A
draw_endshot_1 E4C4 POP BC Restore counter
E4C5 DJNZ draw_endshot_0 Loop while counter
E4C7 POP DE Restore destination
E4C8 LD A,D Turn the destination's high byte into the matching backbuffer attribute address
E4C9 RRCA
E4CA RRCA
E4CB RRCA
E4CC AND $03
E4CE ADD A,$EF
E4D0 LD D,A
E4D1 LD A,$08 8 rows of attributes
e4d3_loop E4D3 LD BC,$000D Copy 13 attribute bytes
E4D6 LDIR
E4D8 LD C,$13 DE += 19 (a gap value - 13+19 = 32)
E4DA EX DE,HL
E4DB ADD HL,BC
E4DC EX DE,HL
E4DD DEC A A--
E4DE JR NZ,e4d3_loop Loop
E4E0 RET Return
Prev: E46D Up: Map Next: E4E1