Dungeon completion flags, that indicate for which dungeons the prize was collected from.

This commit is contained in:
CaitSith2
2021-02-10 09:25:11 -08:00
parent 244b622074
commit d3af10649c
2 changed files with 32 additions and 0 deletions

View File

@@ -415,6 +415,7 @@ AddInventory:
BRL .done BRL .done
+ CPY.b #$20 : BNE + ; Crystal + CPY.b #$20 : BNE + ; Crystal
JSR .incrementCrystal JSR .incrementCrystal
JSR .setDungeonCompletion
BRL .done BRL .done
+ CPY.b #$21 : BNE + ; Bug Net + CPY.b #$21 : BNE + ; Bug Net
JSR .incrementY JSR .incrementY
@@ -457,6 +458,7 @@ AddInventory:
+ CPY.b #$37 : !BLT + ; Items $37 - $39 - Pendants + CPY.b #$37 : !BLT + ; Items $37 - $39 - Pendants
CPY.b #$3A : !BGE + CPY.b #$3A : !BGE +
JSR .incrementPendant JSR .incrementPendant
JSR .setDungeonCompletion
BRL .done BRL .done
+ CPY.b #$3A : !BLT + ; Items $3A - $3B - Bow & Silver Arrows + CPY.b #$3A : !BLT + ; Items $3A - $3B - Bow & Silver Arrows
CPY.b #$3C : !BGE + CPY.b #$3C : !BGE +
@@ -715,6 +717,33 @@ RTL
%BottomHalf($7EF426) %BottomHalf($7EF426)
+ +
RTS RTS
.setDungeonCompletion
LDA $040C
CMP #$FF : BEQ +
LSR : AND #$0F : CMP #$08 : !BGE ++
JSR .valueShift
ORA $7EF46B : STA $7EF46B
BRA +
++
!SUB #$08
JSR .valueShift
BIT.b #$C0 : BEQ +++ : LDA.b #$C0 : +++ ; Make Hyrule Castle / Sewers Count for Both
ORA $7EF46C : STA $7EF46C
+
RTS
.valueShift
PHX
TAX : LDA.b #$01
-
CPX #$00 : BEQ +
ASL
DEX
BRA -
+
PLX
RTS
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -114,6 +114,8 @@
; m - mail counter ; m - mail counter
; k - small keys ; k - small keys
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
; $7EF46Bw[2] - Dungeon prizes collected by dungeon location.
;--------------------------------------------------------------------------------
; $7EF4C0 - 7EF4CF - locations checked, indexed by 040C >> 1 ; $7EF4C0 - 7EF4CF - locations checked, indexed by 040C >> 1
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -387,6 +389,7 @@ IndoorSubtileTransitionCounter:
STZ $0642 STZ $0642
JMP StatTransitionCounter JMP StatTransitionCounter
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
!DUNGEON_PRIZE_COLLECTED = "$7EF46B"
!CHEST_COUNTER = "$7EF442" !CHEST_COUNTER = "$7EF442"
!MAIL_COUNTER = "$7EF46A" ; mmkkkkkk !MAIL_COUNTER = "$7EF46A" ; mmkkkkkk
!BOSS_KILLS = "$7F5037" !BOSS_KILLS = "$7F5037"