![]() |
Routines |
| A | Character's animatory state |
| DE | Character's coordinates |
| H | Character number (152-169) |
| 27632 | BIT 7,A | Is the character facing right? |
| 27634 | LD A,D | A=character's y-coordinate |
| 27635 | JR NZ,27694 | Jump if so |
| 27637 | CP 155 | 155=top floor |
| 27639 | LD A,E | A=character's x-coordinate |
| 27640 | JR NZ,27666 | Jump if the character's on the middle floor |
| 27642 | CP 58 | Is the character to the right of the Map Room wall? |
| 27644 | JR NC,27659 | Jump if so |
| 27646 | CP 48 | 48=x-coordinate of leftmost chair in the Reading Room |
| 27648 | RET C | Return if the character is to the left of this |
| 27649 | NOP | |
| 27650 | CP 56 | 56=x-coordinate of rightmost chair in Reading Room |
| 27652 | JR Z,27655 | Jump if the character is beside the rightmost chair in the room |
| 27654 | RET NC | Return if the character is to the right of this chair |
| 27655 | AND A | |
| 27656 | BIT 0,A | Return with the zero flag set if the character is standing beside a chair |
| 27658 | RET |
| 27659 | CP 64 | 64=x-coordinate of leftmost chair in Map Room |
| 27661 | RET C | Return if the character is to the left of this |
| 27662 | CP 72 | 72=x-coordinate of rightmost chair in Map Room |
| 27664 | JR 27652 |
| 27666 | CP 39 | Is the character to the right of the Exam Room wall? |
| 27668 | JR NC,27678 | Jump if so |
| 27670 | CP 29 | 29=x-coordinate of leftmost chair in the White Room |
| 27672 | RET C | Return if the character is to the left of this |
| 27673 | INC A | 37=x-coordinate of rightmost chair in the White Room |
| 27674 | CP 38 | |
| 27676 | JR 27652 |
| 27678 | CP 43 | 43=x-coordinate of leftmost chair in the Exam Room |
| 27680 | RET C | Return if the character is to the left of this |
| 27681 | CP 60 | 60=x-coordinate of left end of first set of chairs in the Exam Room |
| 27683 | JR C,27689 | Jump if the character is to the left of this |
| 27685 | CP 68 | 68=x-coordinate of rightmost chair in the Exam Room |
| 27687 | JR 27652 |
| 27689 | INC A | 53=x-coordinate of the right end of the second set of chairs in the Exam Room |
| 27690 | CP 54 | |
| 27692 | JR 27652 |
| 27694 | CP 155 | 155=top floor |
| 27696 | LD A,E | A=character's x-coordinate |
| 27697 | JR NZ,27714 | Jump if the character is on the middle floor |
| 27699 | CP 58 | 58=x-coordinate of wall between Reading and Map Rooms |
| 27701 | JR NC,27710 | Jump if the character is to the right of this |
| 27703 | CP 55 | 55=x-coordinate of spot between the two rightmost chairs in the Reading Room; if this were 'CP 56' instead, kids would be able to find the rightmost seat in the room |
| 27705 | CCF | Clear the carry flag if the character is to the left of the rightmost chair in the room (i.e. he's still on his way there) |
| 27706 | RET NZ | Return unless the character is beside the rightmost chair in the room |
| 27707 | AND A | Set the carry flag to indicate that the character should turn round |
| 27708 | CCF | |
| 27709 | RET | |
| 27710 | CP 72 | 72=x-coordinate of rightmost seat in the Map Room |
| 27712 | JR 27705 | |
| 27714 | CP 39 | 39=x-coordinate of wall between White and Exam Rooms |
| 27716 | JR NC,27722 | Jump if the character is to the right of this |
| 27718 | CP 37 | 37=x-coordinate of the rightmost chair in the White Room |
| 27720 | JR 27705 | |
| 27722 | CP 68 | 68=x-coordinate of rightmost chair in the Exam Room |
| 27724 | JR 27705 |