add pendant draw to world map

This commit is contained in:
scawful
2024-07-03 22:25:19 -04:00
parent 4f86de444c
commit 99275be6a2

View File

@@ -31,9 +31,54 @@ CRYSTALS = $7EF37A
pullpc
DrawPendants:
DrawWisdomPendant:
{
; TODO: Draw pendants
; X position
LDA.b #$08 : STA.l $7EC10B
LDA.b #$30 : STA.l $7EC10A
; Y position
LDA.b #$07 : STA.l $7EC109
LDA.b #$01 : STA.l $7EC108
LDA.b #$60 : STA.b $0D
LDA.b #$34 : STA.b $0C ; Tile GFX
LDA.b #$02 : STA.b $0B ; 02 = 16x16, 00 = 8x8
LDA.b #$0D : STA.l $7EC025
RTL
}
DrawPowerPendant:
{
; X position
LDA.b #$08 : STA.l $7EC10B
LDA.b #$0D : STA.l $7EC10A ; Upper nybble control Zoomed low X pos
; Y position
LDA.b #$02 : STA.l $7EC109
LDA.b #$84 : STA.l $7EC108 ; Upper nybble control Zoomed low Y pos
LDA.b #$60 : STA.b $0D
LDA.b #$32 : STA.b $0C ; Tile GFX
LDA.b #$02 : STA.b $0B ; 02 = 16x16, 00 = 8x8
LDA.b #$08 : STA.l $7EC025
RTL
}
DrawCouragePendant:
{
; X position
LDA.b #$00 : STA.l $7EC10B
LDA.b #$87 : STA.l $7EC10A
; Y position
LDA.b #$04 : STA.l $7EC109
LDA.b #$01 : STA.l $7EC108
; Tile GFX
LDA.b #$60 : STA.b $0D
LDA.b #$38 : STA.b $0C
; Tile Size
LDA.b #$02 : STA.b $0B ; 02 = 16x16, 00 = 8x8
LDA.b #$0A : STA.l $7EC025 ; OAM Slot used
RTL
}
@@ -41,13 +86,13 @@ DrawMasterSwordIcon:
{
; X position
LDA.b #$00 : STA.l $7EC10B
LDA.b #$89 : STA.l $7EC10A ; Upper nybble control Zoomed low X pos
LDA.b #$8D : STA.l $7EC10A ; Upper nybble control Zoomed low X pos
; Y position
LDA.b #$00 : STA.l $7EC109
LDA.b #$E4 : STA.l $7EC108 ; Upper nybble control Zoomed low Y pos
LDA.b #$64 : STA.b $0D
LDA.b #$3C : STA.b $0C ; Tile GFX
LDA.b #$60 : STA.b $0D
LDA.b #$32 : STA.b $0C ; Tile GFX
LDA.b #$02 : STA.b $0B ; 02 = 16x16, 00 = 8x8
LDA.b #$0B : STA.l $7EC025
@@ -100,22 +145,28 @@ MapIconDraw:
.draw_prizes
LDA.b $8A : AND.b #$40 : BEQ .lwprizes
LDA.l OOSPROG : AND.b #$10 : BNE .check_master_sword
JSL DrawPendants
LDA.l OOSPROG : AND.b #$10 : BEQ .check_master_sword
JSL DrawPowerPendant
JSR HandleMapDrawIcon
JMP restore_coords_and_exit
JSL DrawWisdomPendant
JSR HandleMapDrawIcon
JSL DrawCouragePendant
JSR HandleMapDrawIcon
.check_master_sword
LDA.l OOSPROG : AND.b #$20 : BNE .check_fortress
LDA.l OOSPROG : AND.b #$20 : BEQ .check_fortress
JSL DrawMasterSwordIcon
JSR HandleMapDrawIcon
JMP restore_coords_and_exit
.check_fortress
LDA.l OOSPROG : AND.b #$40 : BNE .check_final_boss
LDA.l OOSPROG : AND.b #$40 : BEQ .check_final_boss
JSL DrawFortressOfSecretsIcon
JSR HandleMapDrawIcon
JMP restore_coords_and_exit
.check_final_boss
LDA.l OOSPROG : AND.b #$80 : BNE .exit_dw
LDA.l OOSPROG : AND.b #$80 : BEQ .exit_dw
JSL DrawFinalBossIcon
JSR HandleMapDrawIcon
.exit_dw