Adjusting bottle vendor fish prizes to be centered and display key GFX correctly

This commit is contained in:
codemann8
2023-07-07 01:31:18 -05:00
parent f51df3e6eb
commit ffe7985139
2 changed files with 25 additions and 1 deletions

View File

@@ -321,7 +321,13 @@ DrawSlottedTile:
BRA .draw
+ ; narrow
LDA.w $0E20, X : AND.w #$00FF : CMP.w #$003B : BEQ .draw ; bonk item
LDA.b $A0 : CMP.w #$0120 : BEQ .draw ; good bee statue
LDA.b $A0 : CMP.w #$0120 : BNE +
LDA.b $1B : BNE .draw ; good bee statue
+
; TODO: Figure out how to target bottle vendor fish item better than this
LDA.b $8A : AND.w #$00FF : CMP.w #$0018 : BNE +
LDA.b $1B : BEQ .draw ; bottle vendor key
+
LDA.w #$0004
STA.w !SPRITE_DYNAMIC_OAM : STA.w !SPRITE_DYNAMIC_OAM+8

View File

@@ -651,6 +651,24 @@ SetTheSceneFix:
JSL LoadCommonSprites_long
RTL
pushpc
org $868072
JSL SetBottleVendorKey : NOP #4
pullpc
SetBottleVendorKey:
LDA.w $0E20,Y : CMP.b #$E4 : BNE +
; small key from bottle vendor
LDA.b #$AF : STA.w $0E80,Y
LDA.b #$01 : STA.w !SPRITE_REDRAW, Y
BRA .shift
+ CMP.b #$DE : BEQ .return
CMP.b #$E2 : BEQ .return
; shift narrow sprite to left by 4
.shift
LDA.b $00 : CLC : ADC.b #$04 : STA.w $0D10,Y ; what we wrote over
.return
RTL
ConditionalLoadCommonSprites_Do3To4Low:
LDA.b $10 : CMP.b #$01 : BEQ + ; what we wrote over
CMP.b #$0E : BEQ ++