Prev: 9168 Up: Map Next: 92BE
92AA: Calculate address of spells for current player.
Used by the routines at main_routine, TREPUT, CAST_S, routine06 and routine08.
GETHIS 92AA LD HL,possesssed_spell_tables Set HL to address of possesssed_spell_tables.
92AD LD A,(current_player) Load current_player into DE.
92B0 LD D,$00
92B2 LD E,A
92B3 LD B,$28 Set B to $28 (length of spell data for each wizard) as loop counter.
92B5 XOR A Set A to zero.
GETHIS_0 92B6 ADD HL,DE Add player number to address.
92B7 DJNZ GETHIS_0 Loop back to GETHIS_0 for $28 iterations so that HL points to correct wizard's spells.
92B9 INC HL Increment HL and store in HISPEL.
92BA LD (HISPEL),HL
92BD RET Return.
Prev: 9168 Up: Map Next: 92BE