![]() |
Routines |
| H | Character number (152-169) |
| 25488 | LD B,1 | Signal that the character is going down a staircase |
| 25490 | LD L,107 | Byte 107 holds the number of movements remaining |
| 25492 | DEC (HL) | Has the character finished going up or down the stairs? |
| 25493 | JP Z,25252 | Jump if so |
| 25496 | PUSH BC | |
| 25497 | CALL 25108 | Update SRB for current location of character |
| 25500 | POP BC | |
| 25501 | LD C,A | C=character's current animatory state |
| 25502 | INC A | A=character's next animatory state |
| 25503 | BIT 0,A | Is the character midstride right now? |
| 25505 | JR Z,25515 | Jump if so |
| 25507 | DEC D | |
| 25508 | INC B | B=0 now if we've come from 25484 and the character is not midstride |
| 25509 | JR Z,25512 | |
| 25511 | INC D |
| 25512 | JP 25008 | Update character's animatory state and location and update SRB |
| 25515 | RLCA | Set the carry flag if the character is facing left |
| 25516 | CCF | |
| 25517 | SBC A,A | A=0 (facing right) or -2 (facing left) |
| 25518 | ADD A,A | |
| 25519 | ADD A,E | Set E equal to the character's new x-coordinate |
| 25520 | LD E,A | |
| 25521 | INC E | |
| 25522 | LD A,C | A=character's current animatory state |
| 25523 | INC A | A=character's next animatory state |
| 25524 | BIT 1,A | Will the character be standing (stage 2)? |
| 25526 | JR NZ,25508 | Jump if so |
| 25528 | SUB 4 | Adjust the animatory state to standing (stage 1) |
| 25530 | JR 25508 |