![]() |
Routines |
| Prev: 39856 | Up: Map | Next: 39896 |
|
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 0 y position 16 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 | 39864 | PUSH DE | Stash the frame flags on the stack. | |||||||
| 39865 | LD HL,4096 | Set the x position to 0 and the y position to 16 (4096). | ||||||||
| 39868 | LD A,E | Copy the frame flags to A. | ||||||||
| 39869 | LD DE,39896 | Point at the table of corner shapes (Top_Left_Corner_Table). | ||||||||
| 39872 | BIT 7,A | Jump to 39879 to clear the area if the corner is not present. | ||||||||
| 39874 | JP Z,Clear_Panel | |||||||||
| 39876 | SBC A,C | |||||||||
| 39877 | PUSH HL | Stash the position on the stack. | ||||||||
| 39878 | EX DE,HL | Exchange the registers so that HL holds the address of the table. | ||||||||
| 39879 | BIT 0,A | Jump to Draw_Top_Left_Corner_Check_Left_Wall if the ceiling is not present. | ||||||||
| 39881 | JR Z,Draw_Top_Left_Corner_Check_Left_Wall | |||||||||
| 39883 | INC HL | Skip the shapes for a ceiling. | ||||||||
| 39884 | INC HL | |||||||||
| Draw_Top_Left_Corner_Check_Left_Wall | 39885 | BIT 6,A | Jump to Draw_Top_Left_Corner_Draw_Shape if the left wall is not present. | |||||||
| 39887 | JR Z,Draw_Top_Left_Corner_Draw_Shape | |||||||||
| 39889 | INC HL | Skip the shapes for a left wall. | ||||||||
| 39890 | INC HL | |||||||||
| 39891 | INC HL | |||||||||
| 39892 | INC HL | |||||||||
| Draw_Top_Left_Corner_Draw_Shape | 39893 | JP Draw_Corner_Shape | Jump to Draw_Corner_Shape to draw the shape. | |||||||
| Prev: 39856 | Up: Map | Next: 39896 |