Prev: D3A7 Up: Map Next: D423
D400: Draw Poster Image
Used by the routine at DrawTownPanel.
Draws an image of thirty-two by eight pixels, as four bytes for each line, with the bottom line first. The addresses of the images are in PosterImagePointers.
poster-image
Input
A The number of the image
HL The screen address of the bottom left of the image
Find the image.
DrawPosterImage D400 EX DE,HL Keep the screen address in DE.
D401 LD BC,$6AC6 Point BC at PosterImagePointers.
Find the address of the image.
D404 CALL GetTableEntry Call GetTableEntry.
Read the image with the stack.
D407 LD ($A21D),SP Set SavedStackPointer.
D40B LD SP,HL Point the stack pointer at the image.
D40C EX DE,HL Put the screen address in HL.
D40D LD B,$08 Set a count of 08 lines.
Draw a line.
DrawPosterImage_Line D40F POP DE Draw the first two bytes of the line.
D410 LD (HL),E
D411 INC HL
D412 LD (HL),D
D413 INC HL
D414 POP DE Draw the next two bytes of the line.
D415 LD (HL),E
D416 INC HL
D417 LD (HL),D
D418 LD DE,$FEFD Move up one line, and back to the first byte.
D41B ADD HL,DE
D41C DJNZ DrawPosterImage_Line Jump to DrawPosterImage_Line if there are any left.
D41E LD SP,($A21D) Restore the stack pointer.
D422 RET Return.
Prev: D3A7 Up: Map Next: D423