Dark room modes
This commit is contained in:
@@ -2182,6 +2182,9 @@ JSL LampCheck
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $81F503 ; <- F503 - Bank01.asm:14994 (LDA.b #$01 : STA $1D)
|
org $81F503 ; <- F503 - Bank01.asm:14994 (LDA.b #$01 : STA $1D)
|
||||||
JSL SetOverlayIfLamp
|
JSL SetOverlayIfLamp
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
org $81B610 ; <- loading whether room is dark
|
||||||
|
JSL DarkRoomCheck
|
||||||
;================================================================================
|
;================================================================================
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
@@ -2736,4 +2739,4 @@ NOP #2 ; this fixes Link's direction after mirroring and falling after entering
|
|||||||
; Enable new room header table
|
; Enable new room header table
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $81B5E6
|
org $81B5E6
|
||||||
LDA.b #$30
|
LDA.b #$30
|
||||||
|
|||||||
@@ -6,12 +6,30 @@
|
|||||||
LampCheck:
|
LampCheck:
|
||||||
LDA.l LightConeModifier : BNE .lamp
|
LDA.l LightConeModifier : BNE .lamp
|
||||||
LDA.l LampEquipment : BNE .lamp ; skip if we already have lantern
|
LDA.l LampEquipment : BNE .lamp ; skip if we already have lantern
|
||||||
|
LDA.l LampCone : AND.b #$10 : BNE .lamp
|
||||||
LDA.w DungeonID : CMP.b #$04 : BCS + ; are we en HC?
|
LDA.w DungeonID : CMP.b #$04 : BCS + ; are we en HC?
|
||||||
LDA.l LampConeSewers : RTL
|
LDA.l LampCone : AND.b #$01 : RTL
|
||||||
+ : TDC
|
+ : TDC
|
||||||
.lamp
|
.lamp
|
||||||
RTL
|
RTL
|
||||||
;================================================================================
|
;================================================================================
|
||||||
|
; Dark Room checks
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
; Output: 0 for normal room, 1 for darkness
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
|
DarkRoomCheck:
|
||||||
|
LDA.l LampCone : AND.b #$20 : BNE .no_dark
|
||||||
|
LDA.b [$0D], Y
|
||||||
|
AND.b #$01
|
||||||
|
RTL
|
||||||
|
.no_dark
|
||||||
|
LDA.b $A0 : ORA.b $A1 : BNE .not_dark
|
||||||
|
LDA.b #$01 ; ganon's room
|
||||||
|
RTL
|
||||||
|
.not_dark
|
||||||
|
LDA.b #$00 ; not ganon's room, so no darkness
|
||||||
|
RTL
|
||||||
|
;================================================================================
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; Output: 0 locked, 1 open
|
; Output: 0 locked, 1 open
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ RupoorDeduction:
|
|||||||
dw $000A ; #$0A - Default (10 decimal)
|
dw $000A ; #$0A - Default (10 decimal)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B08038 ; PC 0x180038
|
org $B08038 ; PC 0x180038
|
||||||
LampConeSewers:
|
LampCone:
|
||||||
db $01 ; #$00 = Off - #$01 = On (default)
|
db $01 ; #$00 = Off - #$01 = On in Sewers (default) - #$10 = On Always - #$20 = No Dark Rooms
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B08039 ; PC 0x180039
|
org $B08039 ; PC 0x180039
|
||||||
ItemCounterHUD:
|
ItemCounterHUD:
|
||||||
|
|||||||
Reference in New Issue
Block a user