Fix Bow item always shooting silver arrows
This commit is contained in:
@@ -13,7 +13,7 @@ NothingGFX:
|
|||||||
|
|
||||||
BowsGFX:
|
BowsGFX:
|
||||||
dw $28BA, $28E9, $28E8, $28CB ; Empty bow
|
dw $28BA, $28E9, $28E8, $28CB ; Empty bow
|
||||||
dw $28BA, $284A, $2849, $28CB ; Bow and arrows
|
dw $28BA, $28BB, $24CA, $28CB ; Bow and arrows
|
||||||
dw $28BA, $28E9, $28E8, $28CB ; Empty silvers bow
|
dw $28BA, $28E9, $28E8, $28CB ; Empty silvers bow
|
||||||
dw $28BA, $28BB, $24CA, $28CB ; Silver bow and arrows
|
dw $28BA, $28BB, $24CA, $28CB ; Silver bow and arrows
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ org $2E8000
|
|||||||
|
|
||||||
HUD_Update:
|
HUD_Update:
|
||||||
{
|
{
|
||||||
|
; JSL LinkState_GameboyForm
|
||||||
|
|
||||||
JSR HUD_UpdateItemBox
|
JSR HUD_UpdateItemBox
|
||||||
|
|
||||||
.ignoreItemBox ; ALTERNATE ENTRY POINT
|
.ignoreItemBox ; ALTERNATE ENTRY POINT
|
||||||
@@ -234,7 +236,7 @@ MagicTilemap:
|
|||||||
dw $3C4F, $3C5F, $3C5F, $3C5F, $3C5F
|
dw $3C4F, $3C5F, $3C5F, $3C5F, $3C5F
|
||||||
dw $3C5E, $3C5F, $3C5F, $3C5F, $3C5F
|
dw $3C5E, $3C5F, $3C5F, $3C5F, $3C5F
|
||||||
dw $3C5F, $3C5F, $3C5F, $3C5F, $3C5F
|
dw $3C5F, $3C5F, $3C5F, $3C5F, $3C5F
|
||||||
; value 80
|
; value 0x80 aka 128
|
||||||
|
|
||||||
HUD_DrawMagicMeter:
|
HUD_DrawMagicMeter:
|
||||||
{
|
{
|
||||||
@@ -242,8 +244,6 @@ HUD_DrawMagicMeter:
|
|||||||
; X = ((MP & 0xFF)) + 7) & 0xFFF8)
|
; X = ((MP & 0xFF)) + 7) & 0xFFF8)
|
||||||
LDA $7EF36E : AND.w #$00FF : CLC : ADC #$0007 : AND.w #$FFF8 : TAX
|
LDA $7EF36E : AND.w #$00FF : CLC : ADC #$0007 : AND.w #$FFF8 : TAX
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.draw_magic_meter
|
.draw_magic_meter
|
||||||
|
|
||||||
LDA.l (MagicTilemap)+0, X : STA $7EC76A
|
LDA.l (MagicTilemap)+0, X : STA $7EC76A
|
||||||
@@ -260,13 +260,23 @@ HUD_UpdateItemBox:
|
|||||||
{
|
{
|
||||||
SEP #$30
|
SEP #$30
|
||||||
; Dost thou haveth the the bow?
|
; Dost thou haveth the the bow?
|
||||||
LDA $7EF340 : BEQ .havethNoBow
|
LDA $7EF340 : BEQ .no_bow
|
||||||
LDX.b #$04
|
|
||||||
|
CMP.b #$03 : BCC .no_silver_arrows
|
||||||
|
|
||||||
; check how many arrows the player has
|
; check how many arrows the player has
|
||||||
LDA $7EF377 : BNE .drawBowItemIcon
|
LDA $7EF377 : BNE .drawBowItemIcon
|
||||||
LDX.b #$03
|
LDX.b #$03
|
||||||
BRA .drawBowItemIcon
|
BRA .drawBowItemIcon
|
||||||
|
|
||||||
|
.no_silver_arrows
|
||||||
|
|
||||||
|
LDX.b #$02
|
||||||
|
|
||||||
|
LDA $7EF377 : BNE .drawBowItemIcon
|
||||||
|
|
||||||
|
LDX.b #$01
|
||||||
|
|
||||||
.drawBowItemIcon
|
.drawBowItemIcon
|
||||||
; values of X correspond to how the icon will end up drawn:
|
; values of X correspond to how the icon will end up drawn:
|
||||||
; 0x01 - normal bow with no arrows
|
; 0x01 - normal bow with no arrows
|
||||||
@@ -275,7 +285,7 @@ HUD_UpdateItemBox:
|
|||||||
; 0x04 - silver bow with silver arrows
|
; 0x04 - silver bow with silver arrows
|
||||||
TXA : STA $7EF340
|
TXA : STA $7EF340
|
||||||
|
|
||||||
.havethNoBow
|
.no_bow
|
||||||
REP #$30
|
REP #$30
|
||||||
LDX $0202 : BEQ .noEquippedItem
|
LDX $0202 : BEQ .noEquippedItem
|
||||||
LDA $7EF33F, X : AND.w #$00FF
|
LDA $7EF33F, X : AND.w #$00FF
|
||||||
@@ -404,11 +414,19 @@ HudItems:
|
|||||||
dw $F701, $F6F1, $F6A1, $F6B1, $F7C9, $F751
|
dw $F701, $F6F1, $F6A1, $F6B1, $F7C9, $F751
|
||||||
; flute, book, somaria, byrna, feather, bottle3
|
; flute, book, somaria, byrna, feather, bottle3
|
||||||
dw $F859, $F741, $F799, $F7A9, $F731, $F751
|
dw $F859, $F741, $F799, $F7A9, $F731, $F751
|
||||||
; deku, zora, wolf, bunny, stne
|
; deku, zora, wolf, bunny, stone, bottle4
|
||||||
dw $F6E1, $F821, $F6D1, $F7B9, $F811, $F751
|
dw $F6E1, $F821, $F6D1, $F7B9, $F811, $F751
|
||||||
}
|
}
|
||||||
|
|
||||||
; F711
|
; F711
|
||||||
|
|
||||||
|
org $0DF629
|
||||||
|
dw $20F5, $20F5, $20F5, $20F5 ; No bow
|
||||||
|
dw $28BA, $28E9, $28E8, $28CB ; Empty bow
|
||||||
|
dw $28BA, $28BB, $24CA, $28CB ; Bow and arrows
|
||||||
|
dw $28BA, $28E9, $28E8, $28CB ; Empty silvers bow
|
||||||
|
dw $28BA, $28BB, $24CA, $28CB ; Silver bow and arrows
|
||||||
|
|
||||||
; Ocarina
|
; Ocarina
|
||||||
org $0DF859
|
org $0DF859
|
||||||
dw $2CD4, $2CD5, $2CE4, $2CE5
|
dw $2CD4, $2CD5, $2CE4, $2CE5
|
||||||
@@ -457,7 +475,6 @@ org $0DF6A1
|
|||||||
org $0DF6B1
|
org $0DF6B1
|
||||||
dw $2CB0, $2CBE, $2CC0, $2CC1
|
dw $2CB0, $2CBE, $2CC0, $2CC1
|
||||||
|
|
||||||
|
|
||||||
; Mirror
|
; Mirror
|
||||||
org $0DF7C9
|
org $0DF7C9
|
||||||
dw $20F5, $20F5, $20F5, $20F5 ; No mirror
|
dw $20F5, $20F5, $20F5, $20F5 ; No mirror
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
;==============================================================================
|
;==============================================================================
|
||||||
; Sprite Properties
|
; Sprite Properties
|
||||||
;==============================================================================
|
;==============================================================================
|
||||||
!SPRID = $9E; The sprite ID you are overwriting (HEX)
|
!SPRID = $9E ; The sprite ID you are overwriting (HEX)
|
||||||
!NbrTiles = 00 ; Number of tiles used in a frame
|
!NbrTiles = 00 ; Number of tiles used in a frame
|
||||||
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
||||||
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
|
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
|
||||||
@@ -53,7 +53,10 @@ Sprite_MakuTree_Prep:
|
|||||||
{
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
|
||||||
|
LDA.l $7EF300
|
||||||
|
BNE .intro_is_done
|
||||||
|
STZ.w $0DD0, X ; Kill the sprite
|
||||||
|
.intro_is_done
|
||||||
|
|
||||||
PLB
|
PLB
|
||||||
RTL
|
RTL
|
||||||
@@ -63,14 +66,39 @@ Sprite_MakuTree_Prep:
|
|||||||
|
|
||||||
Sprite_MakuTree_Main:
|
Sprite_MakuTree_Main:
|
||||||
{
|
{
|
||||||
LDA.w SprAction, X; Load the SprAction
|
LDA.w SprAction, X ; Load the SprAction
|
||||||
JSL UseImplicitRegIndexedLocalJumpTable; Goto the SprAction we are currently in
|
JSL UseImplicitRegIndexedLocalJumpTable ; Goto the SprAction we are currently in
|
||||||
|
|
||||||
dw MakuTree_Speak
|
dw MakuTree_Handler
|
||||||
|
dw MakuTree_MeetLink
|
||||||
|
dw MakuTree_GiveBow
|
||||||
|
|
||||||
MakuTree_Speak:
|
MakuTree_Handler:
|
||||||
{
|
{
|
||||||
%ShowSolicitedMessage($20)
|
; Check the progress flags
|
||||||
|
LDA $7EF3CB : CMP.b #$01 : BEQ .has_met_link
|
||||||
|
%GotoAction(1)
|
||||||
|
RTS
|
||||||
|
|
||||||
|
.has_met_link
|
||||||
|
%ShowSolicitedMessage($22)
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
MakuTree_MeetLink:
|
||||||
|
{
|
||||||
|
%ShowSolicitedMessage($20) : BCC .no_talk
|
||||||
|
LDA #$01 : STA $7EF3CB
|
||||||
|
%GotoAction(2)
|
||||||
|
.no_talk
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
MakuTree_GiveBow:
|
||||||
|
{
|
||||||
|
; Give Link the Bow
|
||||||
|
LDY #$0B : JSL Link_ReceiveItem
|
||||||
|
%GotoAction(0)
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user