![]() |
Routines |
| Prev: 9BB0 | Up: Map | Next: 9BD8 |
|
Used by the routine at Draw_Room.
Draws the top left corner of the frame of the room if bit 7 of the frame flags is set, or clears its area if it is not.
The corner is drawn at x position 00 y position 10 by Draw_Corner_Shape. Its shape depends on whether the ceiling (bit 0) and the left wall (bit 6) are present.
|
||||||||||
| Draw_Top_Left_Corner | 9BB8 | PUSH DE | Stash the frame flags on the stack. | |||||||
| 9BB9 | LD HL,$1000 | Set the x position to 00 and the y position to 10 (1000). | ||||||||
| 9BBC | LD A,E | Copy the frame flags to A. | ||||||||
| 9BBD | LD DE,$9BD8 | Point at the table of corner shapes (Top_Left_Corner_Table). | ||||||||
| 9BC0 | BIT 7,A | Jump to 9BC7 to clear the area if the corner is not present. | ||||||||
| 9BC2 | JP Z,Clear_Panel | |||||||||
| 9BC4 | SBC A,C | |||||||||
| 9BC5 | PUSH HL | Stash the position on the stack. | ||||||||
| 9BC6 | EX DE,HL | Exchange the registers so that HL holds the address of the table. | ||||||||
| 9BC7 | BIT 0,A | Jump to Draw_Top_Left_Corner_Check_Left_Wall if the ceiling is not present. | ||||||||
| 9BC9 | JR Z,Draw_Top_Left_Corner_Check_Left_Wall | |||||||||
| 9BCB | INC HL | Skip the shapes for a ceiling. | ||||||||
| 9BCC | INC HL | |||||||||
| Draw_Top_Left_Corner_Check_Left_Wall | 9BCD | BIT 6,A | Jump to Draw_Top_Left_Corner_Draw_Shape if the left wall is not present. | |||||||
| 9BCF | JR Z,Draw_Top_Left_Corner_Draw_Shape | |||||||||
| 9BD1 | INC HL | Skip the shapes for a left wall. | ||||||||
| 9BD2 | INC HL | |||||||||
| 9BD3 | INC HL | |||||||||
| 9BD4 | INC HL | |||||||||
| Draw_Top_Left_Corner_Draw_Shape | 9BD5 | JP Draw_Corner_Shape | Jump to Draw_Corner_Shape to draw the shape. | |||||||
| Prev: 9BB0 | Up: Map | Next: 9BD8 |