Added flag to skip bee trap disguises in various scenarios

This commit is contained in:
codemann8
2024-03-20 17:38:57 -05:00
parent 56def59f58
commit b9da56c8ad
5 changed files with 10 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
; Randomize Book of Mudora
;--------------------------------------------------------------------------------
LoadLibraryItemGFX:
INC.w SkipBeeTrapDisguise
LDA.l LibraryItem_Player : STA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
STA.w SprSourceItemId, X
@@ -27,6 +28,7 @@ RTL
LoadBonkItemGFX:
LDA.b #$08 : STA.w SpriteOAMProp, X ; thing we wrote over
LoadBonkItemGFX_inner:
INC.w SkipBeeTrapDisguise
JSR LoadBonkItem_Player : STA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
JSR LoadBonkItem
STA.w SprSourceItemId, X

View File

@@ -123,6 +123,7 @@ RTL
HeartPieceSpritePrep:
LDA.l ServerRequestMode : BEQ + : : +
INC.w SkipBeeTrapDisguise
JSL HeartPieceGetPlayer : STA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA.w SprSourceItemId, X : BNE +
JSL LoadHeartPieceRoomValue

View File

@@ -615,6 +615,7 @@ LoadMushroom:
LDA.b #$00 : STA.w SpriteGFXControl, X ; thing we wrote over
.justGFX
PHA
INC.w SkipBeeTrapDisguise
LDA.l MushroomItem_Player : STA.w SprItemMWPlayer : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA.w SprSourceItemId, X : BNE +
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues)

View File

@@ -319,6 +319,7 @@ SpawnedItemFlag = $7E0726 ; 0x02 - one for pot, 2 for sprite drop
SpawnedItemMWPlayer = $7E0728 ; Player Id for spawned item if Multiworld item 0x02
;
EnemyDropIndicator = $7E072A ; Used by HUD to indicate enemy drops remaining
SkipBeeTrapDisguise = $7E072C ; Flag to skip bee trap disguise during draw routine
SprDropsItem = $7E0730 ; Array for whether a sprite drops an item 0x16
SprItemReceipt = $7E0740 ; Array for item id for each sprite 0x16
@@ -879,6 +880,7 @@ endmacro
%assertRAM(SpawnedItemFlag, $7E0726)
%assertRAM(SpawnedItemMWPlayer, $7E0728)
%assertRAM(EnemyDropIndicator, $7E072A)
%assertRAM(SkipBeeTrapDisguise, $7E072C)
%assertRAM(SprDropsItem, $7E0730)
%assertRAM(SprItemReceipt, $7E0740)
%assertRAM(SprItemIndex, $7E0750)

View File

@@ -81,7 +81,10 @@ RTL
ResolveBeeTrap:
PHA
LDA.b #$00 : STA.l BeeTrapDisguise ; clear it
PLA
LDA.w SkipBeeTrapDisguise : BEQ +
STZ.w SkipBeeTrapDisguise
PLA : RTS
+ PLA
CMP.b #$D0 : BNE +
JSL GetRandomInt : AND.b #$3F
BNE ++ : LDA.b #$49 : ++ CMP.b #$26 : BNE ++ : LDA.b #$6A : ++