![]() |
Routines |
| Prev: 25534 | Up: Map | Next: 25581 |
|
Used by the routines at 25700, 25843 and 32379. The value returned in A (corresponding to the location in DE) is as follows:
Or if the entry point at 25557 is used (for ERIC's location):
The carry flag is set upon return to the caller of this routine if the coordinates in DE correspond to a location on a staircase.
|
||||||||||||||||||||||||||||||||||||||||||||||||
| 25554 | CALL 28067 | Divert back to the calling routine with A=192 and the carry flag reset if the character is on the assembly hall stage; otherwise return here with B=182 and C=59 | ||||||||||||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at 32000 with ERIC's coordinates in DE, B=185, and C=59.
|
||||||||||||||||||||||||||||||||||||||||||||||||
| 25557 | LD A,D | A=y-coordinate | ||||||||||||||||||||||||||||||||||||||||||||||
| 25558 | INC B | Set B to 183 (186) if D<=6 (top floor), 184 (187) if 7<=D<=13 (middle floor), or 185 (188) if 14<=D<=18 (bottom floor) | ||||||||||||||||||||||||||||||||||||||||||||||
| 25559 | SUB 7 | |||||||||||||||||||||||||||||||||||||||||||||||
| 25561 | JR NC,25558 | |||||||||||||||||||||||||||||||||||||||||||||||
| 25563 | CP 252 | Does D=3, 10 or 17 (top, middle, bottom floor)? | ||||||||||||||||||||||||||||||||||||||||||||||
| 25565 | JR Z,25571 | Jump if so | ||||||||||||||||||||||||||||||||||||||||||||||
| 25567 | SCF | Signal: D does not correspond exactly to the top, middle or bottom floor | ||||||||||||||||||||||||||||||||||||||||||||||
| 25568 | NOP | |||||||||||||||||||||||||||||||||||||||||||||||
| 25569 | NOP | |||||||||||||||||||||||||||||||||||||||||||||||
| 25570 | NOP | |||||||||||||||||||||||||||||||||||||||||||||||
| 25571 | PUSH AF | Save the carry flag temporarily | ||||||||||||||||||||||||||||||||||||||||||||||
| 25572 | INC C | Point BC at the appropriate entry in one of the region tables | ||||||||||||||||||||||||||||||||||||||||||||||
| 25573 | LD A,(BC) | |||||||||||||||||||||||||||||||||||||||||||||||
| 25574 | INC C | |||||||||||||||||||||||||||||||||||||||||||||||
| 25575 | CP E | |||||||||||||||||||||||||||||||||||||||||||||||
| 25576 | JR C,25572 | |||||||||||||||||||||||||||||||||||||||||||||||
| 25578 | POP AF | Restore the carry flag (reset if D=3, 10 or 17; set otherwise) | ||||||||||||||||||||||||||||||||||||||||||||||
| 25579 | LD A,(BC) | A=region identifier (189-196 or 0-8; see the tables above) | ||||||||||||||||||||||||||||||||||||||||||||||
| 25580 | RET | |||||||||||||||||||||||||||||||||||||||||||||||
| Prev: 25534 | Up: Map | Next: 25581 |