Prev: 8323 Up: Map Next: 834B
8324: routine02
routine02 8324 CALL get_wizard_object Get address of first sprite pointer in wizard object data of current player.
8327 LD B,$04 Set B to four as a loop counter and push to stack.
routine02_0 8329 PUSH BC
832A LD B,$02 Set B to two as another counter and push to stack.
routine02_1 832C PUSH BC
832D LD HL,(current_character_pointer) Load current_character_pointer into HL.
8330 LD A,(HL) Read low byte of sprite data pointer to A first time, high byte on second time around loop.
8331 INC HL Increment HL and store back in current_character_pointer.
8332 LD (current_character_pointer),HL
8335 LD HL,(temp_pointer) Store the low byte of sprite data pointer in wizard data object at the address held in temp_pointer. Second time around loop high byte is stored.
8338 LD (HL),A
8339 INC HL Increment HL and store back in temp_pointer.
833A LD (temp_pointer),HL
833D POP BC Pop loop counter and repeat inner loop.
833E DJNZ routine02_1
8340 LD HL,(temp_pointer) Increment address in temp_pointer because there is a byte gap between each sprite pointer in wizard object data.
8343 INC HL
8344 LD (temp_pointer),HL
8347 POP BC Pop loop counter and repeat outer loop three times before returning.
8348 DJNZ routine02_0
834A RET
Prev: 8323 Up: Map Next: 834B