Improve junk item configuration
This commit is contained in:
28
bugfixes.asm
28
bugfixes.asm
@@ -274,18 +274,11 @@ SetItemRiseTimer:
|
|||||||
RTL
|
RTL
|
||||||
|
|
||||||
.not_from_chest
|
.not_from_chest
|
||||||
LDA.l MultiworldJunkItemTimer : BEQ .default
|
|
||||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .multiworld
|
|
||||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .multiworld
|
|
||||||
BRA .default
|
|
||||||
|
|
||||||
.multiworld
|
|
||||||
LDA.l !MULTIWORLD_ITEM_ID
|
|
||||||
JSL.l ItemIsJunk
|
JSL.l ItemIsJunk
|
||||||
BEQ .default
|
BEQ .default
|
||||||
|
|
||||||
.junk
|
.junk
|
||||||
LDA.l MultiworldJunkItemTimer : STA.w AncillaTimer, X
|
LDA.l JunkItemTimer : AND.b #$3F : STA.w AncillaTimer, X
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
.default
|
.default
|
||||||
@@ -294,10 +287,24 @@ SetItemRiseTimer:
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
ItemIsJunk:
|
ItemIsJunk:
|
||||||
PHX
|
PHX
|
||||||
LDX.b #JunkItems_end-JunkItems-1
|
LDA.l JunkItemTimer : BIT.b #$3F : BEQ .not_junk
|
||||||
|
BIT.b #$80 : BNE .check
|
||||||
|
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .check
|
||||||
|
LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .check
|
||||||
|
BRA .not_junk
|
||||||
|
|
||||||
|
.check
|
||||||
|
LDA.l JunkItemTimer : AND.b #$40
|
||||||
|
BEQ +
|
||||||
|
LDA.b #JunkItems_triforce_end-JunkItems_end
|
||||||
|
+
|
||||||
|
CLC : ADC.b #JunkItems_end-JunkItems-1
|
||||||
|
LDA.w AncillaGet, X
|
||||||
|
TAX
|
||||||
-
|
-
|
||||||
CMP.l JunkItems, X : BEQ .junk
|
CMP.l JunkItems, X : BEQ .junk
|
||||||
DEX : BPL -
|
DEX : BPL -
|
||||||
|
.not_junk
|
||||||
PLX
|
PLX
|
||||||
LDA.b #$00
|
LDA.b #$00
|
||||||
RTL
|
RTL
|
||||||
@@ -330,4 +337,7 @@ JunkItems:
|
|||||||
db $D5 ; 5 Arrows
|
db $D5 ; 5 Arrows
|
||||||
db $D6 ; Good Bee
|
db $D6 ; Good Bee
|
||||||
.end
|
.end
|
||||||
|
db $6B ; Power Star
|
||||||
|
db $6C ; Triforce Piece
|
||||||
|
.triforce_end
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -810,12 +810,9 @@ LDA.w AncillaGet, X : CMP.b #$4A : BNE +
|
|||||||
; collecting pre-activated flute
|
; collecting pre-activated flute
|
||||||
LDA.b #$13 : JML Ancilla_SFX2_Near
|
LDA.b #$13 : JML Ancilla_SFX2_Near
|
||||||
+ ; not pre-activated flute
|
+ ; not pre-activated flute
|
||||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BEQ .normal
|
|
||||||
LDA.l MultiworldJunkItemTimer : BEQ .normal
|
|
||||||
LDA.w AncillaGet, X
|
|
||||||
JSL.l ItemIsJunk : BEQ .normal
|
JSL.l ItemIsJunk : BEQ .normal
|
||||||
|
|
||||||
.multijunk
|
.junk
|
||||||
LDA.b #$3B : JML Ancilla_SFX3_Near ; what we wrote over
|
LDA.b #$3B : JML Ancilla_SFX3_Near ; what we wrote over
|
||||||
|
|
||||||
.normal
|
.normal
|
||||||
@@ -827,12 +824,9 @@ CPY.b #$4A : BNE +
|
|||||||
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$13 : STA.w SFX2
|
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$13 : STA.w SFX2
|
||||||
RTL
|
RTL
|
||||||
+ ; normal itemget sfx
|
+ ; normal itemget sfx
|
||||||
LDA.l !MULTIWORLD_RECEIVING_ITEM : BEQ .normal
|
|
||||||
LDA.l MultiworldJunkItemTimer : BEQ .normal
|
|
||||||
TYA
|
|
||||||
JSL.l ItemIsJunk : BEQ .normal
|
JSL.l ItemIsJunk : BEQ .normal
|
||||||
|
|
||||||
.multijunk
|
.junk
|
||||||
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
|
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
|
||||||
RTL
|
RTL
|
||||||
|
|
||||||
|
|||||||
11
tables.asm
11
tables.asm
@@ -463,9 +463,16 @@ db $00 ; #$00 = Original Behavior (default) - #$01 = Book can flip crystal switc
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
; 0x1800A7 - 0x1800AE (unused)
|
; 0x1800A7 - 0x1800AE (unused)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
|
; 0x1800AF
|
||||||
|
; mtff ffff
|
||||||
|
;
|
||||||
|
; m - 0 = only shorten timer on multiworld items, 1 = shorten all items
|
||||||
|
; t - 0 = triforce pieces considered important, 1 = triforce pieces considered junk
|
||||||
|
; f - number of frames to show items
|
||||||
|
;--------------------------------------------------------------------------------
|
||||||
org $B080AF ; PC 0x1800AF
|
org $B080AF ; PC 0x1800AF
|
||||||
MultiworldJunkItemTimer:
|
JunkItemTimer:
|
||||||
db $00 ; number of frames to show junk items in a multiworld (#$00 = no change)
|
db $00 ; number of frames to show junk items (#$00 = no change)
|
||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
org $B080B0 ; 0x1800B0-0x1800BF
|
org $B080B0 ; 0x1800B0-0x1800BF
|
||||||
StaticDecryptionKey:
|
StaticDecryptionKey:
|
||||||
|
|||||||
Reference in New Issue
Block a user