Fix for lamp check in escape if entering from dark world. Also fixes the torch going out bug.

This commit is contained in:
aerinon
2023-01-27 15:12:30 -07:00
parent 8957b8db7b
commit 296c311b0a
3 changed files with 6 additions and 35 deletions

View File

@@ -110,8 +110,6 @@ org $9bece4
Palette_SpriteAux1:
org $8DFA53
jsl LampCheckOverride
org $828046 ; <- 10046 - Bank02.asm : 217 (JSL EnableForceBlank) (Start of Module_LoadFile)
jsl OnFileLoadOverride
org $87A93F ; < 3A93F - Bank07.asm 6548 (LDA $8A : AND.b #$40 - Mirror checks)

View File

@@ -1,27 +1,3 @@
;================================================================================
; Lamp Mantle & Light Cone Fix
;--------------------------------------------------------------------------------
; Output: 0 for darkness, 1 for lamp cone
;--------------------------------------------------------------------------------
LampCheckOverride:
LDA $7F50C4 : CMP.b #$01 : BNE + : RTL : +
CMP.b #$FF : BNE + : INC : RTL : +
LDA LampEquipment : BNE .done ; skip if we already have lantern
LDA CurrentWorld : BNE +
.lightWorld
LDA $040C : CMP.b #$04 : !BGE ++ ; check if we're in HC
LDA LampConeSewers : BRA .done
++
LDA LampConeLightWorld : BRA .done
+
.darkWorld
LDA LampConeDarkWorld
.done
;BNE + : STZ $1D : + ; remember to turn cone off after a torch
RTL
GtBossHeartCheckOverride:
lda $a0 : cmp #$1c : beq ++
cmp #$6c : beq ++

View File

@@ -9,15 +9,12 @@ LampCheck:
LDA LampEquipment : BNE .done ; skip if we already have lantern
LDA CurrentWorld : BNE +
.lightWorld
LDA $040C : BNE ++ ; check if we're in sewers
LDA $040C : CMP.b #$FF : BEQ +
CMP.b #$04 : BCS + ; check if we're in HC
LDA LampConeSewers : BRA .done
++
+ LDA CurrentWorld : BNE +
LDA LampConeLightWorld : BRA .done
+
.darkWorld
LDA LampConeDarkWorld
+ LDA LampConeDarkWorld
.done
;BNE + : STZ $1D : + ; remember to turn cone off after a torch
RTL