Remove useless indirection of the OnFileLoad event

This commit is contained in:
Kevin Cathcart
2018-06-23 16:59:40 -04:00
parent f573796244
commit 4669f7fbf8
3 changed files with 6 additions and 9 deletions

View File

@@ -7,13 +7,6 @@ DarkWorldSaveFix:
JSL.l StatSaveCounter JSL.l StatSaveCounter
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DarkWorldLoadFix:
SEP #$20 ; set 8 bit accumulator
JSL.l OnFileLoad
REP #$20 ; restore 16 bit accumulator
LDA.w #$0007 : STA $7EC00D : STA $7EC013 ; thing we wrote over - sets up some graphics timers
RTL
;--------------------------------------------------------------------------------
DoWorldFix: DoWorldFix:
LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check
LDA $7EF353 : BEQ .noMirror ; check if we have the mirror LDA $7EF353 : BEQ .noMirror ; check if we have the mirror

View File

@@ -64,6 +64,7 @@ RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090" !RNG_ITEM_LOCK_IN = "$7F5090"
OnFileLoad: OnFileLoad:
SEP #$20 ; set 8 bit accumulator
LDA !FRESH_FILE_MARKER : BNE + LDA !FRESH_FILE_MARKER : BNE +
JSL.l OnNewFile JSL.l OnNewFile
LDA.b #$FF : STA !FRESH_FILE_MARKER LDA.b #$FF : STA !FRESH_FILE_MARKER
@@ -80,6 +81,9 @@ OnFileLoad:
JSL.l SetSilverBowMode JSL.l SetSilverBowMode
JSL.l RefreshRainAmmo JSL.l RefreshRainAmmo
JSL.l SetEscapeAssist JSL.l SetEscapeAssist
REP #$20 ; restore 16 bit accumulator
LDA.w #$0007 : STA $7EC00D : STA $7EC013 ; thing we wrote over - sets up some graphics timers
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
!RNG_ITEM_LOCK_IN = "$7F5090" !RNG_ITEM_LOCK_IN = "$7F5090"

View File

@@ -1770,7 +1770,7 @@ org $00894A ; <- 94A
PHB : JSL.l DarkWorldSaveFix PHB : JSL.l DarkWorldSaveFix
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $0CCF05 ; <- 64F05 org $0CCF05 ; <- 64F05
JSL.l DarkWorldLoadFix JSL.l OnFileLoad
NOP #7 NOP #7
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $09F520 ; <- 4F520 - module_death.asm : 401 (LDA $7EF3C5 : CMP.b #$03 : BCS BRANCH_THETA) org $09F520 ; <- 4F520 - module_death.asm : 401 (LDA $7EF3C5 : CMP.b #$03 : BCS BRANCH_THETA)