Skool Daze Routines
31739: Move character looking for ERIC one step in the right direction
Used by the routine at 63374. The address of this routine is also placed in bytes 105 and 106 of a character's buffer by the routine at 31768.
H Number of character looking for ERIC (161, 163-166)
31739 LD L,105 Replace the address of this routine in bytes 105 and 106 of the character's buffer (if present) with that of 31648
31741 LD (HL),160
31743 CALL 25108 Update SRB for current location of character
31746 LD L,108 D=character's new y-coordinate (adjusted by the value in byte 108 of his buffer)
31748 LD B,A
31749 LD A,D
31750 ADD A,(HL)
31751 LD D,A
31752 DEC L E=character's new x-coordinate (adjusted by the value in byte 107 of his buffer)
31753 LD A,E
31754 ADD A,(HL)
31755 LD E,A
31756 LD A,(HL) A=character's new animatory state
31757 ADD A,B
31758 AND 3
31760 LD C,A
31761 LD A,B
31762 AND 252
31764 ADD A,C
31765 JP 25008 Update character's animatory state and location and update SRB