Advertisement
NovaYoshi

bad deceleration code

Jun 10th, 2017
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; fix walk speed if we just came out of a run
  2.    lda PlayerVXL
  3.    bit PlayerVXH ; take the absolute value, negate the low byte if the high byte is positive
  4.    bpl :+
  5.      neg
  6.    :
  7.    cmp MaxSpeedRight
  8.    beq NoFixWalkSpeed
  9.    bcc NoFixWalkSpeed
  10.    sub NovaDecelSpeed
  11.    bit PlayerVXH ; reverse the negation from earlier if needed
  12.    bpl :+
  13.      neg
  14.    :
  15.    sta PlayerVXL
  16. NoFixWalkSpeed:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement