Add dungeons completed bitfield from door rando

This commit is contained in:
cassidoxa
2022-02-23 12:42:21 -05:00
parent 838d4e9bf8
commit 5d943d9a6d
2 changed files with 36 additions and 4 deletions

View File

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