From 4669f7fbf8d41474b1c9eb475f92c1e80db6a649 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 23 Jun 2018 16:59:40 -0400 Subject: [PATCH] Remove useless indirection of the OnFileLoad event --- darkworldspawn.asm | 7 ------- events.asm | 6 +++++- hooks.asm | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/darkworldspawn.asm b/darkworldspawn.asm index 4630946..efd1de4 100644 --- a/darkworldspawn.asm +++ b/darkworldspawn.asm @@ -7,13 +7,6 @@ DarkWorldSaveFix: JSL.l StatSaveCounter 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: LDA.l Bugfix_MirrorlessSQToLW : BEQ .skip_mirror_check LDA $7EF353 : BEQ .noMirror ; check if we have the mirror diff --git a/events.asm b/events.asm index dec89a2..d7fc59d 100644 --- a/events.asm +++ b/events.asm @@ -64,6 +64,7 @@ RTL ;-------------------------------------------------------------------------------- !RNG_ITEM_LOCK_IN = "$7F5090" OnFileLoad: + SEP #$20 ; set 8 bit accumulator LDA !FRESH_FILE_MARKER : BNE + JSL.l OnNewFile LDA.b #$FF : STA !FRESH_FILE_MARKER @@ -76,10 +77,13 @@ OnFileLoad: LDA.l GenericKeys : BEQ + LDA $7EF38B : STA $7EF36F ; copy generic keys to key counter + - + JSL.l SetSilverBowMode JSL.l RefreshRainAmmo 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 ;-------------------------------------------------------------------------------- !RNG_ITEM_LOCK_IN = "$7F5090" diff --git a/hooks.asm b/hooks.asm index 131b715..fd5b6e0 100644 --- a/hooks.asm +++ b/hooks.asm @@ -1770,7 +1770,7 @@ org $00894A ; <- 94A PHB : JSL.l DarkWorldSaveFix ;-------------------------------------------------------------------------------- org $0CCF05 ; <- 64F05 -JSL.l DarkWorldLoadFix +JSL.l OnFileLoad NOP #7 ;-------------------------------------------------------------------------------- org $09F520 ; <- 4F520 - module_death.asm : 401 (LDA $7EF3C5 : CMP.b #$03 : BCS BRANCH_THETA)