![]() |
Routines |
Prev: 28812 | Up: Map | Next: 28855 |
H | Character number (183-214) |
28814 | CALL 28767 | Check for closed doors in the character's path |
28817 | JP NC,25012 | Update SRB if no doors need opening |
28820 | LD A,H | A=character number (183-214) |
28821 | SUB 200 | Are we dealing with a teacher or ALBERT (i.e. someone who can open doors)? |
28823 | CP 6 | |
28825 | JR C,28833 | Jump if so |
28827 | CALL 25012 | Update SRB for the character's current animatory state and location |
28830 | XOR 128 | Characters who can't open doors have bit 7 of their animatory state flipped (i.e. they are turned around) |
28832 | 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.
|
||
28833 | 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 25944:
|
||
28834 | LD L,19 | Place the identifier of the closed door (see 28767) into byte 19 of the character's buffer |
28836 | LD (HL),C | |
28837 | INC L | L=20 |
28838 | LD (HL),1 | Signal: open the door |
28840 | LD L,18 | Place the address of the routine at 28855 into bytes 17 and 18 of the character's buffer |
28842 | LD (HL),112 | |
28844 | DEC L | |
28845 | LD (HL),183 | |
28847 | CALL 25012 | Update SRB for the character's current animatory state and location |
28850 | OR 7 | A=animatory state of character with arm up (to open door) |
28852 | JP 24880 | Update SRB for the character's new animatory state |
Prev: 28812 | Up: Map | Next: 28855 |