![]() |
Routines |
| B | 99 |
| DE | Character's coordinates |
| H | Character number (152-169) |
| L | 101 |
| 25700 | LD A,(HL) | A=y-coordinate of destination |
| 25701 | CP 162 | 162=middle floor |
| 25703 | LD A,38 | 38=x-coordinate of wall between White and Exam Rooms |
| 25705 | JR Z,25709 | Jump if the character is going to the middle floor |
| 25707 | LD A,57 | 57=x-coordinate of wall between Map and Reading Rooms |
| 25709 | INC L | Set the carry flag if the character is destined for some place to the right of the wall referred to by A |
| 25710 | CP (HL) | |
| 25711 | LD A,70 | 70=x-coordinate of bottom of staircases at right of skool |
| 25713 | JR C,25717 | Jump if the character must go to a staircase on the right |
| 25715 | LD A,19 | 19=x-coordinate of bottom of stairs at left of skool |
| 25717 | CP E | Jump unless the character is at the bottom of the staircase he must climb |
| 25718 | JP NZ,25627 | |
| 25721 | LD L,96 | Byte 96 holds the character's animatory state |
| 25723 | BIT 0,(HL) | Is the character midstride? |
| 25725 | JP NZ,25627 | Jump if so |
| 25728 | CP 48 | Is the character at the bottom of a right-side staircase? |
| 25730 | JR NC,25739 | Jump if so |
| 25732 | BIT 7,(HL) | Is the character facing right? |
| 25734 | JP NZ,25615 | Turn him round if so |
| 25737 | JR 25744 | |
| 25739 | BIT 7,(HL) | Is the character facing left? |
| 25741 | JP Z,25615 | Turn him round if so |
| 25744 | LD C,140 | Set BC=25484 (guide character up stairs) and place this routine address in bytes 105/106 of the buffer |
| 25746 | JP 25625 |