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