Advertisement
lui_

7-7 flashing

Mar 3rd, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. check_flashing:
  2. CMP #$10
  3. BNE .nope
  4. LDA player_flash
  5. BNE .nope
  6. LDA.b player_x_pos
  7. LDY player_x_sub
  8. LDX framerule
  9. BNE .skip_zero
  10.  
  11. JSR .check_range
  12. BCS .nope
  13.  
  14. .skip_zero:
  15. TYA
  16. SEC
  17. SBC .offsets_sub,x
  18. TAY
  19. LDA.b player_x_pos
  20. SBC .offsets_px,x
  21.  
  22. .check_range:
  23. CMP #!good_pos_px
  24. BNE +
  25. CPY #!good_pos_max_sub
  26. BCS +
  27. CPY #!good_pos_min_sub
  28. BCC +
  29. LDA #$02
  30. STA player_flash
  31. ; SEC
  32. RTS
  33. +
  34. CLC
  35. .nope:
  36. RTS
  37.  
  38.  
  39. .offsets_px:
  40. db $03,$02,$02,$01,$01,$01,$00,$00
  41.  
  42. .offsets_sub:
  43. db $90,$90,$30,$10,$70,$10,$B0,$50
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement