Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #org 0x8168CAE
- '-----------------------------------
- msgbox 0x818D4E7 ' \v\h01 played with t...
- callstd MSG_SIGN ' Signpost-style message
- end
- #org 0x818D4E7
- = \v\h01 played with the NES.\p[.]Okay!\nIt's time to go!
- #eorg 0x8168CAE
- #eorg 0x818D4E7 'Erase the old scripts.
- #define HIGHSCORE 0x4000
- #define FLAG_ID 0x201
- #define CURRENTLEVEL 0x8001
- #define LEVELSCORE 0x8002
- #define TOTALSCORE 0x8003
- #define NUMLEVELS 10
- #dyn 0x740000
- #org @main
- lock
- setvar CURRENTLEVEL 1
- checkflag FLAG_ID
- :loop-top
- call @play_level
- compare CURRENTLEVEL NUMLEVELS
- if == jump :end
- jump :loop-top
- :end
- random 0xFFFF
- storevar 0 LASTRESULT
- call @show_hiscore
- msgbox @finished
- callstd MSG_NORMAL
- release
- end
- #org @play_level
- random 0xFFFA
- storevar 0 CURRENTLEVEL
- addvar TOTALSCORE LASTRESULT
- storevar 1 LEVELSCORE
- msgbox @playing_level
- callstd MSG_NORMAL
- call @show_hiscore
- addvar CURRENTLEVEL 1
- return
- #org @show_hiscore
- comparevars TOTALSCORE HIGHSCORE
- if <= jump :hs-end
- storevar 0 TOTALSCORE
- copyvar HIGHSCORE TOTALSCORE
- msgbox @hiscoretext
- callstd MSG_NORMAL
- return
- #org @playing_level
- = I'm playing level \v\h02!
- #org @finished
- = Awesome, my final score was \v\h02!
- #org @hiscoretext
- = My new high-score is \v\h02!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement