Prev: 82C0 Up: Map Next: 831F
8300: Get address of the wizard object data of the current player.
Used by the routines at routine02, magic_bow_spell, shadow_form_spell and main_routine.
get_wizard_object 8300 PUSH HL Preserve contents of HL.
8301 LD A,(current_player) Add 40 to current_player variable.
8304 LD B,$00
8306 ADD A,$28
8308 SLA A Multiply by two.
830A LD C,A Add to address of object address table to give address of current player's object pointer in HL.
830B LD HL,nothing_pointer
830E ADD HL,BC
830F LD E,(HL) Read address of wizard object into DE.
8310 INC HL
8311 LD D,(HL)
8312 EX DE,HL Swap address into HL and store in player_name_string.
8313 LD DE,$0017
8316 LD (player_name_string),HL
8319 ADD HL,DE Add $17 to address and store in temp_pointer.
831A LD (temp_pointer),HL
831D POP HL Restore contents of HL and return.
831E RET
Prev: 82C0 Up: Map Next: 831F