![]() |
Routines |
| Prev: 7F77 | Up: Map | Next: 7FA7 |
|
Used by the routine at DESCRIBE_LOCATION.
Looks the location up in the picture table at PICTURE_TABLE, takes the stream pointer out of the record and runs it. Does nothing at all if the byte at PICTURES_ON is zero: the pictures-off flag, which TITLE_WAIT (TITLE_WAIT) sets from the N key, so holding N there turns every picture off for the game. This is the only test standing between a location change and the whole of the drawing code.
|
||||||||
| DRAW_LOCATION_PICTURE | 7F78 | PUSH AF | ||||||
| 7F79 | LD A,(PICTURES_ON) | PICTURES_ON: nonzero to draw pictures at all (zero if N was held at the title) | ||||||
| 7F7C | AND A | |||||||
| 7F7D | JR NZ,DRAW_LOCATION_PICTURE_0 | |||||||
| 7F7F | LD A,$FF | |||||||
| 7F81 | LD (PICTURE_SHOWN),A | |||||||
| 7F84 | POP AF | |||||||
| 7F85 | RET | |||||||
| DRAW_LOCATION_PICTURE_0 | 7F86 | POP AF | ||||||
| 7F87 | PUSH AF | |||||||
| 7F88 | PUSH HL | |||||||
| 7F89 | PUSH BC | |||||||
| 7F8A | PUSH DE | |||||||
| 7F8B | PUSH IX | |||||||
| 7F8D | LD IX,PICTURE_TABLE | The picture table, indexed by location | ||||||
| 7F91 | CALL FIND_RECORD | Find this location's record; returns NZ if it has a picture | ||||||
| 7F94 | LD (PICTURE_SHOWN),A | |||||||
| 7F97 | LD L,(IX+$01) | HL = the stream pointer, from bytes 1 and 2 of the record | ||||||
| 7F9A | LD H,(IX+$02) | |||||||
| 7F9D | CALL NZ,RUN_PICTURE | Only run the stream if the lookup found a record | ||||||
| 7FA0 | POP IX | |||||||
| 7FA2 | POP DE | |||||||
| 7FA3 | POP BC | |||||||
| 7FA4 | POP HL | |||||||
| 7FA5 | POP AF | |||||||
| 7FA6 | RET | |||||||
| Prev: 7F77 | Up: Map | Next: 7FA7 |