Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Variables used:
- ; $F0 = Time to flutter jump
- If this is non-zero value, it will apply flutter effect
- ; $F1 = Flutter jump rest
- Amount of time left
- ; $F2 = Flutter carry
- Calculated player Y speed
- AD 7A 18 LDA.W $187A ; If player isn't on Yoshi...
- F0 ?? BEQ Reset ; ...stop the flutter jump
- A5 72 LDA $72 ; If player is on the ground...
- F0 ?? BEQ Reset ; ...stop the flutter jump
- A5 74 LDA $74 ; If player is climbing...
- 05 75 ORA $75 ; ...or swimming...
- D0 ?? BNE Reset ; ...stop the flutter jump
- A5 19 LDA $19 ; Load player powerup
- C9 02 CMP.B #$02 ; If player has cape...
- F0 ?? BEQ Reset ; ...stop the flutter jump
- A5 F0 LDA $F0 ; If player isn't flutter jumping...
- F0 ?? BEQ NoFlutter ; ...don't apply its effects
- A5 F2 LDA $F2 ; Load flutter carry
- 3A DEC A ; Decrement it
- 30 ?? BMI Label1 ; If player is supposed to be rising...
- 3A DEC A ; ...rise twice as fast
- :Label1
- 85 7D STA $7D ; Store into player Y speed
- 85 F2 STA $F2 ; Store into flutter carry
- A5 7B LDA $7B ; If player is moving left...
- 30 ?? BMI MoveLeft ; ...jump to code for moving left
- C9 20 CMP.B $#20 ; If player X speed < #$20 (not quite running, to the right)...
- 90 ?? BCC Label2 ; ...jump past speed-limiting code
- A9 20 LDA.B #$20 ; Load #$20 into A
- 80 ?? BRA Label2 ; Jump past code for moving left
- :MoveLeft
- C9 DF CMP.B $#DF ; If player X speed >= #$DF (not quite running, to the left)...
- B0 ?? BCS Label2 ; ...jump past speed-limiting code
- A9 DF LDA.B #$DF ; Load #$DF into A
- :Label2
- 85 7B STA $7B ; Store into player X speed
- A5 7D LDA $7D ; If player is falling...
- 10 ?? BPL Fluttered ; ...jump past flutter decrement
- C9 E0 CMP.B #$E0 ; If player is almost done rising...
- B0 ?? BCS Fluttered ; ...jump past flutter decrement
- C6 F0 DEC $F0 ; Decrement the flutter jump counter
- 80 ?? BRA Fluttered ; Don't run the resting code if we're flutter jumping
- :NoFlutter
- A5 F1 LDA $F1 ; If there is still flutter jump rest time...
- F0 ?? BEQ NoRest ; ...don't decrement the rest timer
- C6 F1 DEC $F1 ; Else, do
- :NoRest
- :Fluttered
- A5 15 LDA $15 ; Load some controller data
- 89 80 BIT.B #$80 ; If player isn't holding the jump button...
- F0 ?? BEQ EndOfMod ; ...skip to end of mod
- A5 7D LDA $7D ; If player is rising...
- 30 ?? BMI EndOfMod ; ...skip to end of mod
- C9 20 CMP #$20 ; If player is just starting to fall...
- 90 ?? BCC EndOfMod ; ...skip to end of mod
- 9C 0D 14 STZ.W $140D ; Disable spinjumping
- A5 F1 LDA $F1 ; If we are resting...
- D0 ?? BNE EndOfMod ; ...skip to end of mod
- A9 01 LDA.B #$01 ; Store the value #$01...
- 85 F0 STA $F0 ; ...into the flutter jump timer
- A5 7D LDA $7D ; Store the player Y speed...
- 85 F1 STA $F1 ; ...into the flutter carry
- A9 30 LDA.B #$30 ; Store the resting time...
- 85 F2 STA $F2 ; ...into the flutter rest timer
- A9 09 LDA.B #$09 ; Load sound #$09 (cape fly sound)
- 8D F9 1D STA.W #$1DF9 ; Play sound
- :EndOfMod
- 6B RTL ; End of mod code
- :Reset
- 64 F0 STZ $F0 ; Reset
- 64 F1 STZ $F1 ; every
- 64 F2 STZ $F2 ; flag
- 6B RTL ; .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement