Prev: 57057 Up: Map Next: 57096
57079: 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 12 and the one at UndergroundAttribute for the rows from row 12 down.
Input
A Map row
Output
A Attribute
ChooseRowAttribute 57079 CP 12 Compare A with 12.
57081 LD A,(56469) The sky attribute.
57084 LD B,A B=A.
57085 JR C,ChooseRowAttribute_Store Jump to ChooseRowAttribute_Store if the carry flag is set.
57087 LD A,(56470) The underground attribute.
57090 LD B,A B=A.
ChooseRowAttribute_Store 57091 LD A,B A=B.
57092 LD (23611),A Update the bottom-tile colour.
57095 RET Return.
Prev: 57057 Up: Map Next: 57096