Prev: 8964 Up: Map Next: 8985
8965: Draw the picture of a room, if it has one
Looks the room A up in the picture index at CC00. If there is a picture, it is drawn by 8985. The result of the search is stored at 8964, where 95B9 later looks to decide whether to wait for a key after the picture has been drawn.
Input
A Room number
8965 PUSH AF Save every register this uses
8966 PUSH HL
8967 PUSH BC
8968 PUSH DE
8969 PUSH IX
896B LD IX,$CC00 IX = the picture index
896F CALL $9D12 Does room A have a picture?
8972 LD ($8964),A Remember the answer for 95B9 to check afterwards
8975 LD L,(IX+$01) HL = the picture's own address, if there is one
8978 LD H,(IX+$02)
897B CALL NZ,$8985 If there is, draw it
897E POP IX Restore every saved register
8980 POP DE
8981 POP BC
8982 POP HL
8983 POP AF
8984 RET
Prev: 8964 Up: Map Next: 8985