Advertisement
Erik557

Untitled

Jan 31st, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. !ScoreIndex = $0DC3|!addr
  2.  
  3. macro reward_player()
  4. INC $0DBE|!addr ;\
  5. LDA #$05 ; | replace with your own code
  6. STA $1DFC|!addr ;/
  7. endmacro
  8.  
  9. ScoreTable:
  10. db $00,$00,$64
  11. db $00,$00,$C8
  12. db $0F,$42,$3F
  13. .end
  14.  
  15. main:
  16. LDA !ScoreIndex
  17. ASL
  18. CLC
  19. ADC !ScoreIndex
  20. TAX
  21. LDY #$02
  22. STY $00
  23. .loop
  24. LDA $0F34|!addr,y
  25. CMP ScoreTable,x
  26. BCC .NotEnough
  27. DEC $00
  28. BMI .Reward
  29. .NotEnough
  30. INX
  31. DEY
  32. BPL .loop
  33. RTL
  34.  
  35. .Reward
  36. %reward_player()
  37. INC !ScoreIndex
  38. LDA.b #ScoreTable_end-ScoreTable/3
  39. CMP !ScoreIndex
  40. BCS .Return
  41. STA !ScoreIndex
  42. .Return
  43. RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement