Fix starting equipment on file select

This commit is contained in:
Catobat
2020-12-16 19:58:33 +01:00
parent 078aebed8d
commit 0c608c1380
2 changed files with 9 additions and 3 deletions

View File

@@ -80,6 +80,12 @@ OnAga2Defeated:
JSL.l IncrementAgahnim2Sword JSL.l IncrementAgahnim2Sword
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
OnFileCreation:
TAX ; what we wrote over
LDA StartingEquipment+$4C : STA $700340+$4C ; copy starting equipment swaps to file select screen
LDA StartingEquipment+$4E : STA $700340+$4E
RTL
;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090" !RNG_ITEM_LOCK_IN = "$7F5090"
OnFileLoad: OnFileLoad:
REP #$10 ; set 16 bit index registers REP #$10 ; set 16 bit index registers
@@ -147,8 +153,6 @@ OnNewFile:
+ +
LDA StartingSword : STA $7EF359 ; set starting sword type LDA StartingSword : STA $7EF359 ; set starting sword type
LDA !INVENTORY_SWAP : STA $70038C ; copy starting equipment swaps to file select screen
LDA !INVENTORY_SWAP_2 : STA $70038E
; reset some values on new file that are otherwise only reset on hard reset ; reset some values on new file that are otherwise only reset on hard reset
STZ $03C4 ; ancilla slot index STZ $03C4 ; ancilla slot index

View File

@@ -261,7 +261,9 @@ org $0CCE85 ; <- Bank0C.asm : 1953 (LDA $C8 : ASL A : INC #2 : STA $701FFE)
NOP #4 NOP #4
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $0CDB4C ; <- Bank0C.asm : 3655 (LDA $C8 : ASL A : INC #2 : STA $701FFE : TAX) org $0CDB4C ; <- Bank0C.asm : 3655 (LDA $C8 : ASL A : INC #2 : STA $701FFE : TAX)
NOP #4 JSL OnFileCreation
NOP
;Additionally, display inventory swap starting equipment on file select
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $09F5EA ; <- module_death.asm : 510 (LDA $701FFE : TAX : DEX #2) org $09F5EA ; <- module_death.asm : 510 (LDA $701FFE : TAX : DEX #2)
LDA.w #$0002 : NOP LDA.w #$0002 : NOP