Cleanup menu_draw, fix bombs drawing incorrectly

This commit is contained in:
scawful
2024-03-13 12:24:50 -04:00
parent c1ad4cf3b8
commit 83d79e0bae

View File

@@ -1,4 +1,4 @@
; ============================================================================= ; =========================================================
; Tilemap Menu background ; Tilemap Menu background
Menu_DrawBackground: Menu_DrawBackground:
@@ -30,7 +30,7 @@ Menu_DrawBackground:
RTS RTS
} }
; ============================================================================= ; =========================================================
; Menu Item Draw Routine ; Menu Item Draw Routine
; Credit to Kan ; Credit to Kan
@@ -64,10 +64,10 @@ DrawMenuItem:
} }
; ============================================================================= ; =========================================================
; Quest Icons Tilemap Draw Routine ; Quest Icons Tilemap Draw Routine
DrawQuestIcons: Menu_DrawQuestIcons:
{ {
LDX.w #$10 LDX.w #$10
@@ -94,9 +94,9 @@ DrawQuestIcons:
} }
; ============================================================================= ; =========================================================
DrawTriforceIcon: Menu_DrawTriforceIcons:
{ {
LDA.l $7EF37A LDA.l $7EF37A
LDX.w #$3534 LDX.w #$3534
@@ -135,9 +135,9 @@ DrawTriforceIcon:
} }
;=============================================================================== ; =========================================================
DrawPendantIcons: Menu_DrawPendantIcons:
{ {
LDA.l $7EF374 LDA.l $7EF374
LSR : BCC + LSR : BCC +
@@ -156,7 +156,7 @@ DrawPendantIcons:
} }
;=============================================================================== ; =========================================================
; V H O P P P T T T T T T T T T T <- tile format ; V H O P P P T T T T T T T T T T <- tile format
; V = Vertical Flip ; V = Vertical Flip
@@ -169,6 +169,12 @@ DrawPendantIcons:
DrawHeartPieces: DrawHeartPieces:
{ {
; Empty heart containter
LDX.w #$2484 : STX.w $149E ; top left
LDX.w #$6484 : STX.w $14A0 ; top right
LDX.w #$2485 : STX.w $14DE ; bottom left
LDX.w #$6485 : STX.w $14E0 ; bottom right
LDA.l $7EF36B LDA.l $7EF36B
AND.w #$00FF AND.w #$00FF
CMP.w #3 : BEQ .top_right CMP.w #3 : BEQ .top_right
@@ -186,9 +192,10 @@ DrawHeartPieces:
} }
;=============================================================================== ; =========================================================
DrawMusicNotes: DrawMusicNotes:
{
LDA.w #$02 LDA.w #$02
STA.w MusicNoteValue STA.w MusicNoteValue
LDA.w #MusicNoteValue LDA.w #MusicNoteValue
@@ -211,8 +218,9 @@ DrawMusicNotes:
JSR DrawMenuItem JSR DrawMenuItem
RTS RTS
}
;=============================================================================== ; =========================================================
DrawYItems: DrawYItems:
{ {
@@ -230,7 +238,7 @@ DrawYItems:
LDY.w #BoomsGFX LDY.w #BoomsGFX
JSR DrawMenuItem JSR DrawMenuItem
LDA.l $7EF342 : CMP.w #$0000 : BEQ .no_hookshot LDA.l $7EF342 : AND.w #$00FF : CMP.w #$0000 : BEQ .no_hookshot
LDA.w GoldstarOrHookshot : BNE .spoof_hookshot LDA.w GoldstarOrHookshot : BNE .spoof_hookshot
LDA #$0001 ; No goldstar, but hookshot LDA #$0001 ; No goldstar, but hookshot
.spoof_hookshot .spoof_hookshot
@@ -241,7 +249,7 @@ DrawYItems:
.no_hookshot .no_hookshot
LDA.l $7EF343 LDA.l $7EF343
CMP.w #$00 : BEQ .no_bomb AND.w #$00FF : CMP.w #$00 : BEQ .no_bomb
LDA.w #$0001 LDA.w #$0001
STA.w MenuItemValueSpoof STA.w MenuItemValueSpoof
LDA.w #MenuItemValueSpoof LDA.w #MenuItemValueSpoof
@@ -310,14 +318,21 @@ DrawYItems:
JSR DrawMenuItem JSR DrawMenuItem
.no_book .no_book
; LDA.l $7EF350 : CMP.w #$00 : BEQ .no_somaria
; LDA.w SomariaOrByrna : BNE .spoof_somaria
; .spoof_somaria
; LDA.w #$01 : STA.w ShortSpoof : LDA.w #ShortSpoof
LDA.w #$7EF350 LDA.w #$7EF350
LDX.w #menu_offset(13,9) LDX.w #menu_offset(13,9)
LDY.w #SomariaGFX LDY.w #SomariaGFX
JSR DrawMenuItem JSR DrawMenuItem
.no_somaria
LDA.w #$7EF351 LDA.w #$7EF351
LDX.w #menu_offset(13,13) LDX.w #menu_offset(13,13)
LDY.w #ByrnaGFX ;LDY.w #ByrnaGFX
LDY.w #FishingRodGFX
JSR DrawMenuItem JSR DrawMenuItem
LDA.w #$7EF34D LDA.w #$7EF34D
@@ -365,9 +380,10 @@ DrawYItems:
RTS RTS
} }
; ============================================================================= ; =========================================================
Menu_DrawQuestItems: Menu_DrawQuestItems:
{
SEP #$30 SEP #$30
LDA.b #$7E : STA.b $0A LDA.b #$7E : STA.b $0A
REP #$30 REP #$30
@@ -411,8 +427,9 @@ Menu_DrawQuestItems:
JSR DrawMenuItem JSR DrawMenuItem
RTS RTS
}
; ============================================================================= ; =========================================================
Menu_DrawBigKey: Menu_DrawBigKey:
{ {
@@ -482,7 +499,7 @@ Menu_DrawBigKey:
RTS RTS
} }
; ============================================================================= ; =========================================================
; *$6EEB6-$6EEDB LOCAL ; *$6EEB6-$6EEDB LOCAL
CheckPalaceItemPossession: CheckPalaceItemPossession:
@@ -509,7 +526,7 @@ CheckPalaceItemPossession:
dw .red_mail dw .red_mail
} }
; ============================================================================== ; ==========================================================
; *$6EEDC-$6EEE0 JUMP LOCATION ; *$6EEDC-$6EEE0 JUMP LOCATION
.pool_CheckPalaceItemPossession: .pool_CheckPalaceItemPossession: