Stats: Fix bonk counter

This commit is contained in:
Bonta
2021-06-20 15:15:55 +02:00
parent 14844400b3
commit b16f7b4994
3 changed files with 6 additions and 6 deletions

View File

@@ -570,6 +570,9 @@ AddDashTremor:
org $099D04 org $099D04
AddAncillaLong: AddAncillaLong:
org $099D1A
Ancilla_CheckIfAlreadyExistsLong:
org $09AE64 org $09AE64
Sprite_SetSpawnedCoords: Sprite_SetSpawnedCoords:

View File

@@ -142,17 +142,14 @@
!LOCK_STATS = "$7EF443" !LOCK_STATS = "$7EF443"
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
!BONK_COUNTER = "$7EF420" !BONK_COUNTER = "$7EF420"
!BONK_REPEAT = "$7F503F"
!LOOP_FRAMES_LOW = "$7EF42E"
StatBonkCounter: StatBonkCounter:
PHA PHA
JSL Ancilla_CheckIfAlreadyExistsLong : BCS +
LDA !LOCK_STATS : BNE + LDA !LOCK_STATS : BNE +
LDA !LOOP_FRAMES_LOW : !SUB !BONK_REPEAT : CMP #30 : !BLT +
LDA !LOOP_FRAMES_LOW : STA !BONK_REPEAT
LDA !BONK_COUNTER : INC LDA !BONK_COUNTER : INC
CMP.b #100 : BEQ + ; decimal 100 CMP.b #100 : BEQ + ; decimal 100
STA !BONK_COUNTER STA !BONK_COUNTER
+ +
PLA PLA
JSL.l AddDashTremor ; thing we wrote over JSL.l AddDashTremor ; thing we wrote over
RTL RTL

View File

@@ -1471,7 +1471,7 @@ dw #9999 ; Rupee Limit
; $7F503C - Stats Rupee Total ; $7F503C - Stats Rupee Total
; $7F503D - Stats Rupee Total ; $7F503D - Stats Rupee Total
; $7F503E - Stats Item Total ; $7F503E - Stats Item Total
; $7F503F - Bonk Repeat ; $7F503F - Unused
; $7F5040 - Free Item Dialog Temporary ; $7F5040 - Free Item Dialog Temporary
; $7F5041 - Epilepsy Safety Timer ; $7F5041 - Epilepsy Safety Timer
; $7F5042 - Tile Upload Offset Override (Low) ; $7F5042 - Tile Upload Offset Override (Low)