Routines |
Prev: $359E | Up: Map | Next: $364E |
Called from the main loop at $0800.
|
||||
$35EF | JSR $322E | Update the SRB for ERIC's current animatory state and location. | ||
$35F2 | LDA $26 | Pick up ERIC's animatory state from $26. | ||
$35F4 | ASL A | Is ERIC facing left? | ||
$35F5 | BCC $35FC | Branch if so. | ||
$35F7 | INC $FC | Increment ERIC's x-coordinate. | ||
$35F9 | JMP $35FE | Jump forward. | ||
$35FC | DEC $FC | Decrement ERIC's x-coordinate. | ||
$35FE | LDA $FB | Adjust ERIC's y-coordinate (by the increment previously stored at $11) if he's going down a staircase. | ||
$3600 | CLC | |||
$3601 | ADC $11 | |||
$3603 | STA $FB | |||
$3605 | LDA $FC | Pick up ERIC's new x-coordinate from $FC. | ||
$3607 | AND #$01 | Store 0 or 2 at $57, according as ERIC's new x-coordinate is even or odd. | ||
$3609 | ASL A | |||
$360A | STA $57 | |||
$360C | LDA $26 | Update ERIC's animatory state to the appropriate walking phase depending on his new x-coordinate. | ||
$360E | AND #$FC | |||
$3610 | CLC | |||
$3611 | ADC $57 | |||
$3613 | STA $26 | |||
$3615 | JSR $322E | Update the SRB for ERIC's new animatory state and location. | ||
$3618 | JSR $33BF | Restore ERIC's character buffer from page 0. | ||
$361B | JSR $31EA | Update the display. | ||
$361E | LDA #$01 | Set voice #3 attack length to 2ms and decay length to 24ms. | ||
$3620 | STA $D413 | |||
$3623 | LDA #$81 | Set voice #3 control register: voice on, attack-decay-sustain cycle; noise enabled. | ||
$3625 | STA $D412 | |||
$3628 | LDA $FC | Pick up ERIC's x-coordinate. | ||
$362A | SEC | Subtract the x-coordinate of the leftmost column of the skool on screen. | ||
$362B | SBC $58 | |||
$362D | CMP #$07 | Is ERIC 7 character cells from the left of the screen? | ||
$362F | BNE $363B | Branch if not. | ||
$3631 | LDA $58 | Pick up the x-coordinate of the leftmost column of the skool on screen. | ||
$3633 | BEQ $364D | Return if it's 0 (the play area window will not shift). | ||
$3635 | JSR $3072 | Shift the play area window left. | ||
$3638 | JMP $364D | Return. | ||
$363B | LDA $FC | Pick up ERIC's x-coordinate. | ||
$363D | SEC | Subtract the x-coordinate of the leftmost column of the skool on screen. | ||
$363E | SBC $58 | |||
$3640 | CMP #$1F | Is ERIC 31 character cells from the left of the screen? | ||
$3642 | BNE $364D | Return if not (the play area window will not shift). | ||
$3644 | LDA $59 | Pick up the x-coordinate of the leftmost column of the skool off screen. | ||
$3646 | CMP #$60 | Is it 96? | ||
$3648 | BEQ $364D | Branch if so (the play area window will not shift). | ||
$364A | JSR $3113 | Shift the play area window right. | ||
$364D | RTS |
Prev: $359E | Up: Map | Next: $364E |