Routines |
Prev: $1640 | Up: Map | Next: $16D0 |
$169B | LDA #$8B | Prepare to address the buffer for ERIC's pellet at $8B60. | ||
$169D | STA $4F | |||
$169F | LDA #$60 | |||
$16A1 | STA $4E | |||
$16A3 | LDY #$01 | Pick up the pellet's x-coordinate. | ||
$16A5 | LDA ($4E),Y | |||
$16A7 | CMP #$80 | Is the pellet already airborne? | ||
$16A9 | BCC $16CF | Return if so. | ||
$16AB | LDX #$01 | Bit 0 set (ERIC is firing the catapult). | ||
$16AD | LDY #$08 | $08 is the animatory state of ERIC raising the catapult. | ||
$16AF | LDA #$18 | This will initialise the catapult-firing action timer to $18. | ||
This entry point is used by the routines at $16D0 (with A=$10, X=$02 and Y=$0C when ERIC has just jumped), $16DF (with A=$12, X=$04 and Y=$0A when ERIC has just begun to throw a punch) and $19A5 (with A=$0A, X=$08 and Y=$0D when ERIC has just started writing on a blackboard).
|
||||
$16B1 | STA $FE | Initialise ERIC's action timer at $FE. | ||
$16B3 | LDA $14 | Pick up ERIC's posture indicator from $14. | ||
$16B5 | BEQ $16CF | Return unless ERIC is standing up. | ||
$16B7 | STX $2B | Update ERIC's status flags at $2B. | ||
$16B9 | TYA | Transfer ERIC's next animatory state to A. | ||
$16BA | PHA | Save it temporarily. | ||
$16BB | JSR $322E | Update the SRB for ERIC's current animatory state. | ||
$16BE | LDA $26 | Pick up ERIC's current animatory state from $26 and store it at $D2. | ||
$16C0 | STA $D2 | |||
$16C2 | AND #$80 | Clear all but the direction bit (bit 7). | ||
$16C4 | STA $26 | Save this base animatory state at $26. | ||
$16C6 | PLA | Restore ERIC's next animatory state to A. | ||
$16C7 | CLC | Adjust bit 7 according to the direction ERIC's facing. | ||
$16C8 | ADC $26 | |||
$16CA | STA $26 | Save the new animatory state with the correct bit 7. | ||
$16CC | JSR $322E | Update the SRB for ERIC's new animatory state. | ||
$16CF | RTS |
Prev: $1640 | Up: Map | Next: $16D0 |