Prev: DEE1 Up: Map Next: DF08
DEF7: Choose Row Attribute
Used by the routine at SetRowAttributes.
Chooses the attribute for the background of a map row: the one at SkyAttribute for the rows above row 0C and the one at UndergroundAttribute for the rows from row 0C down.
Input
A Map row
Output
A Attribute
ChooseRowAttribute DEF7 CP $0C Compare A with 0C.
DEF9 LD A,($DC95) The sky attribute.
DEFC LD B,A B=A.
DEFD JR C,ChooseRowAttribute_Store Jump to ChooseRowAttribute_Store if the carry flag is set.
DEFF LD A,($DC96) The underground attribute.
DF02 LD B,A B=A.
ChooseRowAttribute_Store DF03 LD A,B A=B.
DF04 LD ($5C3B),A Update the bottom-tile colour.
DF07 RET Return.
Prev: DEE1 Up: Map Next: DF08