Merge pull request #84 from tcprescott/darkrooms

Show items in dark rooms
This commit is contained in:
Salvatore
2020-06-07 19:54:14 -04:00
committed by GitHub
3 changed files with 51 additions and 3 deletions

View File

@@ -195,6 +195,7 @@ incsrc hudtext.asm
incsrc servicerequest.asm
incsrc elder.asm
incsrc toast.asm
incsrc darkroomitems.asm
warnpc $A58000
;org $228000 ; contrib area

25
darkroomitems.asm Normal file
View File

@@ -0,0 +1,25 @@
CheckReceivedItemPropertiesBeforeLoad:
LDA $7EC005 : BNE .lightOff
LDA.l AddReceivedItemExpanded_properties, X ;Restore Rando Code
RTL
.lightOff
PHX : PHY : PHB
LDA.l AddReceivedItemExpanded_properties, X ; get palette
REP #$30
AND #$0007 ; mask out palette
ASL #5 ; multiply by 32
ADC #$C610 ; offset to latter half
TAX ; give to destination
LDY #$C610 ; target palette SP0 colors 8-F
LDA #$000F ; 16 bytes
MVN $7E, $7E ; move palette
SEP #$30
PLB : PLY : PLX
INC $15
LDA #$00
RTL

View File

@@ -858,13 +858,13 @@ org $098908 ; 48908 - ancilla_init.asm:1258 (LDA .x_offsets, Y)
LDA.w AddReceivedItemExpanded_x_offsets, Y
org $08C6C8 ; 446C8 - ancilla_receive_item.asm:538 (LDA AddReceiveItem.properties, X)
LDA.l AddReceivedItemExpanded_properties, X
JSL CheckReceivedItemPropertiesBeforeLoad
org $08C6DE ; 446DE - ancilla_receive_item.asm:550 (LDA .wide_item_flag, X)
LDA.l AddReceivedItemExpanded_wide_item_flag, X
org $08C6F9 ; 446F9 - ancilla_receive_item.asm:570 (LDA AddReceiveItem.properties, X)
LDA.l AddReceivedItemExpanded_properties, X
JSL CheckReceivedItemPropertiesBeforeLoad
org $08C70F ; 4470F - ancilla_receive_item.asm : 582 - (LDA.b #$00 : STA ($92), Y)
JSL.l LoadNarrowObject
@@ -2496,3 +2496,25 @@ dw 37, 11 : db $FB, $40, $00, $00
dw 37, 11 : db $FB, $40, $00, $00
dw 37, 11 : db $FB, $40, $00, $00
;================================================================================
;--------------------------------------------------------------------------------
; Allow Bunny Link to Read Signposts
;--------------------------------------------------------------------------------
org $07839E ; bunny BAGE check
BunnyRead:
JSR.w $07B5A9 ; check A button
BCC .noA
JSR.w CheckIfReading
BNE .noread
JSR.w $07B4DB
NOP
.noread
.noA
org $07FFF4
CheckIfReading:
JSR.w $07D36C ; check action
LDA #$80 : TRB $3B
CPX #$04
RTS
;================================================================================