Prev: 32631 Up: Map Next: 32679
32632: Drawing Routine
Used by the routine at YouSeeStart.
Draws a location picture from its line, fill and attribute commands. Nothing is drawn when the picture switch is off, and a dark place is forced black. See Location Graphics Decoding.
Drawing 32632 PUSH AF Save AF and jump to Drawing_Check if the picture switch at 46855 is not zero.
32633 LD A,(46855)
32636 AND A
32637 JR NZ,Drawing_Check
32639 LD A,255 Write 255 to LocationID.
32641 LD (32631),A
32644 POP AF Restore AF from the stack.
32645 RET Return.
Drawing Check
Drawing_Check 32646 POP AF Keep the saved flags, save the registers, and point IX at the location graphics table.
32647 PUSH AF
32648 PUSH HL
32649 PUSH BC
32650 PUSH DE
32651 PUSH IX
32653 LD IX,52224
32657 CALL IndexIdTable Call IndexIdTable to look this id up. The zero flag is set when nothing matches.
32660 LD (32631),A Store the location ID at LocationID.
32663 LD L,(IX+1) Read the low byte of this location's graphics address.
32666 LD H,(IX+2) Read the high byte of this location's graphics address.
32669 CALL NZ,DrawingSetup If there is graphics data for this location then call DrawingSetup.
32672 POP IX Restore IX, DE, BC, HL and AF from the stack.
32674 POP DE
32675 POP BC
32676 POP HL
32677 POP AF
32678 RET Return.
Prev: 32631 Up: Map Next: 32679