Fix cave state item cutscene flag with boss hearts
Add item substitutions
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
LoadLibraryItemGFX:
|
LoadLibraryItemGFX:
|
||||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteID, X
|
STA.w SpriteID, X
|
||||||
JSL.l PrepDynamicTile_loot_resolved
|
JSL.l PrepDynamicTile_loot_resolved
|
||||||
@@ -30,6 +31,7 @@ LoadBonkItemGFX:
|
|||||||
LoadBonkItemGFX_inner:
|
LoadBonkItemGFX_inner:
|
||||||
LDA.b #$00 : STA.l RedrawFlag
|
LDA.b #$00 : STA.l RedrawFlag
|
||||||
JSR LoadBonkItem
|
JSR LoadBonkItem
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteItemType, X
|
STA.w SpriteItemType, X
|
||||||
STA.w SpriteID, X
|
STA.w SpriteID, X
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SpawnDungeonPrize:
|
SpawnDungeonPrize:
|
||||||
PHX : PHB
|
PHX : PHB
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w ItemReceiptID
|
STA.w ItemReceiptID
|
||||||
TAX
|
TAX
|
||||||
@@ -61,6 +62,7 @@ RTS
|
|||||||
PrepPrizeTile:
|
PrepPrizeTile:
|
||||||
PHA : PHX : PHY
|
PHA : PHX : PHY
|
||||||
LDA.w AncillaGet, X
|
LDA.w AncillaGet, X
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteID,X
|
STA.w SpriteID,X
|
||||||
JSL.l TransferItemReceiptToBuffer_using_ReceiptID
|
JSL.l TransferItemReceiptToBuffer_using_ReceiptID
|
||||||
@@ -69,6 +71,7 @@ RTL
|
|||||||
|
|
||||||
SetItemPose:
|
SetItemPose:
|
||||||
PHA
|
PHA
|
||||||
|
LDA.w DungeonID : BMI .one_handed
|
||||||
LDA.w RoomItemsTaken : BIT.b #$80 : BNE +
|
LDA.w RoomItemsTaken : BIT.b #$80 : BNE +
|
||||||
.one_handed
|
.one_handed
|
||||||
PLA
|
PLA
|
||||||
@@ -97,6 +100,7 @@ SetCutsceneFlag:
|
|||||||
; Out: c - Cutscene flag $02 if set, $01 if unset.
|
; Out: c - Cutscene flag $02 if set, $01 if unset.
|
||||||
PHX
|
PHX
|
||||||
LDY.b #$01 ; wrote over
|
LDY.b #$01 ; wrote over
|
||||||
|
LDA.w DungeonID : BMI .no_cutscene
|
||||||
LDA.w RoomItemsTaken : BIT #$80 : BNE .dungeon_prize
|
LDA.w RoomItemsTaken : BIT #$80 : BNE .dungeon_prize
|
||||||
.no_cutscene
|
.no_cutscene
|
||||||
PLX
|
PLX
|
||||||
@@ -112,6 +116,7 @@ RTL
|
|||||||
AnimatePrizeCutscene:
|
AnimatePrizeCutscene:
|
||||||
LDA.w ItemReceiptMethod : CMP.b #$03 : BNE +
|
LDA.w ItemReceiptMethod : CMP.b #$03 : BNE +
|
||||||
JSR.w CrystalOrPendantBehavior : BCC +
|
JSR.w CrystalOrPendantBehavior : BCC +
|
||||||
|
LDA.w DungeonID : BMI +
|
||||||
LDA.w RoomItemsTaken : BIT #$80 : BEQ +
|
LDA.w RoomItemsTaken : BIT #$80 : BEQ +
|
||||||
SEC
|
SEC
|
||||||
RTL
|
RTL
|
||||||
@@ -148,7 +153,9 @@ RTL
|
|||||||
|
|
||||||
MaybeKeepLootID:
|
MaybeKeepLootID:
|
||||||
PHA
|
PHA
|
||||||
|
LDA.w DungeonID : BMI .no_prize
|
||||||
LDA.w RoomItemsTaken : BIT #$80 : BNE .prize
|
LDA.w RoomItemsTaken : BIT #$80 : BNE .prize
|
||||||
|
.no_prize
|
||||||
STZ.w ItemReceiptID
|
STZ.w ItemReceiptID
|
||||||
STZ.w ItemReceiptPose
|
STZ.w ItemReceiptPose
|
||||||
PLA
|
PLA
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
HeartPieceGet:
|
HeartPieceGet:
|
||||||
PHX : PHY
|
PHX : PHY
|
||||||
JSL.l LoadHeartPieceRoomValue
|
JSL.l LoadHeartPieceRoomValue
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
TAY
|
TAY
|
||||||
JSL.l MaybeMarkDigSpotCollected
|
JSL.l MaybeMarkDigSpotCollected
|
||||||
@@ -112,6 +113,7 @@ HeartPieceSpritePrep:
|
|||||||
|
|
||||||
LDA.b #$00 : STA.l RedrawFlag
|
LDA.b #$00 : STA.l RedrawFlag
|
||||||
JSL.l LoadHeartPieceRoomValue
|
JSL.l LoadHeartPieceRoomValue
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteID, X
|
STA.w SpriteID, X
|
||||||
JSL.l PrepDynamicTile_loot_resolved
|
JSL.l PrepDynamicTile_loot_resolved
|
||||||
@@ -125,6 +127,7 @@ HeartContainerSpritePrep:
|
|||||||
|
|
||||||
LDA.b #$00 : STA.l RedrawFlag
|
LDA.b #$00 : STA.l RedrawFlag
|
||||||
JSL.l LoadHeartContainerRoomValue ; load item type
|
JSL.l LoadHeartContainerRoomValue ; load item type
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteID, X
|
STA.w SpriteID, X
|
||||||
JSL.l PrepDynamicTile_loot_resolved
|
JSL.l PrepDynamicTile_loot_resolved
|
||||||
|
|||||||
@@ -520,6 +520,7 @@ LoadPowder:
|
|||||||
PHX
|
PHX
|
||||||
JSL.l Sprite_SpawnDynamically ; thing we wrote over
|
JSL.l Sprite_SpawnDynamically ; thing we wrote over
|
||||||
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues)
|
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues)
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteID, Y
|
STA.w SpriteID, Y
|
||||||
TYX
|
TYX
|
||||||
@@ -572,6 +573,7 @@ LoadMushroom:
|
|||||||
|
|
||||||
LDA.b #$00 : STA.l RedrawFlag
|
LDA.b #$00 : STA.l RedrawFlag
|
||||||
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues)
|
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues)
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSR.w ResolveLootID
|
JSR.w ResolveLootID
|
||||||
STA.w SpriteID,X
|
STA.w SpriteID,X
|
||||||
JSL.l PrepDynamicTile
|
JSL.l PrepDynamicTile
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ RTL
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
LoadZoraKingItemGFX:
|
LoadZoraKingItemGFX:
|
||||||
LDA.l $9DE1C3 ; location randomizer writes zora item to
|
LDA.l $9DE1C3 ; location randomizer writes zora item to
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteID,Y
|
STA.w SpriteID,Y
|
||||||
TYX
|
TYX
|
||||||
@@ -190,6 +191,7 @@ JumpToSplashItemTarget:
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
LoadCatfishItemGFX:
|
LoadCatfishItemGFX:
|
||||||
LDA.l $9DE185 ; location randomizer writes catfish item to
|
LDA.l $9DE185 ; location randomizer writes catfish item to
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
STA.w SpriteID, Y
|
STA.w SpriteID, Y
|
||||||
TYX
|
TYX
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ SmithItemMode:
|
|||||||
db $01 ; #$00 = Classic Tempering Process - #$01 = Quick Item Get (default)
|
db $01 ; #$00 = Classic Tempering Process - #$01 = Quick Item Get (default)
|
||||||
SmithItem:
|
SmithItem:
|
||||||
db $02 ; #$02 = Tempered Sword (default)
|
db $02 ; #$02 = Tempered Sword (default)
|
||||||
|
|
||||||
org $86B55C ; PC 0x3355C ; sprite_smithy_bros.asm : 634
|
org $86B55C ; PC 0x3355C ; sprite_smithy_bros.asm : 634
|
||||||
SmithSword:
|
SmithSword:
|
||||||
db $02 ; #$02 = Tempered Sword (default)
|
db $02 ; #$02 = Tempered Sword (default)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ RTS
|
|||||||
;--------------------------------------------------------------------------------
|
;--------------------------------------------------------------------------------
|
||||||
SpawnTabletItem:
|
SpawnTabletItem:
|
||||||
JSL.l LoadOutdoorValue
|
JSL.l LoadOutdoorValue
|
||||||
|
JSL.l AttemptItemSubstitution
|
||||||
JSL.l ResolveLootIDLong
|
JSL.l ResolveLootIDLong
|
||||||
PHA
|
PHA
|
||||||
LDA.b #$EB : STA.l MiniGameTime
|
LDA.b #$EB : STA.l MiniGameTime
|
||||||
|
|||||||
Reference in New Issue
Block a user