Multiworld junk item shortening

This commit is contained in:
2025-03-17 19:02:02 -05:00
parent 66e4e91beb
commit e92aa018e3
4 changed files with 94 additions and 9 deletions

View File

@@ -270,6 +270,62 @@ SetItemRiseTimer:
LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest
LDA.b #$38 : STA.w AncillaTimer, X LDA.b #$38 : STA.w AncillaTimer, X
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
BEQ .default
.junk
LDA.l MultiworldJunkItemTimer : STA.w AncillaTimer, X
RTL
.default
TYA : STA.w AncillaTimer, X ; What we wrote over TYA : STA.w AncillaTimer, X ; What we wrote over
RTL
;--------------------------------------------------------------------------------
ItemIsJunk:
PHX
LDX.b #JunkItems_end-JunkItems-1
-
CMP.l JunkItems, X : BEQ .junk
DEX : BPL -
PLX
LDA.b #$00
RTL
.junk
PLX
LDA.b #$01
RTL
RTL RTL
JunkItems:
db $27 ; Bomb
db $28 ; 3 bombs
db $31 ; 10 bombs
db $34 ; 1 rupee
db $35 ; 5 rupees
db $36 ; 20 rupees
db $40 ; 100 rupees
db $41 ; 50 rupees
db $42 ; Heart
db $43 ; Arrow
db $44 ; 10 arrows
db $45 ; Small magic
db $46 ; 300 rupees
db $47 ; 20 rupees green
db $59 ; Rupoor
db $D1 ; Apples
db $D2 ; Fairy
db $D3 ; Chicken
db $D4 ; Big Magic
db $D5 ; 5 Arrows
db $D6 ; Good Bee
.end
;--------------------------------------------------------------------------------

View File

@@ -806,10 +806,19 @@ RTL
; A = item id being collected ; A = item id being collected
ItemGetAlternateSFX: ItemGetAlternateSFX:
PEA.w $C567 ; SNES to RTS to in bank 08 PEA.w $C567 ; SNES to RTS to in bank 08
LDA.w AncillaGet,X : CMP.b #$4A : BNE + 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
+ ; normal itemget sfx + ; 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
.multijunk
LDA.b #$3B : JML Ancilla_SFX3_Near ; what we wrote over
.normal
LDA.b #$0F : JML Ancilla_SFX3_Near ; what we wrote over LDA.b #$0F : JML Ancilla_SFX3_Near ; what we wrote over
; A = item id being collected ; A = item id being collected
@@ -818,6 +827,16 @@ 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
.multijunk
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$3B : STA.w SFX3
RTL
.normal
JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$0F : STA.w SFX3 ; what we wrote over JSL Sound_SetSfxPanWithPlayerCoords : ORA.b #$0F : STA.w SFX3 ; what we wrote over
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------

View File

@@ -23,8 +23,14 @@ NewHUD_DrawBombs:
BRA .draw BRA .draw
.finite .finite
LDA.w BombCapacity : BEQ .no_bomb_bag
LDA.w BombsEquipment LDA.w BombsEquipment
JSR HUDHex2Digit JSR HUDHex2Digit
BRA .draw
.no_bomb_bag
LDY.w #!BlankTile
TYX
.draw .draw
STY.w HUDBombCount+0 STY.w HUDBombCount+0

View File

@@ -426,7 +426,11 @@ db $00 ; #$00 = Original Behavior (default) - #$01 = Mimics move when link dashe
CrystalSwitchBook: CrystalSwitchBook:
db $00 ; #$00 = Original Behavior (default) - #$01 = Book can flip crystal switch db $00 ; #$00 = Original Behavior (default) - #$01 = Book can flip crystal switch
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
; 0x1800A7 - 0x1800AF (unused) ; 0x1800A7 - 0x1800AE (unused)
;--------------------------------------------------------------------------------
org $B080AF ; PC 0x1800AF
MultiworldJunkItemTimer:
db $00 ; number of frames to show junk items in a multiworld (#$00 = no change)
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
org $B080B0 ; 0x1800B0-0x1800BF org $B080B0 ; 0x1800B0-0x1800BF
StaticDecryptionKey: StaticDecryptionKey: