H | Character number (183-214) |
28814 | CD5F70 | CALL 28767 | Check for closed doors in character's path |
28817 | D2B461 | JP NC,25012 | Jump to update SRB if no doors need opening |
28820 | 7C | LD A,H | A=character number (183-214) |
28821 | D6C8 | SUB 200 | |
28823 | FE06 | CP 6 | Are we dealing with a teacher or ALBERT (i.e. someone who can open doors)? |
28825 | 3806 | JR C,28833 | Jump if so |
28827 | CDB461 | CALL 25012 | Update SRB for current animatory state and location of character |
28830 | EE80 | XOR 128 | Characters who can't opened doors are turned around |
28832 | C9 | RET |
28833 | D1 | POP DE | Drop the return address |
28834 | 2E13 | LD L,19 | |
28836 | 71 | LD (HL),C | The single bit set in C identifies the door to be opened |
28837 | 2C | INC L | |
28838 | 3601 | LD (HL),1 | Signal: open the door |
28840 | 2E12 | LD L,18 | Put the address of the routine at 28855 into bytes 17 and 18 of the character's buffer |
28842 | 3670 | LD (HL),112 | |
28844 | 2D | DEC L | |
28845 | 36B7 | LD (HL),183 | |
28847 | CDB461 | CALL 25012 | Update SRB for current animatory state and location of character |
28850 | F607 | OR 7 | A=animatory state of character with arm up (to open door) |
28852 | C33061 | JP 24880 | Update SRB for this new animatory state of character |