Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !ScoreIndex = $0DC3|!addr
- macro reward_player()
- INC $0DBE|!addr ;\
- LDA #$05 ; | replace with your own code
- STA $1DFC|!addr ;/
- endmacro
- ScoreTable:
- db $00,$00,$64
- db $00,$00,$C8
- db $0F,$42,$3F
- .end
- main:
- LDA !ScoreIndex
- ASL
- CLC
- ADC !ScoreIndex
- TAX
- LDY #$02
- STY $00
- .loop
- LDA $0F34|!addr,y
- CMP ScoreTable,x
- BCC .NotEnough
- DEC $00
- BMI .Reward
- .NotEnough
- INX
- DEY
- BPL .loop
- RTL
- .Reward
- %reward_player()
- INC !ScoreIndex
- LDA.b #ScoreTable_end-ScoreTable/3
- CMP !ScoreIndex
- BCS .Return
- STA !ScoreIndex
- .Return
- RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement