SHARE
TWEET

Untitled

a guest Jan 19th, 2020 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;#$15 - Max Right Walking Speed
  2. ;;#$31 - Max Right Running Speed
  3. ;;#$EB - Max Left Walking Speed
  4. ;;#$CF - Max Right Running Speed
  5.  
  6. ;;$7E0073 - Is Mario Ducking flag - #$04 = yes ; Is not flagged as ducking while sliding.
  7.  
  8. lorom
  9.  
  10. org $00D600
  11. autoclean JML duck_check
  12.  
  13. freecode
  14. duck_check:    
  15.  
  16. LDA $15     ;; / Original Code
  17. AND #$04    ;; | If Duck isn't pressed, stand up
  18. BEQ $D60B   ;; \
  19.  
  20. ;;If Mario is already Ducked resume
  21. LDA.W $7E0073
  22. CMP #$04
  23. BEQ resume
  24.  
  25. LDA.W $7E007B   ;; RAM address of Marios X Speed
  26. CMP #$EB    ;; / If X Speed is greater then max left walking speed
  27. BCS force_stand ;; \ bigger number is slower so force stand
  28.  
  29. CMP #$15    ;; / if X Speed is less then
  30. BCC force_stand ;; \ max right walking speed
  31.  
  32. JML resume
  33.  
  34. force_stand: ;; Enters here when speed is 14
  35. JML $00D60B
  36.  
  37. resume:
  38. LDA $15     ;; We jump back to an STA so need to restore A
  39. AND.B #$04  ;; back to exactly how it was
  40. JML $00D606 ;; Jump back to regular execution
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top