Prev: AFD5 Up: Map Next: AFE4
AFDB: Jump through a table of addresses
Doubles the index, adds the base, loads the word there and jumps to it. The object dispatch uses it, and so do the other tables of routines: the finale sparks' directions at dX_dY_tbl, the guards' patrol directions, the arch nudges and the player's movement.
Input
L the index
BC the base of a table of words
jump_to_tbl_entry AFDB LD H,$00 HL = base + 2 * index
AFDD ADD HL,HL
AFDE ADD HL,BC
AFDF LD A,(HL) fetch the address and go
AFE0 INC HL
AFE1 LD H,(HL)
AFE2 LD L,A
AFE3 JP (HL)
Prev: AFD5 Up: Map Next: AFE4