![]() |
Routines |
| Prev: 9AF0 | Up: Map | Next: 9B18 |
|
Used by the routine at Draw_Room.
Draws the bottom right corner of the frame of the room if bit 3 of the frame flags is set, or clears its area if it is not.
The corner is drawn at x position E8 y position A0 by Draw_Corner_Shape. Its shape depends on whether the floor (bit 4) and the right wall (bit 2) are present.
|
||||||||||
| Draw_Bottom_Right_Corner | 9AF8 | PUSH DE | Stash the frame flags on the stack. | |||||||
| 9AF9 | LD HL,$A0E8 | Set the x position to E8 and the y position to A0 (A0E8). | ||||||||
| 9AFC | LD A,E | Copy the frame flags to A. | ||||||||
| 9AFD | LD DE,$9B18 | Point at the table of corner shapes (Bottom_Right_Corner_Table). | ||||||||
| 9B00 | BIT 3,A | Jump to 9B07 to clear the area if the corner is not present. | ||||||||
| 9B02 | JP Z,Clear_Panel | |||||||||
| 9B04 | SBC A,C | |||||||||
| 9B05 | PUSH HL | Stash the position on the stack. | ||||||||
| 9B06 | EX DE,HL | Exchange the registers so that HL holds the address of the table. | ||||||||
| 9B07 | BIT 4,A | Jump to Draw_Bottom_Right_Corner_Check_Right_Wall if the floor is not present. | ||||||||
| 9B09 | JR Z,Draw_Bottom_Right_Corner_Check_Right_Wall | |||||||||
| 9B0B | INC HL | Skip the shapes for a floor. | ||||||||
| 9B0C | INC HL | |||||||||
| Draw_Bottom_Right_Corner_Check_Right_Wall | 9B0D | BIT 2,A | Jump to Draw_Bottom_Right_Corner_Draw_Shape if the right wall is not present. | |||||||
| 9B0F | JR Z,Draw_Bottom_Right_Corner_Draw_Shape | |||||||||
| 9B11 | INC HL | Skip the shapes for a right wall. | ||||||||
| 9B12 | INC HL | |||||||||
| 9B13 | INC HL | |||||||||
| 9B14 | INC HL | |||||||||
| Draw_Bottom_Right_Corner_Draw_Shape | 9B15 | JP Draw_Corner_Shape | Jump to Draw_Corner_Shape to draw the shape. | |||||||
| Prev: 9AF0 | Up: Map | Next: 9B18 |