Prev: $2B3F Up: Map Next: $2B9F
$2B52: Make BOY WONDER fire his catapult (3)
This corresponds to $7048 in the ZX Spectrum version.
The address of this uninterruptible subcommand routine is placed into BOY WONDER's buffer by the routine at $2B3F.
$2B52 LDA #$2B Replace the address of this uninterruptible subcommand routine in BOY WONDER's buffer with that of $2B9F.
$2B54 STA $B1
$2B56 LDA #$9F
$2B58 STA $B0
$2B5A LDA #$12 Character number $12 is BOY WONDER's pellet.
$2B5C STA $DC Store this character number at $DC temporarily.
$2B5E LDA #$10 Character number $10 is BOY WONDER.
$2B60 STA $DB Store this character number at $DB temporarily.
This entry point is used by the routine at $191B to initialise ERIC's catapult pellet.
$2B62 LDA $26 Pick up the character's animatory state from $26 and store it at $0A.
$2B64 STA $0A
$2B66 LDA $FC Pick up the character's x-coordinate from $FC and store it at $0B.
$2B68 STA $0B
$2B6A LDA $FB Pick up the character's y-coordinate from $FB and store it at $0C.
$2B6C STA $0C
$2B6E JSR $33BF Restore the character's buffer from page 0.
$2B71 LDA $DC Pick up the pellet's character number from $DC.
$2B73 STA $60 Update the current character number at $60.
$2B75 JSR $3279 Copy the pellet's character buffer into page 0.
$2B78 LDA #$0F Place the address of the uninterruptible subcommand routine at $0FBA into the pellet's buffer.
$2B7A STA $B1
$2B7C LDA #$BA
$2B7E STA $B0
$2B80 LDA #$0D Initialise the distance remaining of the pellet's flight at $B2.
$2B82 STA $B2
$2B84 LDA $0B Initialise the pellet's x-coordinate at $FC.
$2B86 STA $FC
$2B88 LDA $0C Initialise the pellet's y-coordinate at $FB.
$2B8A STA $FB
$2B8C LDA $0A Initialise the pellet's animatory state at $26 to $7F (flying left) or $FF (flying right).
$2B8E ORA #$7F
$2B90 STA $26
$2B92 JSR $33BF Restore the pellet's buffer from page 0.
$2B95 LDA $DB Restore the original character number at $60.
$2B97 STA $60
$2B99 JSR $3279 Copy the firing character's buffer into page 0.
$2B9C JMP $2BAF Return.
Prev: $2B3F Up: Map Next: $2B9F