Prev: 39343 Up: Map Next: 39397
39369: Draw Graphic Upright
The handler of DrawGraphic for a graphic that is drawn as it is stored. A row of bytes is copied at a time, and then ScreenPosition1PixelAbove moves up a line.
DrawGraphic_Upright 39369 POP BC Restore the attribute and graphic ID from the stack.
39370 CALL GetBlendInstruction Call GetBlendInstruction to get the instruction to mix the graphic with the screen.
39373 LD (39383),A Write it over the instruction at 39383.
39376 CALL GetGraphicDetails Call GetGraphicDetails to get the details of the graphic.
DrawGraphic_Upright_Row 39379 PUSH BC Stash the width and height on the stack.
39380 PUSH HL Stash the screen address on the stack.
DrawGraphic_Upright_Byte 39381 LD A,(DE) Fetch the next byte of the graphic.
39382 INC DE Move DE on to the next byte.
39383 NOP This is replaced by an instruction that mixes A with the screen.
39384 LD (HL),A Write A to the screen.
39385 INC L Move HL on to the next byte.
39386 DJNZ DrawGraphic_Upright_Byte Decrease the width by one and loop back to DrawGraphic_Upright_Byte until all of the bytes in the row have been drawn.
39388 POP HL Restore the screen address from the stack.
39389 CALL ScreenPosition1PixelAbove Call ScreenPosition1PixelAbove to move up a line.
39392 POP BC Restore the width and height from the stack.
39393 DEC C Decrease the height by one and loop back to DrawGraphic_Upright_Row until all of the rows have been done.
39394 JR NZ,DrawGraphic_Upright_Row
39396 RET Return.
Prev: 39343 Up: Map Next: 39397