Prev: 8E9A Up: Map Next: 8EDD
8E9B: Set the attributes for a crusher
Used by the routine at 8DCD.
8E9B LD IY,$C527 Get the Y co-ordinate.
8E9F LD A,(IY+$01)
8EA2 SUB $08 Convert this into a screen address and put it in HL.
8EA4 AND $F8
8EA6 RRCA
8EA7 RRCA
8EA8 RRCA
8EA9 LD B,$18
8EAB SUB B
8EAC NEG
8EAE DEC A
8EAF LD L,A
8EB0 LD H,$00
8EB2 ADD HL,HL Multiply by 16 to get an appropriate offset in the attribute buffer.
8EB3 ADD HL,HL
8EB4 ADD HL,HL
8EB5 ADD HL,HL
8EB6 ADD HL,HL
8EB7 LD DE,$5800 Add the base offset of the attribute buffer.
8EBA ADD HL,DE
8EBB LD E,(IY+$00) Put the X co-ordinate in DE.
8EBE LD D,$00
8EC0 ADD HL,DE Add this to get the correct attribute address.
8EC1 BIT 0,(IY+$04) Is the crusher ascending?
8EC5 JR Z,$8ED0 Move forward if so.
8EC7 SET 6,(HL) Turn on the brightness bit for the three colums in this row.
8EC9 INC HL
8ECA RES 6,(HL)
8ECC INC HL
8ECD RES 6,(HL)
8ECF RET Return.
The crusher is ascending, turn off the brightness.
8ED0 LD DE,$0020 Move up a row.
8ED3 ADD HL,DE
8ED4 SET 6,(HL) Turn off the brightness bits.
8ED6 INC HL
8ED7 SET 6,(HL)
8ED9 INC HL
8EDA SET 6,(HL)
8EDC RET Return.
Prev: 8E9A Up: Map Next: 8EDD