Prev: 9500 Up: Map Next: 9588
952E: Draws the picture for a gallery.
Used by the routine at Bg_CalcAndDraw.
Input
Output
Gallery_DrawPicture 952E LD A,(Bg_ColumnsLeft)
9531 AND A
9532 JP Z,Bg_BlitItemColumn
9535 CP $04
9537 JP Z,Bg_BlitItemColumn
Blit characters into picture frame.
953A LD A,(IX+$00) Calculate address of array that holds the block images indicies.
953D SUB $82
953F LD B,A
9540 ADD A,A
9541 ADD A,A
9542 ADD A,A
9543 ADD A,B
9544 LD E,A
9545 LD D,$00
9547 LD HL,PictureMatrix_Gallery
954A ADD HL,DE
954B EX DE,HL
954C LD HL,(BmpInfo82_PictureFrame) Get start position within picture frame. This is where the first char will be drawn to.
954F LD BC,$0029
9552 ADD HL,BC
9553 LD A,$03 Number of chars down.
Gallery_DrawPicture_0 9555 PUSH AF
9556 EX DE,HL
9557 LD B,$03 Number of chars across.
Gallery_DrawPicture_1 9559 PUSH BC
955A PUSH HL
955B PUSH DE
955C LD L,(HL) Get index of next image and convert into address of bitmap.
955D LD H,$00
955F ADD HL,HL
9560 ADD HL,HL
9561 ADD HL,HL
9562 LD BC,Charset_Start
9565 ADD HL,BC
Draw one char block.
9566 LD BC,$0809 8 scans, copying the image.
Gallery_DrawPicture_2 9569 LDI
956B LD A,E Next scan down within bitmap.
956C ADD A,$04
956E LD E,A
956F LD A,D
9570 ADC A,$00
9572 LD D,A
9573 DJNZ Gallery_DrawPicture_2
Next block along.
9575 POP DE
9576 INC DE
9577 POP HL
9578 INC HL
9579 POP BC
957A DJNZ Gallery_DrawPicture_1
Next block down.
957C LD BC,$0025
957F EX DE,HL
9580 ADD HL,BC
9581 POP AF
9582 DEC A
9583 JR NZ,Gallery_DrawPicture_0
9585 JP Bg_BlitItemColumn
Prev: 9500 Up: Map Next: 9588