Advertisement
Guest User

SMWJailbreak Mod: Flutter-Jump

a guest
Jun 25th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. ; Variables used:
  2. ; $F0 = Time to flutter jump
  3. If this is non-zero value, it will apply flutter effect
  4. ; $F1 = Flutter jump rest
  5. Amount of time left
  6. ; $F2 = Flutter carry
  7. Calculated player Y speed
  8. AD 7A 18 LDA.W $187A ; If player isn't on Yoshi...
  9. F0 ?? BEQ Reset ; ...stop the flutter jump
  10. A5 72 LDA $72 ; If player is on the ground...
  11. F0 ?? BEQ Reset ; ...stop the flutter jump
  12. A5 74 LDA $74 ; If player is climbing...
  13. 05 75 ORA $75 ; ...or swimming...
  14. D0 ?? BNE Reset ; ...stop the flutter jump
  15. A5 19 LDA $19 ; Load player powerup
  16. C9 02 CMP.B #$02 ; If player has cape...
  17. F0 ?? BEQ Reset ; ...stop the flutter jump
  18. A5 F0 LDA $F0 ; If player isn't flutter jumping...
  19. F0 ?? BEQ NoFlutter ; ...don't apply its effects
  20. A5 F2 LDA $F2 ; Load flutter carry
  21. 3A DEC A ; Decrement it
  22. 30 ?? BMI Label1 ; If player is supposed to be rising...
  23. 3A DEC A ; ...rise twice as fast
  24. :Label1
  25. 85 7D STA $7D ; Store into player Y speed
  26. 85 F2 STA $F2 ; Store into flutter carry
  27. A5 7B LDA $7B ; If player is moving left...
  28. 30 ?? BMI MoveLeft ; ...jump to code for moving left
  29. C9 20 CMP.B $#20 ; If player X speed < #$20 (not quite running, to the right)...
  30. 90 ?? BCC Label2 ; ...jump past speed-limiting code
  31. A9 20 LDA.B #$20 ; Load #$20 into A
  32. 80 ?? BRA Label2 ; Jump past code for moving left
  33. :MoveLeft
  34. C9 DF CMP.B $#DF ; If player X speed >= #$DF (not quite running, to the left)...
  35. B0 ?? BCS Label2 ; ...jump past speed-limiting code
  36. A9 DF LDA.B #$DF ; Load #$DF into A
  37. :Label2
  38. 85 7B STA $7B ; Store into player X speed
  39. A5 7D LDA $7D ; If player is falling...
  40. 10 ?? BPL Fluttered ; ...jump past flutter decrement
  41. C9 E0 CMP.B #$E0 ; If player is almost done rising...
  42. B0 ?? BCS Fluttered ; ...jump past flutter decrement
  43. C6 F0 DEC $F0 ; Decrement the flutter jump counter
  44. 80 ?? BRA Fluttered ; Don't run the resting code if we're flutter jumping
  45. :NoFlutter
  46. A5 F1 LDA $F1 ; If there is still flutter jump rest time...
  47. F0 ?? BEQ NoRest ; ...don't decrement the rest timer
  48. C6 F1 DEC $F1 ; Else, do
  49. :NoRest
  50. :Fluttered
  51. A5 15 LDA $15 ; Load some controller data
  52. 89 80 BIT.B #$80 ; If player isn't holding the jump button...
  53. F0 ?? BEQ EndOfMod ; ...skip to end of mod
  54. A5 7D LDA $7D ; If player is rising...
  55. 30 ?? BMI EndOfMod ; ...skip to end of mod
  56. C9 20 CMP #$20 ; If player is just starting to fall...
  57. 90 ?? BCC EndOfMod ; ...skip to end of mod
  58. 9C 0D 14 STZ.W $140D ; Disable spinjumping
  59. A5 F1 LDA $F1 ; If we are resting...
  60. D0 ?? BNE EndOfMod ; ...skip to end of mod
  61. A9 01 LDA.B #$01 ; Store the value #$01...
  62. 85 F0 STA $F0 ; ...into the flutter jump timer
  63. A5 7D LDA $7D ; Store the player Y speed...
  64. 85 F1 STA $F1 ; ...into the flutter carry
  65. A9 30 LDA.B #$30 ; Store the resting time...
  66. 85 F2 STA $F2 ; ...into the flutter rest timer
  67. A9 09 LDA.B #$09 ; Load sound #$09 (cape fly sound)
  68. 8D F9 1D STA.W #$1DF9 ; Play sound
  69. :EndOfMod
  70. 6B RTL ; End of mod code
  71. :Reset
  72. 64 F0 STZ $F0 ; Reset
  73. 64 F1 STZ $F1 ; every
  74. 64 F2 STZ $F2 ; flag
  75. 6B RTL ; .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement