From 616748b831ea52d174d938d0374d14ee50721c90 Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Thu, 4 Jun 2020 20:23:18 -0500 Subject: [PATCH 1/2] Show items in dark rooms, written by Zarby89 and kan. --- LTTP_RND_GeneralBugfixes.asm | 1 + darkroomitems.asm | 25 +++++++++++++++++++++++++ hooks.asm | 4 ++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 darkroomitems.asm diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index c15b20c..e530af4 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -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 diff --git a/darkroomitems.asm b/darkroomitems.asm new file mode 100644 index 0000000..ad577b6 --- /dev/null +++ b/darkroomitems.asm @@ -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 \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index 149352d..73a35d4 100755 --- a/hooks.asm +++ b/hooks.asm @@ -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 From d97b52a6d1edbf5dc0fcc15e32af54b941b68c2e Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Sat, 6 Jun 2020 09:07:22 -0500 Subject: [PATCH 2/2] allow bunny link to read signposts --- hooks.asm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hooks.asm b/hooks.asm index 73a35d4..898cf72 100755 --- a/hooks.asm +++ b/hooks.asm @@ -2495,4 +2495,26 @@ dw 37, 11 : db $FB, $40, $00, $00 dw 37, 11 : db $FB, $40, $00, $00 dw 37, 11 : db $FB, $40, $00, $00 dw 37, 11 : db $FB, $40, $00, $00 -;================================================================================ \ No newline at end of file +;================================================================================ + +;-------------------------------------------------------------------------------- +; 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 +;================================================================================