Compass and map HUD display modes properly skip or draw
Minor key count refactor, count HC and Sewers as both in all cases
This commit is contained in:
33
stats.asm
33
stats.asm
@@ -115,21 +115,24 @@ CountChestKeyLong: ; called from ItemDowngradeFix in itemdowngrade.asm
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
CountChestKey: ; called by neighbor functions
|
||||
PHA : PHX
|
||||
CPY.b #$24 : BEQ + ; small key for this dungeon - use DungeonID
|
||||
CPY.b #$A0 : !BLT .end ; Ignore most items
|
||||
CPY.b #$AE : !BGE .end ; Ignore reserved key and generic key
|
||||
TYA : AND.B #$0F : BNE ++ ; If this is an HC key, instead count it as a sewers key
|
||||
INC
|
||||
++ TAX : BRA .count ; use Key id instead of DungeonID (Keysanity)
|
||||
+ LDA.w DungeonID : LSR
|
||||
BNE +
|
||||
INC ; combines HC and Sewer counts
|
||||
+ TAX
|
||||
.count
|
||||
LDA.l DungeonCollectedKeys, X : INC : STA.l DungeonCollectedKeys, X
|
||||
.end
|
||||
PLX : PLA
|
||||
PHA : PHX
|
||||
CPY.b #$24 : BEQ + ; small key for this dungeon - use DungeonID
|
||||
CPY.b #$A0 : !BLT .end ; Ignore most items
|
||||
CPY.b #$AE : !BGE .end ; Ignore reserved key and generic key
|
||||
TAX : BRA .count ; use Key id instead of DungeonID (Keysanity)
|
||||
+
|
||||
LDA.w DungeonID : LSR : TAX
|
||||
.count
|
||||
LDA.l DungeonCollectedKeys, X : INC : STA.l DungeonCollectedKeys, X
|
||||
|
||||
CPX.b #$00 : BNE +
|
||||
STA.l HCCollectedKeys ; copy HC to sewers
|
||||
+
|
||||
CPX.b #$01 : BNE +
|
||||
STA.l SewerCollectedKeys ; copy sewers to HC
|
||||
+
|
||||
.end
|
||||
PLX : PLA
|
||||
RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
CountBonkItem: ; called from GetBonkItem in bookofmudora.asm
|
||||
|
||||
Reference in New Issue
Block a user