diff --git a/bookofmudora.asm b/bookofmudora.asm index b831014..a8b7173 100644 --- a/bookofmudora.asm +++ b/bookofmudora.asm @@ -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 diff --git a/heartpieces.asm b/heartpieces.asm index d75decf..44df782 100644 --- a/heartpieces.asm +++ b/heartpieces.asm @@ -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 diff --git a/inventory.asm b/inventory.asm index 3622781..7c8b990 100644 --- a/inventory.asm +++ b/inventory.asm @@ -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) diff --git a/ram.asm b/ram.asm index d24199d..98c4eeb 100644 --- a/ram.asm +++ b/ram.asm @@ -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) diff --git a/utilities.asm b/utilities.asm index d65b0d9..7296d97 100644 --- a/utilities.asm +++ b/utilities.asm @@ -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 : ++