Prev: 8C3D Up: Map Next: 8D2E
8D0F: Update the movement tables (across)
Used by the routine at 8C3D.
Input
HL Attribute in the current position
IY Pointer to movement table (8D54)
B Number of columns
8D0F LD DE,$C51A Get the list of attributes.
8D12 PUSH BC Remember BC
8D13 LD B,$04 Count four types.
8D15 LD A,(HL) Is the current attribute this one?
8D16 EX DE,HL
8D17 CP (HL)
8D18 JR Z,$8D50 If so, found the attribute we want.
8D1A INC (IY+$00) Increment the type of attribute looked for.
8D1D INC HL Move to the next attribute.
8D1E DJNZ $8D17 Repeat for the next four types.
8D20 EX DE,HL Restore HL to the start of the table.
8D21 POP BC Restore BC.
8D22 LD (IY+$00),$00 Set to no attribute found.
8D26 INC HL Move forward a column.
8D27 DJNZ $8D0F Repeat until all columns have been checked.
8D29 LD (IY+$00),$04 Mark this as empty space and return.
8D2D RET
Prev: 8C3D Up: Map Next: 8D2E