Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ---------------------------------------------------------------------------
- ; Subroutine to do Jump Dash (code by Vladikcomper) mod by Suler_Ma(d)X well.
- ; ---------------------------------------------------------------------------
- ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
- if _JUMPDASH_
- Sonic_JumpDash:
- cmpi.b #2,$1C(a0) ; is Sonic rolling?
- bne.w Sonic_JD_Rts ; if no, branch
- btst #7,$22(a0) ; was Jump Dash flag set?
- bne.w Sonic_JD_Rts ; if yes, branch
- tpress A+B+C,(SonicControl) ; is A, B or C pressed?
- beq.w Sonic_JD_Rts ; if not, branch
- bset #7,$22(a0) ; set Jump Dash flag
- btst #iUp,(Joypad|Held) ; is left being pressed?
- bne.w UpDash ; if not, branch
- btst #iDown,(Joypad|Held) ; is left being pressed?
- bne.w DiveDash ; if not, branch
- move.w #$BC,d0 ; play JD sound
- jsr (PlaySound_Special).l ;
- move.w #$C00,$10(a0) ; set Jump Dash speed
- move.w #0,$12(a0) ; clear Y-velocity
- btst #6,$22(a0) ; is Sonic underwater?
- beq.s Sonic_JD_ChkShoes
- subi.w #$300,$10(a0) ; set speed to $600
- bra.w Sonic_JD_ChkShoes
- UpDash:
- move.w #-$700,$12(a0) ; set Jump Dash speed
- move.w #$A0,d0 ; play JD sound
- jsr (PlaySound_Special).l ;
- bra.w Sonic_JD_Rts
- DiveDash:
- move.w #$C00,$12(a0) ; set Jump Dash speed
- move.w #$AE,d0 ; play JD sound
- jsr (PlaySound_Special).l ;
- bra.w Sonic_JD_Rts
- Sonic_JD_ChkShoes:
- tst.b ($FFFFFE2E).w ; does Sonic have speed shoes?
- beq.w Sonic_JD_ChkOrientation ; if not, branch
- Sonic_JD_ChkOrientation:
- btst #0,$22(a0)
- beq.s Sonic_JD_Rts
- neg.w $10(a0)
- Sonic_JD_Rts:
- rts
- endc
- ; End of function Sonic_JumpDash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement