Fix pot junk not showing as uncollected
This commit is contained in:
@@ -251,6 +251,10 @@ CheckPots:
|
|||||||
LDA.b [$04], Y
|
LDA.b [$04], Y
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
CMP.w #$0008 : BEQ .small_key
|
CMP.w #$0008 : BEQ .small_key
|
||||||
|
LDA.l PotCountMode
|
||||||
|
BEQ +
|
||||||
|
JSR CheckJunkPot
|
||||||
|
+
|
||||||
INY
|
INY
|
||||||
BRA .next_pot
|
BRA .next_pot
|
||||||
|
|
||||||
@@ -261,9 +265,9 @@ CheckPots:
|
|||||||
PHX
|
PHX
|
||||||
INY
|
INY
|
||||||
BRA .mask_set
|
BRA .mask_set
|
||||||
|
|
||||||
.major_item
|
.major_item
|
||||||
LDA.b [$04], Y
|
LDA.b [$04], Y
|
||||||
.continue
|
|
||||||
PHA
|
PHA
|
||||||
PHX
|
PHX
|
||||||
INY
|
INY
|
||||||
@@ -305,6 +309,47 @@ endif
|
|||||||
.done
|
.done
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
|
CheckJunkPot:
|
||||||
|
LDA.b [$04], Y
|
||||||
|
PHA
|
||||||
|
PHX
|
||||||
|
TXA : ASL A : TAX
|
||||||
|
LDA.l DungeonMask, X : STA.b $08
|
||||||
|
TXA : LSR A
|
||||||
|
JSR CheckPotSection
|
||||||
|
BCS +
|
||||||
|
PLX
|
||||||
|
PLA
|
||||||
|
RTS
|
||||||
|
+
|
||||||
|
|
||||||
|
LDA.b $CA
|
||||||
|
AND.w #$00FF
|
||||||
|
ASL A
|
||||||
|
TAX
|
||||||
|
LDA.l PotCollectionRateTable, X
|
||||||
|
AND.b $08
|
||||||
|
BEQ .not_important
|
||||||
|
|
||||||
|
if !FEATURE_FIX_BASEROM
|
||||||
|
LDA.l SpriteDropData, X
|
||||||
|
else
|
||||||
|
LDA.l RoomPotData, X
|
||||||
|
endif
|
||||||
|
AND.b $08
|
||||||
|
BNE .not_important
|
||||||
|
|
||||||
|
PLX
|
||||||
|
PLA
|
||||||
|
AND.w #$00FF
|
||||||
|
JSR GetPotJunkClass
|
||||||
|
RTS
|
||||||
|
|
||||||
|
.not_important
|
||||||
|
PLX
|
||||||
|
PLA
|
||||||
|
RTS
|
||||||
|
|
||||||
CheckEnemies:
|
CheckEnemies:
|
||||||
LDA.b $CA
|
LDA.b $CA
|
||||||
AND.w #$00FF
|
AND.w #$00FF
|
||||||
@@ -442,6 +487,29 @@ GetLootClass:
|
|||||||
PLX
|
PLX
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
|
; A = item id
|
||||||
|
; updates "best loot" value if better
|
||||||
|
GetPotJunkClass:
|
||||||
|
PHX
|
||||||
|
TAX
|
||||||
|
|
||||||
|
LDA.b $0E
|
||||||
|
BEQ .done
|
||||||
|
CMP.w #$0001
|
||||||
|
BEQ .value_set
|
||||||
|
|
||||||
|
; hardcode as junk for now
|
||||||
|
LDA.w #$0002
|
||||||
|
|
||||||
|
.value_set
|
||||||
|
CMP.b $02
|
||||||
|
BCC .done
|
||||||
|
STA.b $02
|
||||||
|
|
||||||
|
.done
|
||||||
|
PLX
|
||||||
|
RTS
|
||||||
|
|
||||||
macro DefineGetFooSection(type, offset)
|
macro DefineGetFooSection(type, offset)
|
||||||
Get<type>Section:
|
Get<type>Section:
|
||||||
PHX
|
PHX
|
||||||
|
|||||||
Reference in New Issue
Block a user