![]() |
Routines |
| Prev: E4F7 | Up: Map | Next: E582 |
|
Used by the routines at TITLE_SCREEN and ROOMST.
Called by ROOMST for every room entered, and by TITLE_SCREEN for the title (room 79, put in IY+$34 for the purpose), for GAME OVER (room 1) and at the end of the quest (room 81). The flag that says the room's objects have been placed (bit 0 of IY+$3C) is cleared, so that its $E4 $04 or $E4 $05 places them once however many parts it draws; the room is found by walking the table at ROOM1 from room 1, each record's first word its length; the drawing variables are set from ROOM_DEFAULTS; and the room is drawn from its colour byte on (DRAW_ROOM_RECORD).
Stage 1 called it DRAW_ROOM_NUMBER, which reads as if it drew a number.
|
||||
| DRAW_CURRENT_ROOM | E55B | RES 0,(IY+OBJECTS_PLACED-V) | Let the room place its objects again (MORE_ROOM_COMMANDS, room code $E4 $04 or $05). | |
| E55F | LD HL,ROOM1 | Find the room's record: room n is the nth, each skipped by its length. | ||
| E562 | XOR A | |||
| DRAW_CURRENT_ROOM_0 | E563 | LD E,(HL) | ||
| E564 | INC HL | |||
| E565 | LD D,(HL) | |||
| E566 | DEC HL | |||
| E567 | INC A | |||
| E568 | CP (IY+ROOM-V) | |||
| E56B | JR Z,DRAW_CURRENT_ROOM_1 | |||
| E56D | ADD HL,DE | |||
| E56E | JR DRAW_CURRENT_ROOM_0 | |||
| DRAW_CURRENT_ROOM_1 | E570 | INC HL | IX: the room's colour byte, after the length. | |
| E571 | INC HL | |||
| E572 | PUSH HL | |||
| E573 | POP IX | |||
| E575 | LD HL,ROOM_DEFAULTS | The drawing variables' starting values, into IY+$5F to IY+$72. | ||
| E578 | LD DE,ORIGIN | |||
| E57B | LD BC,$0014 | |||
| E57E | LDIR | |||
| E580 | JR DRAW_ROOM_RECORD | Draw it. | ||
| Prev: E4F7 | Up: Map | Next: E582 |