Prev: 708C Up: Map Next: 70B7
708E: Check for a closed door in a character's path and open it if allowed
Used by the routine at 63ED. Checks for a closed door in the character's path and makes him open it if he's an adult.
Input
H Character number (0xB7-0xD1)
708E CALL $705F Check for closed doors in the character's path
7091 JP NC,$61B4 Update the SRB for the character's current animatory state and location if no doors need opening
7094 LD A,H A=character number
7095 SUB $C8 Are we dealing with a teacher or ALBERT (i.e. someone who can open doors)?
7097 CP $06
7099 JR C,$70A1 Jump if so
709B CALL $61B4 Update the SRB for the character's current animatory state and location
709E XOR $80 Characters who can't open doors have bit 7 of their animatory state flipped (i.e. they are turned around)
70A0 RET Return to place the character midstride
The character we're dealing with is confronted by a closed door and is able to open it.
70A1 POP DE Drop the return address; we will handle updating the SRB and setting the character's new animatory state here instead
This entry point is used by the routine at 6558.
70A2 LD L,$13 Place the identifier of the closed door (see 705F) into byte 0x13 of the character's buffer
70A4 LD (HL),C
70A5 INC L L=0x14
70A6 LD (HL),$01 Signal: open the door
This entry point is used by the routines at 717C and F46C.
70A8 LD L,$12 Place the address of the uninterruptible subcommand routine at 70B7 into bytes 0x11 and 0x12 of the character's buffer
70AA LD (HL),$70
70AC DEC L
70AD LD (HL),$B7
70AF CALL $61B4 Update the SRB for the character's current animatory state and location
70B2 OR $07 A=animatory state of the character with his arm up (to open the door)
70B4 JP $6130 Update the character's animatory state and update the SRB
Prev: 708C Up: Map Next: 70B7