Add high score framework.

This commit is contained in:
Randy Thiemann 2023-11-10 12:07:57 +01:00
parent 7b826f68b3
commit 9d27e1d542
7 changed files with 1002 additions and 883 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,5 +1,7 @@
; File generated by rgblink ; File generated by rgblink
00:0008 RSTSwitchBank 00:0008 RSTSwitchBank
00:0025 CheckAndAddHiscore
00:0026 GetTargetHSTable
00:0028 RSTRestoreBank 00:0028 RSTRestoreBank
00:0048 LCDCInterrupt 00:0048 LCDCInterrupt
00:004d LCDCInterrupt_WaitUntilNotBusy 00:004d LCDCInterrupt_WaitUntilNotBusy
@ -165,251 +167,252 @@
00:1e15 TrustedLoad.notfound 00:1e15 TrustedLoad.notfound
00:1e1c TrustedLoad.fallback 00:1e1c TrustedLoad.fallback
00:1e37 InitializeSRAM 00:1e37 InitializeSRAM
00:1f57 NextProfile 00:1faa NextProfile
00:1f60 NextProfile.update 00:1fb3 NextProfile.update
00:1f63 ChangeProfile 00:1fb6 ChangeProfile
00:1f63 ChangeProfile.backup 00:1fb6 ChangeProfile.backup
00:1f92 ChangeProfile.first 00:1fe5 ChangeProfile.first
00:1fa0 ChangeProfile.second 00:1ff3 ChangeProfile.second
00:1fae ChangeProfile.third 00:2001 ChangeProfile.third
00:1fbc ChangeProfile.fourth 00:200f ChangeProfile.fourth
00:1fca ChangeProfile.fifth 00:201d ChangeProfile.fifth
00:1fd8 ChangeProfile.sixth 00:202b ChangeProfile.sixth
00:1fe6 ChangeProfile.seventh 00:2039 ChangeProfile.seventh
00:1ff4 ChangeProfile.eighth 00:2047 ChangeProfile.eighth
00:2002 ChangeProfile.ninth 00:2055 ChangeProfile.ninth
00:2010 ChangeProfile.tenth 00:2063 ChangeProfile.tenth
00:201e ChangeProfile.restore 00:2071 ChangeProfile.restore
00:204e ChangeProfile.lfirst 00:20a1 ChangeProfile.lfirst
00:205d ChangeProfile.lsecond 00:20b0 ChangeProfile.lsecond
00:206c ChangeProfile.lthird 00:20bf ChangeProfile.lthird
00:207b ChangeProfile.lfourth 00:20ce ChangeProfile.lfourth
00:208a ChangeProfile.lfifth 00:20dd ChangeProfile.lfifth
00:2099 ChangeProfile.lsixth 00:20ec ChangeProfile.lsixth
00:20a8 ChangeProfile.lseventh 00:20fb ChangeProfile.lseventh
00:20b7 ChangeProfile.leighth 00:210a ChangeProfile.leighth
00:20c6 ChangeProfile.lninth 00:2119 ChangeProfile.lninth
00:20d5 ChangeProfile.ltenth 00:2128 ChangeProfile.ltenth
00:20e4 ResetProfile 00:2137 ResetProfile
00:2140 GradeInit 00:2193 GradeInit
00:216b GradeInit.grade9start 00:21be GradeInit.grade9start
00:2170 GradeInit.end 00:21c3 GradeInit.end
00:2172 UpdateGrade 00:21c5 UpdateGrade
00:2180 UpdateGrade.gradejumptable 00:21d3 UpdateGrade.gradejumptable
00:2195 DecayGradeProcess 00:21e8 DecayGradeProcess
00:21a3 DecayGradeProcess.gradejumptable 00:21f6 DecayGradeProcess.gradejumptable
00:21b8 DecayGradeDelay 00:220b DecayGradeDelay
00:21c6 DecayGradeDelay.gradejumptable 00:2219 DecayGradeDelay.gradejumptable
00:21db PrepareScore 00:222e PrepareScore
00:21ee DrawGradeProgressDMGT 00:2241 DrawGradeProgressDMGT
00:2209 UpdateGradeDMGT 00:225c UpdateGradeDMGT
00:2242 UpdateGradeDMGT.checklineclears 00:2295 UpdateGradeDMGT.checklineclears
00:225c UpdateGradeDMGT.clearrate 00:22af UpdateGradeDMGT.clearrate
00:226d UpdateGradeDMGT.combomult 00:22c0 UpdateGradeDMGT.combomult
00:227a UpdateGradeDMGT.combo10 00:22cd UpdateGradeDMGT.combo10
00:228b UpdateGradeDMGT.combo5 00:22de UpdateGradeDMGT.combo5
00:229c UpdateGradeDMGT.combo1 00:22ef UpdateGradeDMGT.combo1
00:22ab UpdateGradeDMGT.prelevel 00:22fe UpdateGradeDMGT.prelevel
00:22ba UpdateGradeDMGT.single 00:230d UpdateGradeDMGT.single
00:22ca UpdateGradeDMGT.double 00:231d UpdateGradeDMGT.double
00:22db UpdateGradeDMGT.adddonce 00:232e UpdateGradeDMGT.adddonce
00:22df UpdateGradeDMGT.triple 00:2332 UpdateGradeDMGT.triple
00:22f0 UpdateGradeDMGT.addtonce 00:2343 UpdateGradeDMGT.addtonce
00:22f4 UpdateGradeDMGT.tetris 00:2347 UpdateGradeDMGT.tetris
00:22f8 UpdateGradeDMGT.levelmult 00:234b UpdateGradeDMGT.levelmult
00:2310 UpdateGradeDMGT.mult5 00:2363 UpdateGradeDMGT.mult5
00:2317 UpdateGradeDMGT.mult4 00:236a UpdateGradeDMGT.mult4
00:231d UpdateGradeDMGT.mult3 00:2370 UpdateGradeDMGT.mult3
00:2322 UpdateGradeDMGT.mult2 00:2375 UpdateGradeDMGT.mult2
00:2326 UpdateGradeDMGT.mult1 00:2379 UpdateGradeDMGT.mult1
00:2327 UpdateGradeDMGT.processgrade 00:237a UpdateGradeDMGT.processgrade
00:2350 UpdateGradeDMGT.increasegrademaybe 00:23a3 UpdateGradeDMGT.increasegrademaybe
00:2374 UpdateGradeDMGT.gotgm 00:23c7 UpdateGradeDMGT.gotgm
00:2382 DecayGradeDMGT 00:23d5 DecayGradeDMGT
00:23a6 DecayGradeDMGT.nodecay 00:23f9 DecayGradeDMGT.nodecay
00:23ad DecayGradeDMGT.decay 00:2400 DecayGradeDMGT.decay
00:23bb UpdateGradeTGM1 00:240e UpdateGradeTGM1
00:23c5 UpdateGradeTGM1.trygradeup 00:2418 UpdateGradeTGM1.trygradeup
00:23df UpdateGradeTGM1.increasegrade 00:2432 UpdateGradeTGM1.increasegrade
00:23f4 UpdateGradeTGM1.skipjingle 00:2447 UpdateGradeTGM1.skipjingle
00:2401 UpdateGradeTGM1.maybegm 00:2454 UpdateGradeTGM1.maybegm
00:241a UpdateGradeDEAT 00:246d UpdateGradeDEAT
00:2426 UpdateGradeDEAT.notgm 00:2479 UpdateGradeDEAT.notgm
00:2442 UpdateGradeDEAT.notm 00:2495 UpdateGradeDEAT.notm
00:2465 UpdateGradeDEAT.disqualify 00:24b8 UpdateGradeDEAT.disqualify
00:2483 UpdateGradeSHIR 00:24d6 UpdateGradeSHIR
00:24c6 UpdateGradeSHIR.s5torikan 00:2519 UpdateGradeSHIR.s5torikan
00:24d6 UpdateGradeSHIR.s10torikan 00:2529 UpdateGradeSHIR.s10torikan
00:24e5 UpdateGradeSHIR.disqualify 00:2538 UpdateGradeSHIR.disqualify
00:24f4 UpdateGradeSHIR.l1000 00:2547 UpdateGradeSHIR.l1000
00:250a UpdateGradeSHIR.l500 00:255d UpdateGradeSHIR.l500
00:2520 LevelInit 00:2573 LevelInit
00:2585 SpecialLevelInit 00:25d8 SpecialLevelInit
00:2593 SpecialLevelInit.jumps 00:25e6 SpecialLevelInit.jumps
00:25a8 SpecialLevelInit.dmgt 00:25fb SpecialLevelInit.dmgt
00:25ad SpecialLevelInit.tgm1 00:2600 SpecialLevelInit.tgm1
00:25b2 SpecialLevelInit.tgm3 00:2605 SpecialLevelInit.tgm3
00:25b7 SpecialLevelInit.deat 00:260a SpecialLevelInit.deat
00:25bc SpecialLevelInit.shir 00:260f SpecialLevelInit.shir
00:25c1 SpecialLevelInit.chil 00:2614 SpecialLevelInit.chil
00:25c6 SpecialLevelInit.myco 00:2619 SpecialLevelInit.myco
00:25cb SpecialLevelInit.loaddata 00:261e SpecialLevelInit.loaddata
00:2600 LevelUp 00:2653 LevelUp
00:262a LevelUp.doit 00:267d LevelUp.doit
00:2674 LevelUp.checknlevel 00:26c7 LevelUp.checknlevel
00:26c3 LevelUp.bellmaybe 00:2716 LevelUp.bellmaybe
00:26dc LevelUp.leveljinglemaybe 00:272f LevelUp.leveljinglemaybe
00:26e9 LevelUp.checkspeedup 00:273c LevelUp.checkspeedup
00:2728 DoSpeedUp 00:277b DoSpeedUp
00:2769 CheckSpecialLevelConditions 00:27bc CheckSpecialLevelConditions
00:279a CheckSpecialLevelConditions.override 00:27ed CheckSpecialLevelConditions.override
00:27b5 CheckSpecialLevelConditions.nooverride 00:2808 CheckSpecialLevelConditions.nooverride
00:27bb CheckSpecialLevelConditions.speciallock 00:280e CheckSpecialLevelConditions.speciallock
00:27dc CheckSpecialLevelConditions.bones 00:282f CheckSpecialLevelConditions.bones
00:27f1 CheckSpecialLevelConditions.enterthebonezone 00:2844 CheckSpecialLevelConditions.enterthebonezone
00:27f6 CheckSpecialLevelConditions.invis 00:2849 CheckSpecialLevelConditions.invis
00:280b CheckSpecialLevelConditions.vanishoxyaction 00:285e CheckSpecialLevelConditions.vanishoxyaction
00:2810 CheckSpecialLevelConditions.killscreen 00:2863 CheckSpecialLevelConditions.killscreen
00:2821 CheckSpecialLevelConditions.rip 00:2874 CheckSpecialLevelConditions.rip
00:2851 CheckSpecialLevelConditions.staffroll 00:28a4 CheckSpecialLevelConditions.staffroll
00:285f CheckSpecialLevelConditions.justkill 00:28b2 CheckSpecialLevelConditions.justkill
00:2873 TriggerKillScreen 00:28c6 TriggerKillScreen
00:2895 sTGM1GradeScores 00:28e8 sTGM1GradeScores
00:28b7 sTGM3InternalGradeSystem 00:290a sTGM3InternalGradeSystem
00:2957 sTGM3GradeBoosts 00:29aa sTGM3GradeBoosts
00:2976 sTGM3LevelMultiplier 00:29c9 sTGM3LevelMultiplier
00:297a sTGM3BaselineCOOL 00:29cd sTGM3BaselineCOOL
00:2983 sTGM3REGRETConditions 00:29d6 sTGM3REGRETConditions
00:2997 sDMGTGrading 00:29ea sDMGTGrading
00:2a4b sDMGTGaugeLUT 00:2a9e sDMGTGaugeLUT
00:2b4b SFXInit 00:2b9e SFXInit
00:2b6d SFXPopQueue 00:2bc0 SFXPopQueue
00:2b82 SFXPushQueue 00:2bd5 SFXPushQueue
00:2b93 SFXProcessQueue 00:2be6 SFXProcessQueue
00:2bc1 SFXTriggerNoise 00:2c14 SFXTriggerNoise
00:2be7 SFXEnqueue 00:2c3a SFXEnqueue
00:2bfc SFXEnqueue.findsfx 00:2c4f SFXEnqueue.findsfx
00:2d56 SFXKill 00:2da9 SFXKill
00:2d83 SFXPlayNoise 00:2dd6 SFXPlayNoise
00:2d8e SFXPlayNoise.noisereg 00:2de1 SFXPlayNoise.noisereg
00:2da5 SFXPlayNoise.savenoiseplayhead 00:2df8 SFXPlayNoise.savenoiseplayhead
00:2dae SFXPlay 00:2e01 SFXPlay
00:2dbc SFXPlay.play 00:2e0f SFXPlay.play
00:2dc8 SFXPlay.getRegister 00:2e1b SFXPlay.getRegister
00:2ddc SFXPlay.savePlayhead 00:2e2f SFXPlay.savePlayhead
00:2de5 HarvestEntropy 00:2e38 HarvestEntropy
00:2deb HarvestEntropy.loop 00:2e3e HarvestEntropy.loop
00:2e0c RNGInit 00:2e5f RNGInit
00:2e72 RNGInit.complexinit 00:2ec5 RNGInit.complexinit
00:2ea4 ShiftHistory 00:2ef7 ShiftHistory
00:2ec1 GetNextHellPiece 00:2f14 GetNextHellPiece
00:2ec6 GetNextTGM1Piece 00:2f19 GetNextTGM1Piece
00:2ee3 GetNextTGM2Piece 00:2f36 GetNextTGM2Piece
00:2f00 GetNextNesPiece 00:2f53 GetNextNesPiece
00:2f0e GetNextTGM3Piece 00:2f61 GetNextTGM3Piece
00:2fc5 GetNextPiece 00:3018 GetNextPiece
00:2fd3 GetNextPiece.nextpiecejumps 00:3026 GetNextPiece.nextpiecejumps
00:2fe2 Next35Piece 00:3035 Next35Piece
00:2fec Next7Piece 00:303f Next7Piece
00:2ff6 NextByte 00:3049 NextByte
00:3016 sProgressData 00:3069 sProgressData
00:3160 ScoreInit 00:31b3 ScoreInit
00:3188 IncreaseScore 00:31db IncreaseScore
00:31c0 IncreaseScore.doConvert 00:3213 IncreaseScore.doConvert
00:31d8 IncreaseScore.carry 00:322b IncreaseScore.carry
00:31da IncreaseScore.postConvert 00:322d IncreaseScore.postConvert
00:31ee IncreaseScore.preAddDigit 00:3241 IncreaseScore.preAddDigit
00:3216 IncreaseScore.addDigit 00:3269 IncreaseScore.addDigit
00:322c IncreaseScore.nextDigit 00:327f IncreaseScore.nextDigit
00:3240 InputInit 00:3293 InputInit
00:3252 GetInput 00:32a5 GetInput
00:3252 GetInput.btns 00:32a5 GetInput.btns
00:325f GetInput.readA 00:32b2 GetInput.readA
00:3263 GetInput.setA 00:32b6 GetInput.setA
00:326e GetInput.clearA 00:32c1 GetInput.clearA
00:3271 GetInput.readB 00:32c4 GetInput.readB
00:3275 GetInput.setB 00:32c8 GetInput.setB
00:3280 GetInput.clearB 00:32d3 GetInput.clearB
00:3283 GetInput.readSelect 00:32d6 GetInput.readSelect
00:3287 GetInput.setSelect 00:32da GetInput.setSelect
00:3292 GetInput.clearSelect 00:32e5 GetInput.clearSelect
00:3295 GetInput.readStart 00:32e8 GetInput.readStart
00:3299 GetInput.setStart 00:32ec GetInput.setStart
00:32a4 GetInput.clearStart 00:32f7 GetInput.clearStart
00:32a7 GetInput.dpad 00:32fa GetInput.dpad
00:32b4 GetInput.readUp 00:3307 GetInput.readUp
00:32b8 GetInput.setUp 00:330b GetInput.setUp
00:32c3 GetInput.clearUp 00:3316 GetInput.clearUp
00:32c6 GetInput.readDown 00:3319 GetInput.readDown
00:32ca GetInput.setDown 00:331d GetInput.setDown
00:32d5 GetInput.clearDown 00:3328 GetInput.clearDown
00:32d8 GetInput.readLeft 00:332b GetInput.readLeft
00:32dc GetInput.setLeft 00:332f GetInput.setLeft
00:32e7 GetInput.clearLeft 00:333a GetInput.clearLeft
00:32ea GetInput.readRight 00:333d GetInput.readRight
00:32ee GetInput.setRight 00:3341 GetInput.setRight
00:32f9 GetInput.clearRight 00:334c GetInput.clearRight
00:32fc GetInput.priorities 00:334f GetInput.priorities
00:3307 GetInput.zero 00:335a GetInput.zero
00:330d SwitchToTitle 00:3360 SwitchToTitle
00:3316 TitleEventLoopHandler 00:3369 TitleEventLoopHandler
00:3320 TitleVBlankHandler 00:3373 TitleVBlankHandler
00:332a PersistLevel 00:337d PersistLevel
00:3338 DrawSpeedMain 00:338b DrawSpeedMain
00:3388 DrawSpeedSettings 00:33db DrawSpeedSettings
00:33d8 TimeInit 00:342b TimeInit
00:33f8 StartCountdown 00:344b StartCountdown
00:3406 ResetGameTime 00:3459 ResetGameTime
00:3411 CheckTorikan 00:3464 CheckTorikan
00:3428 CheckTorikan.failure 00:347b CheckTorikan.failure
00:342a CheckTorikan.success 00:347d CheckTorikan.success
00:342d HandleTimers 00:3480 HandleTimers
00:3453 HandleTimers.reduce 00:34a6 HandleTimers.reduce
00:3460 HandleTimers.clock 00:34b3 HandleTimers.clock
00:347a HandleTimers.go 00:34cd HandleTimers.go
00:349e SetProgress 00:34f1 SetProgress
00:34a9 SetProgress.loop 00:34fc SetProgress.loop
00:34ad SetProgress.correct 00:3500 SetProgress.correct
00:34d4 SetProgress.wvr_u1 00:3527 SetProgress.wvr_u1
00:34e0 SetProgress.wvr_u2 00:3533 SetProgress.wvr_u2
00:34ee SetProgress.wvr_u3 00:3541 SetProgress.wvr_u3
00:34fa SetProgress.wvr_u4 00:354d SetProgress.wvr_u4
00:3508 SetProgress.wvr_u5 00:355b SetProgress.wvr_u5
00:3514 SetProgress.wvr_u6 00:3567 SetProgress.wvr_u6
00:3522 SetProgress.wvr_u7 00:3575 SetProgress.wvr_u7
00:352e SetProgress.wvr_u8 00:3581 SetProgress.wvr_u8
00:353c SetProgress.wvr_u9 00:358f SetProgress.wvr_u9
00:3548 SetProgress.wvr_u10 00:359b SetProgress.wvr_u10
00:3550 Main 00:35a3 Main
00:3579 Main.notgbc 00:35cc Main.notgbc
00:357f Main.wvr_u1 00:35d2 Main.wvr_u1
00:35a6 EventLoop 00:35f9 EventLoop
00:35bc EventLoop.eventloopjumps 00:360f EventLoop.eventloopjumps
00:35c5 EventLoopPostHandler 00:3618 EventLoopPostHandler
00:35c7 EventLoopPostHandler.wvb_u2 00:361a EventLoopPostHandler.wvb_u2
00:35d9 EventLoopPostHandler.vblankjumps 00:362c EventLoopPostHandler.vblankjumps
00:35e2 LoadTitleTiles 00:3635 sHiscoreDefaultData
00:3600 LoadGameplayTiles 00:36ad LoadTitleTiles
00:3616 LoadGameplayTiles.gbc 00:36cb LoadGameplayTiles
00:3625 LoadGameplayTiles.dmg 00:36e1 LoadGameplayTiles.gbc
00:3634 sFramesToCS 00:36f0 LoadGameplayTiles.dmg
00:3670 UnsafeMemCopy 00:36ff sFramesToCS
00:3679 SafeMemCopy.wvr_u1 00:373b UnsafeMemCopy
00:3679 SafeMemCopy 00:3744 SafeMemCopy.wvr_u1
00:3688 UnsafeMemSet 00:3744 SafeMemCopy
00:3690 SafeMemSet 00:3753 UnsafeMemSet
00:3690 SafeMemSet.wvr_u2 00:375b SafeMemSet
00:369e SwitchToGameplay 00:375b SafeMemSet.wvr_u2
00:36a7 SwitchToGameplayBig 00:3769 SwitchToGameplay
00:36b0 GamePlayEventLoopHandler 00:3772 SwitchToGameplayBig
00:36ba GamePlayBigEventLoopHandler 00:377b GamePlayEventLoopHandler
00:36c4 EnableScreenSquish 00:3785 GamePlayBigEventLoopHandler
00:36de DisableScreenSquish 00:378f EnableScreenSquish
00:36e9 CopyOAMHandler 00:37a9 DisableScreenSquish
00:36f5 ClearOAM 00:37b4 CopyOAMHandler
00:370b BankingInit 00:37c0 ClearOAM
00:371a OAMDMA 00:37d6 BankingInit
00:3724 OAMDMAEnd 00:37e5 OAMDMA
00:37ef OAMDMAEnd
01:4008 sDMGTSpeedCurve 01:4008 sDMGTSpeedCurve
01:4203 sDMGTSpeedCurveEnd 01:4203 sDMGTSpeedCurveEnd
01:4205 sDMGTSpeedCurveSpecialData 01:4205 sDMGTSpeedCurveSpecialData
@ -1404,43 +1407,43 @@
05:6163 GamePlayEventLoopHandlerB.notempty7_u213 05:6163 GamePlayEventLoopHandlerB.notempty7_u213
05:6166 GamePlayEventLoopHandlerB.skip7_u213 05:6166 GamePlayEventLoopHandlerB.skip7_u213
05:616a GamePlayEventLoopHandlerB.gameOverMode 05:616a GamePlayEventLoopHandlerB.gameOverMode
05:6190 GamePlayEventLoopHandlerB.noretry 05:6193 GamePlayEventLoopHandlerB.noretry
05:619a GamePlayEventLoopHandlerB.pauseMode 05:61a0 GamePlayEventLoopHandlerB.pauseMode
05:61af GamePlayEventLoopHandlerB.noqr 05:61b5 GamePlayEventLoopHandlerB.noqr
05:61c4 GamePlayEventLoopHandlerB.nounpause 05:61ca GamePlayEventLoopHandlerB.nounpause
05:620e GamePlayEventLoopHandlerB.preRollMode 05:6214 GamePlayEventLoopHandlerB.preRollMode
05:623d GamePlayEventLoopHandlerB.predone 05:6243 GamePlayEventLoopHandlerB.predone
05:6253 GamePlayEventLoopHandlerB.staysmall 05:6259 GamePlayEventLoopHandlerB.staysmall
05:6269 GamePlayEventLoopHandlerB.drawStaticInfo 05:626f GamePlayEventLoopHandlerB.drawStaticInfo
05:629a DoHold 05:62a0 DoHold
05:629e DoHold.checkIRSA 05:62a4 DoHold.checkIRSA
05:62a5 DoHold.ldb3 05:62ab DoHold.ldb3
05:62b1 DoHold.lda3 05:62b7 DoHold.lda3
05:62bb DoHold.cp3 05:62c1 DoHold.cp3
05:62c9 DoHold.checkIRSB 05:62cf DoHold.checkIRSB
05:62d0 DoHold.lda4 05:62d6 DoHold.lda4
05:62dc DoHold.ldb4 05:62e2 DoHold.ldb4
05:62e6 DoHold.cp4 05:62ec DoHold.cp4
05:62f4 DoHold.noRotation 05:62fa DoHold.noRotation
05:62ff DoHold.doHoldOperation 05:6305 DoHold.doHoldOperation
05:630a sLeftDasSlam 05:6310 sLeftDasSlam
05:6310 sRightDasSlam 05:6316 sRightDasSlam
05:6316 sLeady 05:631c sLeady
05:6320 sGo 05:6326 sGo
05:632a sPause 05:6330 sPause
05:6352 sKill 05:6358 sKill
05:63f2 sYouAreGM 05:63f8 sYouAreGM
05:6456 sFinalChallenge 05:645c sFinalChallenge
05:651e sPieceXOffsets 05:6524 sPieceXOffsets
05:653a sPieceYOffsets 05:6540 sPieceYOffsets
05:6556 sPieceFastRotationStates 05:655c sPieceFastRotationStates
05:65c6 sPieceRotationStates 05:65cc sPieceRotationStates
05:6636 sTGM3Bag 05:663c sTGM3Bag
05:6659 sTGM3Droughts 05:665f sTGM3Droughts
05:6660 sGameplayTileMap 05:6666 sGameplayTileMap
05:6900 sGameplayUngradedTileMap 05:6906 sGameplayUngradedTileMap
05:6900 sGameplayTileMapEnd 05:6906 sGameplayTileMapEnd
05:6ba0 sGameplayUngradedTileMapEnd 05:6ba6 sGameplayUngradedTileMapEnd
06:4008 BigFieldInit 06:4008 BigFieldInit
06:4049 BigFieldClear 06:4049 BigFieldClear
06:40ef BigToBackupField 06:40ef BigToBackupField
@ -2170,40 +2173,40 @@
06:63e5 GamePlayBigEventLoopHandlerB.notempty7_u436 06:63e5 GamePlayBigEventLoopHandlerB.notempty7_u436
06:63e8 GamePlayBigEventLoopHandlerB.skip7_u436 06:63e8 GamePlayBigEventLoopHandlerB.skip7_u436
06:63ec GamePlayBigEventLoopHandlerB.gameOverMode 06:63ec GamePlayBigEventLoopHandlerB.gameOverMode
06:6412 GamePlayBigEventLoopHandlerB.noretry 06:6415 GamePlayBigEventLoopHandlerB.noretry
06:641c GamePlayBigEventLoopHandlerB.pauseMode 06:6422 GamePlayBigEventLoopHandlerB.pauseMode
06:6431 GamePlayBigEventLoopHandlerB.noqr 06:6437 GamePlayBigEventLoopHandlerB.noqr
06:6446 GamePlayBigEventLoopHandlerB.nounpause 06:644c GamePlayBigEventLoopHandlerB.nounpause
06:6491 GamePlayBigEventLoopHandlerB.preRollMode 06:6497 GamePlayBigEventLoopHandlerB.preRollMode
06:64c0 GamePlayBigEventLoopHandlerB.predone 06:64c6 GamePlayBigEventLoopHandlerB.predone
06:64e2 GamePlayBigEventLoopHandlerB.drawStaticInfo 06:64e8 GamePlayBigEventLoopHandlerB.drawStaticInfo
06:6513 BigDoHold 06:6519 BigDoHold
06:6517 BigDoHold.checkIRSA 06:651d BigDoHold.checkIRSA
06:651e BigDoHold.ldb3 06:6524 BigDoHold.ldb3
06:652a BigDoHold.lda3 06:6530 BigDoHold.lda3
06:6534 BigDoHold.cp3 06:653a BigDoHold.cp3
06:6542 BigDoHold.checkIRSB 06:6548 BigDoHold.checkIRSB
06:6549 BigDoHold.lda4 06:654f BigDoHold.lda4
06:6555 BigDoHold.ldb4 06:655b BigDoHold.ldb4
06:655f BigDoHold.cp4 06:6565 BigDoHold.cp4
06:656d BigDoHold.noRotation 06:6573 BigDoHold.noRotation
06:6578 BigDoHold.doHoldOperation 06:657e BigDoHold.doHoldOperation
06:6583 sBigLeftDasSlam 06:6589 sBigLeftDasSlam
06:6589 sBigRightDasSlam 06:658f sBigRightDasSlam
06:658f sBigLeady 06:6595 sBigLeady
06:6599 sBigGo 06:659f sBigGo
06:65a3 sBigPause 06:65a9 sBigPause
06:65cb sBigKill 06:65d1 sBigKill
06:666b sBigYouAreGM 06:6671 sBigYouAreGM
06:66cf sBigFinalChallenge 06:66d5 sBigFinalChallenge
06:6797 sBigPieceXOffsets 06:679d sBigPieceXOffsets
06:67b3 sBigPieceYOffsets 06:67b9 sBigPieceYOffsets
06:67cf sBigPieceFastRotationStates 06:67d5 sBigPieceFastRotationStates
06:683f sBigPieceRotationStates 06:6845 sBigPieceRotationStates
06:68af sBigGameplayTileMap 06:68b5 sBigGameplayTileMap
06:6b4f sBigGameplayUngradedTileMap 06:6b55 sBigGameplayUngradedTileMap
06:6b4f sBigGameplayTileMapEnd 06:6b55 sBigGameplayTileMapEnd
06:6def sBigGameplayUngradedTileMapEnd 06:6df5 sBigGameplayUngradedTileMapEnd
00:a000 rCheck 00:a000 rCheck
00:a006 rLastProfile 00:a006 rLastProfile
00:a007 rProfileName 00:a007 rProfileName
@ -2316,6 +2319,13 @@
00:a28f rAlways20GState9 00:a28f rAlways20GState9
00:a290 rSelectedStartLevel9 00:a290 rSelectedStartLevel9
00:a292 rUnused9 00:a292 rUnused9
00:a2c7 rScoreTableDMGT
00:a33f rScoreTableTGM1
00:a3b7 rScoreTableTGM3
00:a42f rScoreTableDEAT
00:a4a7 rScoreTableSHIR
00:a51f rScoreTableCHIL
00:a597 rScoreTableMYCO
00:c000 wShadowTilemap 00:c000 wShadowTilemap
00:c400 wShadowTileAttrs 00:c400 wShadowTileAttrs
00:c800 wShadowOAM 00:c800 wShadowOAM
@ -2370,75 +2380,77 @@
00:cd1e wLeftSlamTimer 00:cd1e wLeftSlamTimer
00:cd1f wRightSlamTimer 00:cd1f wRightSlamTimer
00:cd20 wMovementLastFrame 00:cd20 wMovementLastFrame
00:cd21 wStack 00:cd21 wTargetHSTable
00:cd62 wStackEnd 00:cd23 wWorkingCopy
00:cd62 wTGM3Bag 00:cda7 wStack
00:cd85 wTGM3Droughts 00:cde8 wStackEnd
00:cd8c wTGM3GeneratedIdx 00:cde8 wTGM3Bag
00:cd8d wTGM3WorstDroughtIdx 00:ce0b wTGM3Droughts
00:cd8e wBoneActivationLevel 00:ce12 wTGM3GeneratedIdx
00:cd90 wInvisActivationLevel 00:ce13 wTGM3WorstDroughtIdx
00:cd92 wKillScreenActivationLevel 00:ce14 wBoneActivationLevel
00:cd94 wKillScreenActivationLevelBCD 00:ce16 wInvisActivationLevel
00:cd96 wLastLockLevel 00:ce18 wKillScreenActivationLevel
00:cd98 wStaffRollDuration 00:ce1a wKillScreenActivationLevelBCD
00:cd9a wBigStaffRoll 00:ce1c wLastLockLevel
00:cd9b wBonesActive 00:ce1e wStaffRollDuration
00:cd9c wInvisActive 00:ce20 wBigStaffRoll
00:cd9d wKillScreenActive 00:ce21 wBonesActive
00:cd9e wLockLevel 00:ce22 wInvisActive
00:cd9f wShouldGoStaffRoll 00:ce23 wKillScreenActive
00:cda0 wNoMoreLocks 00:ce24 wLockLevel
00:cda1 wDecayRate 00:ce25 wShouldGoStaffRoll
00:cda2 wGradePoints 00:ce26 wNoMoreLocks
00:cda3 wInternalGrade 00:ce27 wDecayRate
00:cda4 wDisplayedGrade 00:ce28 wGradePoints
00:cda5 wEffectTimer 00:ce29 wInternalGrade
00:cda6 wRankingDisqualified 00:ce2a wDisplayedGrade
00:cda7 wDecayCounter 00:ce2b wEffectTimer
00:cda8 wGradeGauge 00:ce2c wRankingDisqualified
00:cda9 wSMult 00:ce2d wDecayCounter
00:cdaa wDMult 00:ce2e wGradeGauge
00:cdab wTMult 00:ce2f wSMult
00:cdac wSRate 00:ce30 wDMult
00:cdad wDRate 00:ce31 wTMult
00:cdae wTRate 00:ce32 wSRate
00:cdaf wQRate 00:ce33 wDRate
00:cdb0 wProgress0B1 00:ce34 wTRate
00:cdb1 wProgress0B2 00:ce35 wQRate
00:cdb2 wProgress1B1 00:ce36 wProgress0B1
00:cdb3 wProgress1B2 00:ce37 wProgress0B2
00:cdb4 wProgress2B1 00:ce38 wProgress1B1
00:cdb5 wProgress2B2 00:ce39 wProgress1B2
00:cdb6 wProgress3B1 00:ce3a wProgress2B1
00:cdb7 wProgress3B2 00:ce3b wProgress2B2
00:cdb8 wProgress4B1 00:ce3c wProgress3B1
00:cdb9 wProgress4B2 00:ce3d wProgress3B2
00:cdba wSwapABState 00:ce3e wProgress4B1
00:cdbb wRNGModeState 00:ce3f wProgress4B2
00:cdbc wRotModeState 00:ce40 wSwapABState
00:cdbd wDropModeState 00:ce41 wRNGModeState
00:cdbe wSpeedCurveState 00:ce42 wRotModeState
00:cdbf wAlways20GState 00:ce43 wDropModeState
00:cdc0 wInitialA 00:ce44 wSpeedCurveState
00:cdc1 wInitialB 00:ce45 wAlways20GState
00:cdc2 wInitialC 00:ce46 wInitialA
00:cdc3 wMinutes 00:ce47 wInitialB
00:cdc4 wSeconds 00:ce48 wInitialC
00:cdc5 wFrames 00:ce49 wMinutes
00:cdc6 wCountDown 00:ce4a wSeconds
00:cdc8 wCountDownZero 00:ce4b wFrames
00:cdc9 wSelected 00:ce4c wCountDown
00:cdca wTitleMode 00:ce4e wCountDownZero
00:cdcb wProfileName 00:ce4f wSelected
00:cdce wBankBackup 00:ce50 wTitleMode
00:cdd2 wOuterReps 00:ce51 wProfileName
00:cdd3 wInnerReps 00:ce54 wBankBackup
00:cdd4 wTitlePal 00:ce58 wOuterReps
00:cdd5 wRollLine 00:ce59 wInnerReps
00:cdd6 wInStaffRoll 00:ce5a wTitlePal
00:cdd7 wBigModeTransfered 00:ce5b wRollLine
00:cdd8 wTarget 00:ce5c wInStaffRoll
00:ce5d wBigModeTransfered
00:ce5e wTarget
00:ff80 hPieceDataBase 00:ff80 hPieceDataBase
00:ff82 hPieceDataBaseFast 00:ff82 hPieceDataBaseFast
00:ff84 hPieceDataOffset 00:ff84 hPieceDataOffset

