fixed a bug that cased item text to draw even when no items were available
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
; =========================================================
|
; =========================================================
|
||||||
; Tilemap Menu background
|
; Tilemap Menu background
|
||||||
|
|
||||||
; This function is bled into via the previous menu.asm function.
|
; This function is bled into via the previous menu.asm file.
|
||||||
|
|
||||||
Menu_DrawBackground:
|
Menu_DrawBackground:
|
||||||
{
|
{
|
||||||
REP #$30
|
REP #$30
|
||||||
|
|||||||
@@ -119,6 +119,17 @@ Menu_SongNames:
|
|||||||
Menu_DrawItemName:
|
Menu_DrawItemName:
|
||||||
{
|
{
|
||||||
SEP #$30
|
SEP #$30
|
||||||
|
|
||||||
|
; Double check that we have the item.
|
||||||
|
LDY.w $0202
|
||||||
|
LDX.w Menu_AddressIndex-1, Y
|
||||||
|
LDA.l $7EF300, X
|
||||||
|
CMP.b #$01 : BCS .haveItem
|
||||||
|
REP #$30
|
||||||
|
RTS
|
||||||
|
|
||||||
|
.haveItem
|
||||||
|
|
||||||
LDA.w $0202 : CMP.b #$03 : BEQ .goldstar
|
LDA.w $0202 : CMP.b #$03 : BEQ .goldstar
|
||||||
LDA.w $0202 : CMP.b #$0D : BEQ .ocarina
|
LDA.w $0202 : CMP.b #$0D : BEQ .ocarina
|
||||||
; Check if it's a bottle
|
; Check if it's a bottle
|
||||||
@@ -150,6 +161,7 @@ Menu_DrawItemName:
|
|||||||
REP #$30 : LDX #$0002 : JMP .draw_bottle
|
REP #$30 : LDX #$0002 : JMP .draw_bottle
|
||||||
.bottle_4
|
.bottle_4
|
||||||
REP #$30 : LDX #$0003
|
REP #$30 : LDX #$0003
|
||||||
|
|
||||||
.draw_bottle
|
.draw_bottle
|
||||||
JSR DrawBottleNames
|
JSR DrawBottleNames
|
||||||
RTS
|
RTS
|
||||||
@@ -164,15 +176,14 @@ Menu_DrawItemName:
|
|||||||
|
|
||||||
; Check the timer and see if we should draw the item name
|
; Check the timer and see if we should draw the item name
|
||||||
LDA $1A : AND.w #$00FF : CMP #$0080 : BCC .draw_item
|
LDA $1A : AND.w #$00FF : CMP #$0080 : BCC .draw_item
|
||||||
|
|
||||||
LDA $030F : BEQ .draw_item
|
LDA $030F : BEQ .draw_item
|
||||||
LDA $030F : AND.w #$00FF : DEC : ASL #5 : TAX
|
LDA $030F : AND.w #$00FF : DEC : ASL #5 : TAX
|
||||||
LDY.w #$0000
|
LDY.w #$0000
|
||||||
|
|
||||||
.draw_ocarina_loop
|
.draw_ocarina_loop
|
||||||
LDA.w Menu_SongNames, X : STA.w $1692, Y
|
LDA.w Menu_SongNames, X : STA.w $1692, Y
|
||||||
INX #2 : INY #2 : CPY #$001C : BCC .draw_ocarina_loop
|
INX #2 : INY #2 : CPY #$001C : BCC .draw_ocarina_loop
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawBottleNames:
|
DrawBottleNames:
|
||||||
|
|||||||
Reference in New Issue
Block a user