Prev: 39748 Up: Map Next: 39812
39780: Draw Bottom Left Corner
Used by the routine at Draw_Room.
Draws the bottom left corner of the frame of the room if bit 5 of the frame flags is set, or clears its area if it is not.
The corner is drawn at x position 0 y position 160 by Draw_Corner_Shape. Its shape depends on whether the floor (bit 4) and the left wall (bit 6) are present.
Input
DE Frame flags of the room in E
IX Object record of Sabreman
Draw_Bottom_Left_Corner 39780 PUSH DE Stash the frame flags on the stack.
39781 LD HL,40960 Set the x position to 0 and the y position to 160 (40960).
39784 LD A,E Copy the frame flags to A.
39785 LD DE,39812 Point at the table of corner shapes (Bottom_Left_Corner_Table).
39788 BIT 5,A Jump to 39795 to clear the area if the corner is not present.
39790 JP Z,Clear_Panel
39792 SBC A,C
39793 PUSH HL Stash the position on the stack.
39794 EX DE,HL Exchange the registers so that HL holds the address of the table.
39795 BIT 4,A Jump to Draw_Bottom_Left_Corner_Check_Left_Wall if the floor is not present.
39797 JR Z,Draw_Bottom_Left_Corner_Check_Left_Wall
39799 INC HL Skip the shapes for a floor.
39800 INC HL
Draw_Bottom_Left_Corner_Check_Left_Wall 39801 BIT 6,A Jump to Draw_Bottom_Left_Corner_Draw_Shape if the left wall is not present.
39803 JR Z,Draw_Bottom_Left_Corner_Draw_Shape
39805 INC HL Skip the shapes for a left wall.
39806 INC HL
39807 INC HL
39808 INC HL
Draw_Bottom_Left_Corner_Draw_Shape 39809 JP Draw_Corner_Shape Jump to Draw_Corner_Shape to draw the shape.
Prev: 39748 Up: Map Next: 39812