51
src/hiscore.asm Normal file
View File

@ -0,0 +1,51 @@
; DMGTRIS
; Copyright (C) 2023 - Randy Thiemann <randy.thiemann@gmail.com>
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <https://www.gnu.org/licenses/>.
IF !DEF(HISCORE_ASM)
DEF HISCORE_ASM EQU 1
INCLUDE "globals.asm"
SECTION "Hi Score Data", ROM0
sHiscoreDefaultData::
db 0, 0, 0, 0, 0, 0, 0, 0, "DMG", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "TRI", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "SDM", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "GTR", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "ISD", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "MGT", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "RIS", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "DMG", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "TRI", GRADE_NONE
db 0, 0, 0, 0, 0, 0, 0, 0, "SDM", GRADE_NONE
SECTION "Hi Score Variables", WRAM0
wTargetHSTable:: ds 2
wWorkingCopy:: ds (11*(8+3+1))
SECTION "Hi Score Functions", ROM0
CheckAndAddHiscore::
ret
GetTargetHSTable:
ret
ENDC

View File

@ -65,6 +65,14 @@ ENDU
PROFILE 7 PROFILE 7
PROFILE 8 PROFILE 8
PROFILE 9 PROFILE 9
rScoreTableDMGT:: ds (10 * (8+3+1))
rScoreTableTGM1:: ds (10 * (8+3+1))
rScoreTableTGM3:: ds (10 * (8+3+1))
rScoreTableDEAT:: ds (10 * (8+3+1))
rScoreTableSHIR:: ds (10 * (8+3+1))
rScoreTableCHIL:: ds (10 * (8+3+1))
rScoreTableMYCO:: ds (10 * (8+3+1))
SECTION "SRAM Variables", WRAM0 SECTION "SRAM Variables", WRAM0
wTarget:: ds 1 wTarget:: ds 1
@ -90,7 +98,7 @@ RestoreSRAM::
cp a, 0 cp a, 0
jp nz, InitializeSRAM jp nz, InitializeSRAM
ld a, [rCheck+5] ld a, [rCheck+5]
cp a, 1 cp a, 2
jp nz, InitializeSRAM jp nz, InitializeSRAM
; SRAM is initialized and for this build, so we can load the data. ; SRAM is initialized and for this build, so we can load the data.
@ -220,7 +228,7 @@ InitializeSRAM:
ld [rCheck+3], a ld [rCheck+3], a
ld a, 0 ld a, 0
ld [rCheck+4], a ld [rCheck+4], a
ld a, 1 ld a, 2
ld [rCheck+5], a ld [rCheck+5], a
xor a, a xor a, a
@ -331,7 +339,36 @@ InitializeSRAM:
ld [rProfileName8+2], a ld [rProfileName8+2], a
ld a, "9" ld a, "9"
ld [rProfileName9+2], a ld [rProfileName9+2], a
ret
; Set the default scores.
ld hl, rScoreTableDMGT
ld de, sHiscoreDefaultData
ld bc, (10 * (8+3+1))
call UnsafeMemCopy
ld hl, rScoreTableTGM1
ld de, sHiscoreDefaultData
ld bc, (10 * (8+3+1))
call UnsafeMemCopy
ld hl, rScoreTableTGM3
ld de, sHiscoreDefaultData
ld bc, (10 * (8+3+1))
call UnsafeMemCopy
ld hl, rScoreTableDEAT
ld de, sHiscoreDefaultData
ld bc, (10 * (8+3+1))
call UnsafeMemCopy
ld hl, rScoreTableSHIR
ld de, sHiscoreDefaultData
ld bc, (10 * (8+3+1))
call UnsafeMemCopy
ld hl, rScoreTableCHIL
ld de, sHiscoreDefaultData
ld bc, (10 * (8+3+1))
call UnsafeMemCopy
ld hl, rScoreTableMYCO
ld de, sHiscoreDefaultData
ld bc, (10 * (8+3+1))
jp UnsafeMemCopy
NextProfile:: NextProfile::
ld a, [rLastProfile] ld a, [rLastProfile]

