Prev: F058 Up: Map Next: F092
F063: Draw Colour Ring
Used by the routine at Draw_Concentric_Rings.
Draws one rectangular colour ring with its top-left corner at column B, row C. The horizontal edges span columns B to FF-B and are drawn via Fill_Row; the vertical edges span rows C to BF-C and are drawn via Fill_Column.
Input
BC Corner offset (B = column, C = row)
Draw the top and bottom horizontal edges.
Draw_Colour_Ring F063 LD H,B Load the corner position into HL and copy the column to A.
F064 LD L,C
F065 LD A,B
F066 SLA A Calculate the horizontal edge length as 0100 minus 2 times the column offset.
F068 NEG
F06A LD D,A
F06B PUSH BC Stash the corner, draw the top edge rightward via Fill_Row, and restore.
F06C CALL Fill_Row
F06F POP BC
F070 LD H,B Set the position to the bottom edge at row BF minus C.
F071 LD A,$BF
F073 SUB C
F074 LD L,A
F075 PUSH BC Stash the corner, draw the bottom edge rightward via Fill_Row, and restore.
F076 CALL Fill_Row
F079 POP BC
Draw the left and right vertical edges.
F07A LD H,B Reset the corner position and calculate the vertical edge length as C0 minus 2 times the row offset.
F07B LD L,C
F07C LD E,C
F07D SLA E
F07F LD A,$C0
F081 SUB E
F082 LD D,A
F083 PUSH BC Stash the corner, draw the left edge downward via Fill_Column, and restore.
F084 CALL Fill_Column
F087 POP BC
F088 LD L,C Set the position to the right edge at column FF minus B.
F089 LD A,B
F08A CPL
F08B LD H,A
F08C PUSH BC Stash the corner, draw the right edge downward via Fill_Column, and restore.
F08D CALL Fill_Column
F090 POP BC
F091 RET Return.
Prev: F058 Up: Map Next: F092