Files
alttpr-baserom/darkroomitems.asm
spannerisms 0397623340 cassidy
item properties tabulated with a macro
new item graphics
better hex to dec code
some item code readability improvements
2022-12-05 00:18:27 -05:00

28 lines
632 B
NASM

CheckReceivedItemPropertiesBeforeLoad:
LDA.b RoomIndex : BEQ .normalCode
LDA.l RoomFade : BNE .lightOff
.normalCode
LDA.l ItemReceipts_palette, X ;Restore Rando Code
RTL
.lightOff
PHX : PHY : PHB
LDA.l ItemReceipts_palette, X ; get palette
REP #$30
AND.w #$0007 ; mask out palette
ASL #5 ; multiply by 32
ADC.w #$C610 ; offset to latter half
TAX ; give to destination
LDY.w #$C610 ; target palette SP0 colors 8-F
LDA.w #$000F ; 16 bytes
MVN $7E, $7E ; move palette
SEP #$30
PLB : PLY : PLX
INC.b NMICGRAM
LDA.b #$00
RTL