View File

@ -619,6 +619,7 @@ GamePlayEventLoopHandlerB::
ldh a, [hAState] ldh a, [hAState]
cp a, 10 ; 10 frame hold cp a, 10 ; 10 frame hold
jr nz, .noretry jr nz, .noretry
call CheckAndAddHiscore
call RNGInit call RNGInit
call ScoreInit call ScoreInit
call LevelInit call LevelInit
@ -638,6 +639,7 @@ GamePlayEventLoopHandlerB::
ldh a, [hBState] ldh a, [hBState]
cp a, 10 ; 10 frame hold cp a, 10 ; 10 frame hold
jp nz, .drawStaticInfo jp nz, .drawStaticInfo
call CheckAndAddHiscore
jp SwitchToTitle jp SwitchToTitle
@ -1395,6 +1397,7 @@ GamePlayBigEventLoopHandlerB:
ldh a, [hAState] ldh a, [hAState]
cp a, 10 ; 10 frame hold cp a, 10 ; 10 frame hold
jr nz, .noretry jr nz, .noretry
call CheckAndAddHiscore
call RNGInit call RNGInit
call ScoreInit call ScoreInit
call LevelInit call LevelInit
@ -1414,6 +1417,7 @@ GamePlayBigEventLoopHandlerB:
ldh a, [hBState] ldh a, [hBState]
cp a, 10 ; 10 frame hold cp a, 10 ; 10 frame hold
jp nz, .drawStaticInfo jp nz, .drawStaticInfo
call CheckAndAddHiscore
jp SwitchToTitle jp SwitchToTitle