![]() |
Routines |
Prev: 26380 | Up: Map | Next: 26496 |
H | Number of character interested in the board |
26453 | LD B,3 | Three blackboards on the top floors |
26455 | LD DE,54071 | The table at 54071 contains the x-coordinates of the left edges of the blackboards |
26458 | LD L,2 | Byte 2 of the character's buffer holds his y-coordinate |
26460 | LD A,(HL) | Pick this up in A |
26461 | DEC L | L=1 |
26462 | CP B | Is the character on the top floor? |
26463 | JR Z,26472 | Jump if so |
26465 | LD E,58 | DE=54074 |
26467 | DEC B | B=2 (two blackboards on the middle floor) |
26468 | CP 10 | Is the character on the middle floor? |
26470 | JR NZ,26484 | Jump if not |
26472 | LD A,(DE) | A=x-coordinate of the left end of a blackboard |
26473 | CP (HL) | Is the character to the left of this blackboard? |
26474 | JR NC,26484 | Jump if so |
26476 | ADD A,n | Is the character within n character spaces (n=4 usually, or 12 if coming from 28658) of the left of this blackboard? |
26478 | CP (HL) | |
26479 | JR NC,26486 | Jump if so |
26481 | INC E | Next blackboard |
26482 | DJNZ 26472 | |
26484 | SCF | Signal: the character is not standing at a blackboard |
26485 | RET | |
The character is standing close enough to the blackboard (to either write on it or start wiping it).
|
||
26486 | EX DE,HL | Now HL points to the blackboard info table |
26487 | LD A,(HL) | A=x-coordinate of the left end of the blackboard (from the table at 54071) |
26488 | INC H | |
26489 | LD B,(HL) | B=blackboard identifier (from the table at 54327) |
26490 | INC H | |
26491 | LD H,(HL) | H=y-coordinate of the top row of the blackboard (from the table at 54583) |
26492 | LD L,A | Pass the x-coordinate to L |
26493 | AND A | Clear the carry flag to indicate success |
26494 | EX DE,HL | DE=coordinates of the top-left corner of the blackboard |
26495 | RET |
x | ID | y | Room |
---|---|---|---|
3 | 84 | 3 | Blue Room |
41 | 90 | 3 | Yellow Room |
161 | 96 | 3 | Top-floor room in girls' skool |
32 | 102 | 9 | Science Lab |
161 | 108 | 9 | Middle-floor room in girls' skool |
Prev: 26380 | Up: Map | Next: 26496 |