Merge remote-tracking branch 'baserom/master' into MergeDecompression
# Conflicts: # LTTP_RND_GeneralBugfixes.asm # bookofmudora.asm # build.bat # catfish.asm # compasses.asm # contrib.asm # darkworldspawn.asm # entrances.asm # events.asm # floodgatesoftlock.asm # flute.asm # framehook.asm # goalitem.asm # halfmagicbat.asm # heartpieces.asm # hooks.asm # inventory.asm # invertedmaps.asm # itemtext_lower.asm # lampmantlecone.asm # mantle.asm # msu.asm # music.asm # newhud.asm # newitems.asm # pendantcrystalhud.asm # ram.asm # rngfixes.asm # roomloading.asm # shopkeeper.asm # stats.asm # stats/credits.asm # stats/creditsnew.asm # stats/statConfig.asm # tables.asm # tablets.asm # utilities.asm # zoraking.asm
This commit is contained in:
@@ -4,36 +4,49 @@
|
||||
; Output: 0 for darkness, 1 for lamp cone
|
||||
;--------------------------------------------------------------------------------
|
||||
LampCheck:
|
||||
LDA $7F50C4 : CMP.b #$01 : BNE + : RTL : +
|
||||
CMP.b #$FF : BNE + : INC : RTL : +
|
||||
|
||||
LDA LampEquipment : BNE .done ; skip if we already have lantern
|
||||
|
||||
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
|
||||
+ LDA LampConeDarkWorld
|
||||
.done
|
||||
;BNE + : STZ $1D : + ; remember to turn cone off after a torch
|
||||
LDA.l LightConeModifier : BNE .lamp
|
||||
LDA.l LampEquipment : BNE .lamp ; skip if we already have lantern
|
||||
LDA.w DungeonID : CMP.b #$04 : BCS + ; are we en HC?
|
||||
LDA.l LampConeSewers : RTL
|
||||
+ : TDC
|
||||
.lamp
|
||||
RTL
|
||||
;================================================================================
|
||||
;--------------------------------------------------------------------------------
|
||||
; Output: 0 locked, 1 open
|
||||
; Output: 0 locked, 1 openA
|
||||
;--------------------------------------------------------------------------------
|
||||
CheckForZelda:
|
||||
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
|
||||
LDA.b #$01 ; pretend we have zelda anyway
|
||||
RTL
|
||||
+
|
||||
LDA FollowerIndicator
|
||||
LDA.l ProgressIndicator : CMP.b #$02 : !BLT + ; Skip if rain is falling
|
||||
LDA.b #$01 ; pretend we have zelda anyway
|
||||
RTL
|
||||
+
|
||||
LDA.l FollowerIndicator
|
||||
RTL
|
||||
;================================================================================
|
||||
;--------------------------------------------------------------------------------
|
||||
SetOverlayIfLamp:
|
||||
JSL.l LampCheck
|
||||
STA $1D ; write it directly to the overlay, this isn't a terrible idea at all
|
||||
JSL.l LampCheck
|
||||
STA.b SUBDESQ ; write it directly to the overlay, this isn't a terrible idea at all
|
||||
RTL
|
||||
;================================================================================
|
||||
;LDA CurrentWorld : EOR #$40 : LSR #6 : AND #$01 ; return the same result as having the lantern in the light world
|
||||
; Mantle Object Changes
|
||||
;--------------------------------------------------------------------------------
|
||||
Mantle_CorrectPosition:
|
||||
LDA.l ProgressFlags : AND.b #$04 : BEQ +
|
||||
LDA.b #$0A : STA.w SpritePosXLow, X ; just spawn it off to the side where we know it should be
|
||||
LDA.b #$03 : STA.w SpritePosXHigh, X
|
||||
LDA.b #$90 : STA.w SpriteSpawnStep, X
|
||||
+
|
||||
LDA.w SpritePosYLow, X : !ADD.b #$03 ; thing we did originally
|
||||
RTL
|
||||
|
||||
;================================================================================
|
||||
; Mirror Scroll -> Spawn at Zelda's Cell
|
||||
;--------------------------------------------------------------------------------
|
||||
MirrorScrollSpawnZelda:
|
||||
LDA.l MirrorEquipment : CMP.b #$01 : BNE + ;mirror scroll
|
||||
LDA.l StartingEntrance : CMP.b #$02 : BEQ ++ ; zelda's cell
|
||||
CMP.b #$04 : BNE +
|
||||
++ INC $04AA
|
||||
; what we replaced
|
||||
+ STZ.b $11 : STZ.b $14
|
||||
RTL
|
||||
|
||||
Reference in New Issue
Block a user